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