Skip to content

fix(codex): align proxy with OpenCode OAuth - #28

Merged
rexdotsh merged 2 commits into
mainfrom
fix/codex-opencode-parity
Aug 7, 2026
Merged

fix(codex): align proxy with OpenCode OAuth#28
rexdotsh merged 2 commits into
mainfrom
fix/codex-opencode-parity

Conversation

@rexdotsh

@rexdotsh rexdotsh commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • advertise OpenCode OAuth context/input limits for Codex models
  • align Codex session-affinity headers and response-header timeout behavior
  • log full SSE incomplete/failure reasons for future diagnosis

Root cause

A stopped GPT-5.6 Luna turn had 371,566 total input/cache tokens and only emitted 16 output tokens before response.incomplete with max_output_tokens. Kleis advertised the public API limit of 1,050,000 context / 922,000 input, while OpenCode OAuth advertises 500,000 context / 372,000 input. OpenCode therefore did not compact before the ChatGPT backend ran out of output room.

This change matches OpenCode OAuth so automatic compaction starts around 352k usable input tokens. It also hides the unsupported bare gpt-5.6 model while retaining supported GPT-5.6 variants.

Verification

  • bun test (89 passed)
  • bun typecheck
  • bun lint
  • bun run build

@rexdotsh
rexdotsh merged commit 21ecea4 into main Aug 7, 2026
2 checks passed
@rexdotsh
rexdotsh deleted the fix/codex-opencode-parity branch August 7, 2026 20:07
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