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
8ff40f52
Commit
8ff40f52
authored
Feb 17, 2026
by
0-don
Browse files
fix: remove unsupported parameters from Codex model requests
parent
a817cafe
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/openai_codex_transform.go
View file @
8ff40f52
...
...
@@ -112,13 +112,19 @@ func applyCodexOAuthTransform(reqBody map[string]any, isCodexCLI bool) codexTran
result
.
Modified
=
true
}
if
_
,
ok
:=
reqBody
[
"max_output_tokens"
];
ok
{
delete
(
reqBody
,
"max_output_tokens"
)
result
.
Modified
=
true
}
if
_
,
ok
:=
reqBody
[
"max_completion_tokens"
];
ok
{
delete
(
reqBody
,
"max_completion_tokens"
)
result
.
Modified
=
true
// Strip parameters unsupported by codex models via the Responses API.
for
_
,
key
:=
range
[]
string
{
"max_output_tokens"
,
"max_completion_tokens"
,
"temperature"
,
"top_p"
,
"frequency_penalty"
,
"presence_penalty"
,
}
{
if
_
,
ok
:=
reqBody
[
key
];
ok
{
delete
(
reqBody
,
key
)
result
.
Modified
=
true
}
}
if
normalizeCodexTools
(
reqBody
)
{
...
...
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