fix(responses): drop the retired prompt_cache_retention for gpt-5.6 - #2138
fix(responses): drop the retired prompt_cache_retention for gpt-5.6#2138lidge-jun wants to merge 1 commit into
Conversation
The ChatGPT backend 400s a gpt-5.6 request that still carries prompt_cache_retention: "Unsupported parameter". GPT-5.6 replaced the field with prompt_cache_options.ttl. Strip it on the canonical ChatGPT forward path for the gpt-5.6 family only. The retired value is not translated into the replacement field: 5.6 carries a different TTL contract and implicit caching still applies, so inventing one would change a caching decision the caller never made. The narrowness is the fix, not an omission. An older model may still honor the field, and a self-hosted or third-party forward gateway may still accept it, so both axes are pinned by non-match tests. Based on @lilinxiong's implementation in #2102, with an exact-or-dashed-prefix family match so a future gpt-5.60 is not swept up. Closes #2092
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe passthrough adapter removes ChangesGPT-5.6 prompt-cache retention handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change narrowly removes an unsupported field for the gpt-5.6 ChatGPT forwarding path, with the affected behavior covered by tests and no actionable merge-blocking risk remaining after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Client
participant OpenAIResponsesPassthroughAdapter
participant ChatGPTCodexBackend
Client->>OpenAIResponsesPassthroughAdapter: Send gpt-5.6 request with prompt_cache_retention
OpenAIResponsesPassthroughAdapter->>OpenAIResponsesPassthroughAdapter: Remove deprecated retention field
OpenAIResponsesPassthroughAdapter->>ChatGPTCodexBackend: Forward sanitized request
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
리뷰 · 우선순위 64 / 80#2092의 재현 반쪽임. 필드 있으면 400, 없으면 200. 지금 좁힌 두 가드가 포인트임. 모델은 exact #2102가 구현을 가져왔고 #2099가 Fixes 링크, #2091이 같은 결함. 이 PR이 그 셋을 흡수함. 세 개 열어두지 말고 이걸로 닫으면 됨. types.ts/config.ts 안 건드림. 닫고 리베이스하라는 쪽 아님.
해결방안: 머지하고 #2102 #2099 #2091은 닫음. #2092는 간헐 400 남으면 열어 두거나 후속 이슈로 자름. 2.27에 넣어도 됨. 범위가 어댑터 한 파일임. 이 댓글은 grok-bot이 작성했습니다 |
Ingwannu
left a comment
There was a problem hiding this comment.
The implementation scope is correct: it strips only exact/dashed-prefix gpt-5.6 models on the canonical ChatGPT forward backend, preserves gpt-5.5, preserves noncanonical forward gateways, and does not invent prompt_cache_options.
I am requesting one integration update before approval: the current head 5904178c349c is 22 commits behind the current dev head caf20353f, so the green jobs validate the old base at 890d339dec9f. Please rebase onto the latest dev and rerun required CI on the new exact head. Keep the current narrow predicate and tests unchanged in scope.
Summary
The ChatGPT backend rejects a
gpt-5.6request that still carriesprompt_cache_retentionwith400 Unsupported parameter(#2092, reproduced 3/3 by the reporter: field present → 400, field omitted → 200). GPT-5.6 replaced it withprompt_cache_options.ttl.This strips the retired field on the canonical ChatGPT forward path, for the
gpt-5.6family only.Credit: the implementation is @lilinxiong's from #2102, which had the right contract of the three proposals. @yzxcj797's #2099 contributed the
Fixes #2092link and the repro-shaped fixture. @luvs01's #2091 raised the same defect.Why the narrowness is the fix
Two deliberate limits, each pinned by a test that a wider strip would fail:
gpt-5.6or a dashedgpt-5.6-*prefix. A barestartsWith("gpt-5.6")also matches a futuregpt-5.60, silently changing an unrelated model.tests/openai-responses-passthrough.test.ts:807already pins that a gpt-5.5 forward request keeps it.The retired value is not translated into
prompt_cache_options. 5.6 carries a different TTL contract and implicit caching still applies when the caller sent no replacement options, so synthesizing one would change a caching decision the caller never made.Verification
tests/openai-responses-passthrough.test.ts, driven RED first: reverting only the adapter change fails 5 of the new tests. The two narrowness guards (gpt-5.60, noncanonical gateway) stay green in both directions, which is what proves they are guards rather than restatements.bun test --isolate tests— 13,537 pass, 0 fail, 10 skip (855 files).bun test --isolate tests/openai-responses-passthrough.test.ts— 75 pass, 0 fail.bun run typecheck— clean.bun run privacy:scan— passed.Supersedes
Once this lands, #2102, #2099, and #2091 are all resolved by it. I will close them with attribution rather than leaving three open PRs for one defect.
Note: #2092's intermittent 400s on bodies that already lacked the field are not addressed here and remain open — that is a separate backend/retry question, and widening the strip would not fix it.
Checklist
Closes #2092
Summary by CodeRabbit
gpt-5.6model family to omit the retired prompt cache retention setting when using the canonical OpenAI backend.