fix(openai): do not normalize API token based accounts

This commit is contained in:
Alex
2026-04-07 11:27:57 +03:00
parent 9ab2fd7f9e
commit 7eecc49c3a
3 changed files with 47 additions and 2 deletions

View File

@@ -275,6 +275,13 @@ func normalizeCodexModel(model string) string {
return "gpt-5.1"
}
func normalizeOpenAIModelForUpstream(account *Account, model string) string {
if account == nil || account.Type == AccountTypeOAuth {
return normalizeCodexModel(model)
}
return strings.TrimSpace(model)
}
func SupportsVerbosity(model string) bool {
if !strings.HasPrefix(model, "gpt-") {
return true