provider指令切换模型类型

This commit is contained in:
HitMargin
2026-04-04 23:14:26 +08:00
parent ad104449f9
commit b5d1dbc9d0
3 changed files with 116 additions and 0 deletions

View File

@@ -8,6 +8,9 @@ export function getAPIProvider(): APIProvider {
// 1. Check settings.json modelType field (highest priority)
const modelType = getInitialSettings().modelType
if (modelType === 'openai') return 'openai'
if (modelType === 'bedrock') return 'bedrock'
if (modelType === 'vertex') return 'vertex'
if (modelType === 'foundry') return 'foundry'
// 2. Check environment variables (backward compatibility)
return isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI)