Skip to content
Codex CLI

Coding agents

Use Codex CLI with Shannon

Describe Shannon as a model provider in Codex's config.toml; Codex talks to Shannon's Responses API with its own tools.

  • Tested Nov 7, 2026
  • OpenAI Responses
  • About 3 min

About Codex CLI

Codex CLI is OpenAI's open-source coding agent. It reads your repository, edits files and runs commands in a sandbox, from the terminal or the IDE extension. A custom model provider in ~/.codex/config.toml lets it run on Shannon models through the Responses API, with all of Codex's own tools.

What you need

A Shannon API key
Keys & usage
Base URL
https://api.shannon-ai.com/v1 Endpoint: /v1/responses
Every snippet below follows your choice.

Set it up

  1. Add Shannon as a model provider

    Codex speaks only the Responses API to a custom provider, which Shannon serves. Put this in ~/.codex/config.toml (providers cannot be set per project).

    ~/.codex/config.toml
    model = "Kimi-K3-uncensored-NVFP4"
    model_provider = "shannon"
    model_context_window = 1022976
    
    [model_providers.shannon]
    name = "Shannon"
    base_url = "https://api.shannon-ai.com/v1"
    env_key = "SHANNON_API_KEY"
    wire_api = "responses"
  2. Export the key and start Codex

    env_key names the variable Codex reads the key from.

    Shell
    export SHANNON_API_KEY=YOUR_API_KEY
    codex

Check that it works

Send: Explain what this repository does.

You should see: Codex reads files with its tools and answers; /status shows the Shannon provider and model.

Models that fit Codex CLI

Every id below meets what Codex CLI needs. The first one is the default in the snippets.

Model idContext windowMax outputImage input
Kimi-K3-uncensored-NVFP4 1,022,976 262,144 Yes
Kimi-K3.1-Pro-uncensored-NVFP4 1,022,976 262,144 Yes
MiMo-V2.6-Pro-uncensored-NVFP4 1,022,976 131,072 Yes
Kimi-K3-uncensored-3BIT-REAP 225,280 225,280 Yes
shannon-3 196,608 65,536 Yes

Model settings

Codex CLI asks for these values. They follow the model you picked.

SettingValueWhy
model_context_window 1022976 Codex does not know Shannon ids and warns about fallback metadata without it.

Good to know

  • wire_api = "responses" is required: current Codex has dropped the chat format.
  • Replies are not stored on the server. Codex sends the whole conversation each turn, which is what it does by default.
  • On Linux, Codex runs commands in its own sandbox (bubblewrap). Where the system blocks unprivileged user namespaces, commands and file writes fail inside Codex; that is a local setting, not the API.

Tips

  1. Try another Shannon id without editing the config: codex -m <id>.
  2. Keep one profile per model, [profiles.<name>] with model and model_provider = "shannon", and pick one with codex --profile <name>.
  3. codex exec "…" runs one task without the interactive screen, for scripts and CI jobs.
  4. Type /status in a session to see the provider, the model and the context window Codex is using.

Troubleshooting

SymptomCauseFix
"Model metadata not found" warning Codex has no built-in data for Shannon ids. Set model_context_window; the warning is harmless.
404 Not Found base_url lacks /v1. Use https://api.shannon-ai.com/v1.
400 about previous_response_id A setting asks the server to store replies. Keep Codex's default, which sends the full conversation.
401 Unauthorized The key is missing, mistyped or rotated. Copy the key again from Keys & usage; it starts with sk-.
context_length_exceeded / "prompt is too long" The conversation is longer than the model's window. Start a new chat, let the tool compact it, or pick a model with a larger window.
insufficient_quota Your balance cannot pay for the request. Top up or change plan; the request is not retried by itself.

Questions

Does Codex CLI work with Shannon?

Yes, as a custom model provider on the Responses API at https://api.shannon-ai.com/v1/responses.

Can I set the provider per project?

No: Codex reads providers only from ~/.codex/config.toml.

Choose your language

All languages are equal. Pick the one you want to browse in.

Europe

Middle East & North Africa

South Asia

Southeast Asia

East Asia

Central Asia & Caucasus

Africa

Oceania

Constructed & Classical