Merge pull request #2050 from zvensmoluya/fix/openai-compact-payload-fields

fix(openai): preserve current Codex compact payload fields
This commit is contained in:
Wesley Liddick
2026-04-29 21:03:48 +08:00
committed by GitHub
2 changed files with 30 additions and 1 deletions
@@ -4929,7 +4929,18 @@ func normalizeOpenAICompactRequestBody(body []byte) ([]byte, bool, error) {
}
normalized := []byte(`{}`)
for _, field := range []string{"model", "input", "instructions", "previous_response_id"} {
// Keep the current Codex /compact schema while still dropping request-scoped
// fields such as prompt_cache_key, store, and stream.
for _, field := range []string{
"model",
"input",
"instructions",
"tools",
"parallel_tool_calls",
"reasoning",
"text",
"previous_response_id",
} {
value := gjson.GetBytes(body, field)
if !value.Exists() {
continue