Skip to content

Commit faa36e7

Browse files
Codex request parity checklist (CL-5168) (#304)
* Add Codex request parity checklist for body and headers Field-by-field Corbits vs openai/codex vs nanocodex reference with explicit statuses. Docs-only spike; no adapter behavior change. * Clarify Codex parity checklist ticket ids and status labels Single status per row; previous_response_id gated on CL-5167 and implemented as CL-5161; peer columns labeled as coarse spike sketches.
1 parent 03bab5a commit faa36e7

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Codex request parity checklist (CL-5168)
2+
3+
**Status:** spike artifact — docs only; no production change in this issue
4+
**Sources:** Corbits `src/provider/codex-responses-adapter.ts` `buildRequest`; openai/codex public Responses usage; nanocodex (gakonst) as lean-client reference; plan notes in Linear project *Codex / GPT adapter efficiency* (companion plan may live as untracked `docs/plans/codex-adapter-enhancements.md` on a local tree — not required to read this checklist)
5+
**Statuses (exactly one per row):** `already_match` · `safe_to_add` · `backend_rejected` · `unknown` · `intentionally_different`
6+
7+
Corbits target: ChatGPT Codex backend (`chatgpt.com/backend-api/codex/responses`), **not** platform `api.openai.com`. Reference clients may target either surface; mark carefully. Peer-client columns are coarse spike sketches (`yes` / `varies` / `may use`) unless a path is cited — Corbits column is authoritative against `buildRequest`.
8+
9+
---
10+
11+
## Body fields
12+
13+
| Field | Corbits today | openai/codex (ref) | nanocodex (ref) | Status | Notes |
14+
|---|---|---|---|---|---|
15+
| `model` | yes | yes | yes | already_match | Required |
16+
| `input` | full history each turn | full or chained | full or chained | already_match | Continuity via full replay + encrypted reasoning; no delta input yet |
17+
| `instructions` | pinned via `codexInstructions()` | official Codex prompt | often official or close | already_match | Corbits disk/bundled pin; product prompt is **not** here |
18+
| `store` | `false` | typically false for CLI | false | already_match | Backend requires off for encrypted reasoning path |
19+
| `stream` | `true` | true for interactive | true | already_match | |
20+
| `include` | `["reasoning.encrypted_content"]` | encrypted reasoning include | similar when supported | already_match | Round-trip signatures on thinking blocks |
21+
| `parallel_tool_calls` | `false` | varies | varies | intentionally_different | Spike later whether `true` is safe with Corbits tool runtime |
22+
| `tools` | flat Responses tools when present | yes | yes | already_match | |
23+
| `tool_choice` | `"auto"` when tools present | auto / none | auto | already_match | |
24+
| `reasoning.effort` | from `providerOptions.reasoning_effort` when string ≠ `"none"` | yes | yes | already_match | Mapping only; role defaults are product (CL-5162) |
25+
| `reasoning.summary` | `"auto"` when effort set | often auto | often auto | already_match | |
26+
| `prompt_cache_key` | Codex session id when present | session/cache key patterns | session-ish keys | already_match | Confirm vs best clients under load (measure later) |
27+
| `previous_response_id` | **omitted** | may use for continuity | may use | safe_to_add | **Only after PerfTrace attribution (CL-5167)** says payload/transport material; implement as CL-5161 |
28+
| `max_output_tokens` | **omitted** | often omitted on Codex backend | often omitted | backend_rejected | Corbits intentionally omits; backend rejects |
29+
| `generate` / warmup | **omitted** | some clients warmup | unknown | unknown | Spike only after attribution (CL-5172) |
30+
| Chat Completions fields (`messages`, `max_tokens`, …) | never | N/A | N/A | intentionally_different | Wrong protocol; must stay absent |
31+
| Free-form body extras | none | varies | varies | unknown | Backend rejects unknown fields aggressively — add only with live probe |
32+
33+
---
34+
35+
## Headers
36+
37+
| Header | Corbits today | openai/codex (ref) | nanocodex (ref) | Status | Notes |
38+
|---|---|---|---|---|---|
39+
| `content-type` | `application/json` | yes | yes | already_match | |
40+
| `accept` | `text/event-stream` | SSE | SSE or WS | already_match | HTTP SSE path only today |
41+
| `authorization` | bearer sentinel → harness injects token | bearer | bearer | already_match | |
42+
| `openai-beta` | `responses=experimental` | responses experimental | similar | already_match | |
43+
| `originator` | `codex_cli_rs` (from authorize extras) | codex_cli_rs | may differ | already_match | Match official CLI identity |
44+
| `chatgpt-account-id` | when account present | required for subscription | when available | already_match | From tokens / providerOptions |
45+
| `session_id` | when session id present | session headers | session-ish | already_match | Paired with `prompt_cache_key` |
46+
| WebSocket upgrade / WS protocol headers | none | if WS client | if WS client | unknown | No WS in Corbits; spike is CL-5164, gated by CL-5167 attribution |
47+
| Extra product headers | none | product-specific | lean | unknown | Do not invent without backend proof |
48+
49+
---
50+
51+
## Input item types (Corbits)
52+
53+
| Item type | Corbits | Status | Notes |
54+
|---|---|---|---|
55+
| `message` (user/assistant/system/developer) | yes; product system → leading `developer` bridge | intentionally_different | Bridge is product-correct, not a parity bug |
56+
| `function_call` | yes | already_match | |
57+
| `function_call_output` | yes | already_match | |
58+
| `reasoning` + `encrypted_content` | yes (signature round-trip) | already_match | Thinking without signature is not re-sent |
59+
| Image parts | yes (`input_image`) | already_match | |
60+
61+
---
62+
63+
## Transport
64+
65+
| Capability | Corbits | Status | Notes |
66+
|---|---|---|---|
67+
| HTTP POST + SSE | yes | already_match | |
68+
| WebSocket | no | unknown | Gated by CL-5167; spike CL-5164 |
69+
| `previous_response_id` chaining | no | safe_to_add | Gated by CL-5167; implement CL-5161 |
70+
| Connection warmup | no | unknown | Gated by CL-5167; spike CL-5172 |
71+
72+
---
73+
74+
## Recommended follow-ups (do not implement in CL-5168)
75+
76+
1. **Measure first** — PerfTrace attribution (CL-5167) before transport bets
77+
2. **Body key snapshot tests** — lock allowlist so Chat Completions fields cannot leak
78+
3. **`parallel_tool_calls: true` live spike** — only with tool-runtime safety review
79+
4. **`previous_response_id` / WS / warmup** — only if CL-5167 shows transport share is material
80+
81+
---
82+
83+
## Field count
84+
85+
- Body rows: 17
86+
- Header rows: 9
87+
- Input item rows: 5
88+
- Transport rows: 4
89+
90+
**Production code changed in this issue:** none.

0 commit comments

Comments
 (0)