mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-24 19:04:25 +08:00
fix(codex): normalize small output budgets for all source formats
- Raise positive integer max_output_tokens below 16 to the Codex minimum on the translated payload across HTTP and WebSocket paths, before user payload rules. - Send inference verification with a 16-token budget so healthy Codex OAuth credentials are no longer rejected by the upstream minimum. - Add regression coverage for VerifyInference and small budgets from every Codex source format. Closes: #7304
This commit is contained in:
@@ -58,7 +58,7 @@ func (e *CodexExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, re
|
||||
}
|
||||
originalTranslated = helps.SetStringIfDifferent(originalTranslated, "model", baseModel)
|
||||
doc := ojson.NewDoc(body)
|
||||
normalizeCodexClaudeOutputBudgetDoc(doc, from, req.Payload)
|
||||
normalizeCodexOutputBudgetDoc(doc)
|
||||
helps.SetStringIfDifferentDoc(doc, "model", baseModel)
|
||||
|
||||
if err = helps.ApplyRequestThinkingDoc(doc, req, opts, from.String(), to.String(), e.Identifier(), updatesChanged); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user