refactor: address code review feedback
- Make getProviderLabel() switch exhaustive with explicit openai/gemini arms instead of falling through to env-var checks in default - Add clarifying comment on additionalProperties override in schema normalization
This commit is contained in:
@@ -19,13 +19,11 @@ function getProviderLabel(): string {
|
||||
return 'Google Vertex'
|
||||
case 'foundry':
|
||||
return 'Azure Foundry'
|
||||
case 'openai':
|
||||
return 'OpenAI-compatible API'
|
||||
case 'gemini':
|
||||
return 'Gemini API'
|
||||
default:
|
||||
if (process.env.CLAUDE_CODE_USE_OPENAI === '1' || process.env.CLAUDE_CODE_USE_OPENAI === 'true') {
|
||||
return 'OpenAI-compatible API'
|
||||
}
|
||||
if (process.env.CLAUDE_CODE_USE_GEMINI === '1' || process.env.CLAUDE_CODE_USE_GEMINI === 'true') {
|
||||
return 'Gemini API'
|
||||
}
|
||||
return 'API'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user