mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: add codex-cli case to useSelectedModel hook
This commit is contained in:
parent
d50567ffbd
commit
a5d010e998
1 changed files with 9 additions and 1 deletions
|
|
@ -36,6 +36,8 @@ import {
|
|||
litellmDefaultModelId,
|
||||
claudeCodeDefaultModelId,
|
||||
claudeCodeModels,
|
||||
codexCliDefaultModelId,
|
||||
codexCliModels,
|
||||
sambaNovaModels,
|
||||
sambaNovaDefaultModelId,
|
||||
doubaoModels,
|
||||
|
|
@ -343,6 +345,12 @@ function getSelectedModel({
|
|||
const info = qwenCodeModels[id as keyof typeof qwenCodeModels]
|
||||
return { id, info }
|
||||
}
|
||||
case "codex-cli": {
|
||||
// Codex CLI models are OpenAI-compatible
|
||||
const id = apiConfiguration.apiModelId ?? codexCliDefaultModelId
|
||||
const info = codexCliModels[id as keyof typeof codexCliModels]
|
||||
return { id, info: { ...openAiModelInfoSaneDefaults, ...info } }
|
||||
}
|
||||
case "vercel-ai-gateway": {
|
||||
const id = apiConfiguration.vercelAiGatewayModelId ?? vercelAiGatewayDefaultModelId
|
||||
const info = routerModels["vercel-ai-gateway"]?.[id]
|
||||
|
|
@ -352,7 +360,7 @@ function getSelectedModel({
|
|||
// case "human-relay":
|
||||
// case "fake-ai":
|
||||
default: {
|
||||
provider satisfies "anthropic" | "gemini-cli" | "qwen-code" | "human-relay" | "fake-ai"
|
||||
provider satisfies "anthropic" | "gemini-cli" | "human-relay" | "fake-ai"
|
||||
const id = apiConfiguration.apiModelId ?? anthropicDefaultModelId
|
||||
const baseInfo = anthropicModels[id as keyof typeof anthropicModels]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue