fix(openai): normalize gpt-5.4-xhigh compat mapping

This commit is contained in:
YanzheL
2026-03-29 20:52:29 +08:00
parent fdd8499ffc
commit 8c10941142
5 changed files with 248 additions and 1 deletions

View File

@@ -58,6 +58,19 @@ func TestResolveOpenAIForwardModel(t *testing.T) {
defaultMappedModel: "gpt-4o-mini",
expectedModel: "gpt-5.4",
},
{
name: "normalizes gpt reasoning alias before passthrough mapping",
account: &Account{
Credentials: map[string]any{
"model_mapping": map[string]any{
"gpt-5.4": "gpt-5.4",
},
},
},
requestedModel: "gpt-5.4-xhigh",
defaultMappedModel: "gpt-5.1",
expectedModel: "gpt-5.4",
},
}
for _, tt := range tests {