Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
f2c2abe6
Commit
f2c2abe6
authored
Mar 29, 2026
by
YanzheL
Browse files
fix(openai): keep xhigh normalization scoped to messages
parent
ff5b467f
Changes
2
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/openai_model_mapping.go
View file @
f2c2abe6
...
...
@@ -4,7 +4,6 @@ package service
// forwarding. Group-level default mapping only applies when the account itself
// did not match any explicit model_mapping rule.
func
resolveOpenAIForwardModel
(
account
*
Account
,
requestedModel
,
defaultMappedModel
string
)
string
{
requestedModel
=
NormalizeOpenAICompatRequestedModel
(
requestedModel
)
if
account
==
nil
{
if
defaultMappedModel
!=
""
{
return
defaultMappedModel
...
...
backend/internal/service/openai_model_mapping_test.go
View file @
f2c2abe6
...
...
@@ -58,19 +58,6 @@ 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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment