Codex
OpenAI's official CLI / desktop app. Point it at ByteSeek via a custom provider.
Install
For provider management on desktop, see Codex++.
Prerequisites
- Codex CLI installed (
codex --versionprints a version) - A key supporting the OpenAI format created on the API Keys page
Configure
Edit ~/.codex/config.toml:
Set the key environment variable:
- On starting
codex, the welcome info shows your configuredmodel(e.g.gpt-5.6-sol) andproviderbyteseek; /statusconfirms the Base URL points attokens.byteseek.aiand auth passes;- Conversations return normally with no 401 / stream errors.
Verify
A normal reply means you are in. The request's model and charge appear on the usage page.
Remote compaction
The config above sets name in [model_providers.byteseek] to OpenAI rather than ByteSeek — deliberately. It is the switch for Codex's remote compaction.
When a long conversation approaches the context limit, Codex compacts history. Only when the provider's name is exactly OpenAI does Codex prefer the remote compaction endpoint (/v1/responses/compact); remote compaction is higher quality and keeps very long sessions stable without degrading. Any other value (such as ByteSeek) forces local compaction, which is noticeably worse.
nameis only the display name used to trigger remote compaction — keep itOpenAI;- The provider identifier is unaffected:
model_provider = "byteseek"and the[model_providers.byteseek]section name stay as they are; - Changing this setting does not lose existing chat history.
If you also enable the 1M context below, compaction triggers around 900k tokens, where the quality gap of remote compaction matters even more — keep name = "OpenAI".
Enable 1M context
The GPT-5.6 Sol model itself supports a context window of about 1,050,000 tokens, but Codex gives sessions a much smaller budget by default. The configuration below raises the session budget to 1M tokens (method published by Codex engineer Tibo).
Add two lines at the very top of ~/.codex/config.toml — they must sit above every [section] header. TOML assigns keys after a section header to that section, so misplaced keys fail silently:
You can also test once without touching the file:
Verify and mind the cost
- After saving, restart Codex and start a new session, then check the window size with
/status. - Costs rise: upstream bills requests with more than 272k input tokens at a premium (roughly 2× input / 1.5× output). Long context is paid for — everyday tasks rarely need the full window.
With Fast Mode
The Codex desktop app has no priority switch. To route desktop requests through the high-priority lane, set the key's Fast policy to force on — no client changes, see Fast Mode. Cost is roughly 2× regular.