You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1d547fe
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: structure/08_openai-provider-tiers.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,20 @@ engine. Direct short-circuits that engine before pool state is read or mutated a
18
18
current caller/main-login bearer. Neither mode may fall through to `openai-apikey`, and the API
19
19
provider may not fall through to Codex-login credentials.
20
20
21
+
The two routes also keep separate request-compatibility contracts. The canonical ChatGPT Codex
22
+
forward destination removes public `prompt_cache_options` because that backend rejects the field
23
+
before inference; `prompt_cache_key` remains supported. `openai-apikey` and noncanonical/custom
24
+
Responses destinations preserve caller-provided options because their upstream contracts may
25
+
support them.
26
+
27
+
[Decision Log]
28
+
- 목적과 의도: Let public Responses clients use the Codex-login route without one unsupported prompt-cache extension failing the whole turn.
29
+
- 기존 구현 및 제약 조건: Parsing already preserves unknown top-level fields in `_rawBody`, and the canonical backend rejects `prompt_cache_options`; API-key and custom providers may accept the same field.
30
+
- 검토한 주요 대안: Add the field to the Zod schema; strip it for every Responses provider; translate it to a legacy retention hint; remove it only at the canonical destination boundary.
31
+
- 선택한 방식: Keep parser passthrough unchanged and strip the caller field only after `isCanonicalOpenAiForwardProvider` succeeds.
32
+
- 다른 대안 대신 이 방식을 선택한 이유: Schema admission does not change `_rawBody`, global stripping would remove supported public API behavior, and translation would invent cache policy.
33
+
- 장점, 단점 및 영향: VS Code and other public-shape clients avoid the canonical backend rejection while API-key/custom routes retain their wire options; canonical callers cannot request this cache option through OpenCodex.
34
+
21
35
Pool affinity preserves the existing `x-codex-parent-thread-id` supplied by ordinary Codex clients.
22
36
The parent id is trimmed and bounded under the same 512-byte component limit as the Desktop
23
37
fallback. When Codex Desktop omits it or sends an unusable value, the complete bounded `session-id`
0 commit comments