fix(media): update native provider API defaults and UI schema

- OpenAI image default: dall-e-3 → gpt-image-1.5 (dall-e-3 deprecated May 12)
- DashScope: add missing 4:3 and 3:4 aspect ratio mappings
- UI: remove stale MiniMax size/prompt_optimizer params (backend uses aspect_ratio since #630)
This commit is contained in:
viettranx committed 2026-04-02 09:53:01 +07:00
1 parent 83bcb16597
commit 14c375e33b
3 files changed
+6 -17

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ var imageGenProviderPriority = []string{"openrouter", "gemini", "openai", "minim
// imageGenModelDefaults maps provider names to default image generation models.
var imageGenModelDefaults = map[string]string{
"openrouter": "google/gemini-2.5-flash-image",
"openai": "dall-e-3",
"openai": "gpt-image-1.5",
"gemini": "gemini-2.5-flash-image",
"minimax": "image-01",
"dashscope": "wan2.6-image",
+4
View File
@@ -71,6 +71,10 @@ func aspectRatioToDashScopeSize(params map[string]any) string {
return "1280*720"
case "9:16":
return "720*1280"
case "4:3":
return "1024*768"
case "3:4":
return "768*1024"
default:
return "1024*1024"
}
@@ -12,22 +12,7 @@ export type ParamField = {
export const MEDIA_PARAMS_SCHEMA: Record<string, Record<string, ParamField[]>> = {
create_image: {
minimax_native: [
{
key: "size",
label: "Size",
type: "select",
default: "1024*1024",
options: [
{ value: "1024*1024", label: "1:1" },
{ value: "1280*720", label: "16:9" },
{ value: "720*1280", label: "9:16" },
{ value: "1024*768", label: "4:3" },
{ value: "768*1024", label: "3:4" },
],
},
{ key: "prompt_optimizer", label: "Prompt Optimizer", type: "toggle", default: true },
],
minimax_native: [],
bailian: [
{
key: "size",