Skip to content

Fix compressed Codex model routing - #3

Merged
doedja merged 1 commit into
mainfrom
agent/codex-kenari-provider-auth
Jul 27, 2026
Merged

Fix compressed Codex model routing#3
doedja merged 1 commit into
mainfrom
agent/codex-kenari-provider-auth

Conversation

@doedja

@doedja doedja commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Disable Codex request compression for the process-scoped router provider.
  • Reject command-line configuration that could re-enable request compression.
  • Release the routing fix as @kenarihq/cli@0.3.2.

Root cause

Codex 0.145 compresses Responses API bodies with zstd. Kenari supports Node 18, whose built-in zlib cannot decode zstd. The router therefore could not read the model ID and treated the request as native. The native ChatGPT backend received the unchanged kenari/... slug and rejected it.

Disabling compression at the Codex process boundary keeps the request inspectable on every supported Node version. The router can then select the correct upstream, remove the kenari/ namespace, and isolate credentials.

Impact

Kenari models now work from Codex sessions authenticated through ChatGPT. Native ChatGPT models continue to use the ChatGPT Codex backend.

Checks

  • npm test, 85 passing
  • Live gpt-5.4 native route through ChatGPT login
  • Live kenari/deepseek-v4-flash route through the Kenari gateway
  • Unsafe compression override matrix
  • npm pack --dry-run --json
  • git diff --check

Codex compressed Responses requests with zstd, so the Node 18 router could not inspect the model and sent Kenari slugs to the native upstream. Disable process-scoped compression and reject overrides that could re-enable it.
@doedja
doedja merged commit 9b723c0 into main Jul 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant