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
fix: codexgo binary honors custom/real model providers from config (closes drop-in gap)
buildAssembly previously always used CreateOpenAIProvider(nil) + OPENAI_API_KEY,
ignoring config's model_provider selection, custom [model_providers.*] base_url, and
env_key — so 'codex exec' against a custom provider silently fell back to the mock.
- internal/cli/config_load.go: project selected provider id, [model_providers] map,
default model, openai_base_url from the merged config (-c/profile already folded).
- internal/cli/provider_select.go (new): resolve the active provider (merge configured
onto built-ins, validate), env_key bearer auth resolver; mock only when no
credential resolves.
- internal/cli/assembly.go: build api.Provider for the SELECTED provider (custom
base_url/wire_api/headers honored), pick auth resolver per requires_openai_auth,
honor model selection, thread provider id+model into appserver.Defaults.
- cmd_exec/review/default/app_server consume resolved Defaults.
- internal/paritytest TestParityTurnExec upgraded to BINARY-vs-BINARY: the codexgo
binary now actually contacts the fake endpoint (not the mock) — byte-identical
normalized JSONL turn vs real codex. Behavioral drop-in proven at binary level.
Full tree green: 89 packages pass; parity suite (subcommand/models/apply_patch/turn)
passes binary-vs-binary; cross-compiles.
Copy file name to clipboardExpand all lines: docs/PARITY.md
+41-36Lines changed: 41 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Living record of differential validation of `codexgo` against the reference
31
31
32
32
| Surface | Command | Result |
33
33
|---|---|---|
34
-
|`exec --json` turn lifecycle |`codex exec --json "hello"` vs codexgo | ✅ **Pass** — see `TestParityTurnExec`. Both binaries are pointed at the **same fake `/v1/responses` SSE endpoint** via the **same drop-in `config.toml`** (`[model_providers.parity]`, `env_key`), and produce a **byte-identical normalized JSONL stream**: same event-type sequence, same final agent message, same usage. No real OpenAI credentials required. |
34
+
|`exec --json` turn lifecycle |`codex exec --json "hello"` vs codexgo | ✅ **Pass** — see `TestParityTurnExec`. **Both binaries** are pointed at the **same fake `/v1/responses` SSE endpoint** via the **same drop-in `config.toml`** (`[model_providers.parity]`, `env_key`), and produce a **byte-identical normalized JSONL stream**: same event-type sequence, same final agent message, same usage. The codexgo binary now honors the custom `model_provider` selection, its `base_url`, and its `env_key` directly — no in-process harness. No real OpenAI credentials required. |
35
35
36
36
### `TestParityTurnExec` — the turn-level differential
0 commit comments