fix(cli): add -preview suffix for GitHub Copilot Gemini model names

GitHub Copilot uses gemini-3-pro-preview and gemini-3-flash-preview as
the official model identifiers. The CLI installer was generating config
with incorrect names (gemini-3-pro, gemini-3-flash).

Reported by user: the install command was creating config with wrong
model names that don't work with GitHub Copilot API.
This commit is contained in:
YeonGyu-Kim 2026-02-01 21:23:52 +09:00
parent 62c8a671ee
commit 613610308c
2 changed files with 18 additions and 16 deletions

View File

@ -760,7 +760,7 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models when
"variant": "medium", "variant": "medium",
}, },
"multimodal-looker": { "multimodal-looker": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
"oracle": { "oracle": {
"model": "github-copilot/gpt-5.2", "model": "github-copilot/gpt-5.2",
@ -777,7 +777,7 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models when
}, },
"categories": { "categories": {
"artistry": { "artistry": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
"variant": "max", "variant": "max",
}, },
"deep": { "deep": {
@ -798,10 +798,10 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models when
"model": "github-copilot/claude-sonnet-4.5", "model": "github-copilot/claude-sonnet-4.5",
}, },
"visual-engineering": { "visual-engineering": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
}, },
"writing": { "writing": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
}, },
} }
@ -833,7 +833,7 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models with
"variant": "medium", "variant": "medium",
}, },
"multimodal-looker": { "multimodal-looker": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
"oracle": { "oracle": {
"model": "github-copilot/gpt-5.2", "model": "github-copilot/gpt-5.2",
@ -850,7 +850,7 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models with
}, },
"categories": { "categories": {
"artistry": { "artistry": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
"variant": "max", "variant": "max",
}, },
"deep": { "deep": {
@ -872,10 +872,10 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models with
"model": "github-copilot/claude-sonnet-4.5", "model": "github-copilot/claude-sonnet-4.5",
}, },
"visual-engineering": { "visual-engineering": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
}, },
"writing": { "writing": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
}, },
} }
@ -1090,7 +1090,7 @@ exports[`generateModelConfig mixed provider scenarios uses OpenAI + Copilot comb
"variant": "medium", "variant": "medium",
}, },
"multimodal-looker": { "multimodal-looker": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
"oracle": { "oracle": {
"model": "openai/gpt-5.2", "model": "openai/gpt-5.2",
@ -1107,7 +1107,7 @@ exports[`generateModelConfig mixed provider scenarios uses OpenAI + Copilot comb
}, },
"categories": { "categories": {
"artistry": { "artistry": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
"variant": "max", "variant": "max",
}, },
"deep": { "deep": {
@ -1128,10 +1128,10 @@ exports[`generateModelConfig mixed provider scenarios uses OpenAI + Copilot comb
"model": "github-copilot/claude-sonnet-4.5", "model": "github-copilot/claude-sonnet-4.5",
}, },
"visual-engineering": { "visual-engineering": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
}, },
"writing": { "writing": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
}, },
} }
@ -1290,7 +1290,7 @@ exports[`generateModelConfig mixed provider scenarios uses all fallback provider
"variant": "medium", "variant": "medium",
}, },
"multimodal-looker": { "multimodal-looker": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
"oracle": { "oracle": {
"model": "github-copilot/gpt-5.2", "model": "github-copilot/gpt-5.2",
@ -1307,7 +1307,7 @@ exports[`generateModelConfig mixed provider scenarios uses all fallback provider
}, },
"categories": { "categories": {
"artistry": { "artistry": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
"variant": "max", "variant": "max",
}, },
"deep": { "deep": {
@ -1328,10 +1328,10 @@ exports[`generateModelConfig mixed provider scenarios uses all fallback provider
"model": "github-copilot/claude-sonnet-4.5", "model": "github-copilot/claude-sonnet-4.5",
}, },
"visual-engineering": { "visual-engineering": {
"model": "github-copilot/gemini-3-pro", "model": "github-copilot/gemini-3-pro-preview",
}, },
"writing": { "writing": {
"model": "github-copilot/gemini-3-flash", "model": "github-copilot/gemini-3-flash-preview",
}, },
}, },
} }

View File

@ -75,6 +75,8 @@ function transformModelForProvider(provider: string, model: string): string {
.replace("claude-sonnet-4-5", "claude-sonnet-4.5") .replace("claude-sonnet-4-5", "claude-sonnet-4.5")
.replace("claude-haiku-4-5", "claude-haiku-4.5") .replace("claude-haiku-4-5", "claude-haiku-4.5")
.replace("claude-sonnet-4", "claude-sonnet-4") .replace("claude-sonnet-4", "claude-sonnet-4")
.replace("gemini-3-pro", "gemini-3-pro-preview")
.replace("gemini-3-flash", "gemini-3-flash-preview")
} }
return model return model
} }