Codex + DeepSeek
Give Codex a flat-rate DeepSeek provider.
Codex supports named Responses API providers. Add camelStream once, keep the key in your environment, and launch Codex with a dedicated Stream profile.
Why this setup
Keep the agent. Change the inference bill.
Native Responses transport
Codex talks directly to Stream's Responses API instead of relying on a compatibility shim or plugin.
A separate provider profile
The Stream profile leaves your normal OpenAI provider and unrelated Codex settings in place.
Built for coding loops
Repository exploration and repeated tool calls use flat-rate Stream capacity rather than a token meter.
Configuration
Connect Codex to Stream.
1. Export your Stream key
Set CAMEL_API_KEY in the shell that launches Codex. Keep the raw key out of your TOML files.
2. Add the provider and profile
Register camel_stream in ~/.codex/config.toml, then create ~/.codex/camel-stream.config.toml with the Stream model selection.
3. Launch the Stream profile
Run codex --profile camel-stream in a test repository. Codex will use Stream's /v1/responses endpoint.
# Add to ~/.codex/config.toml
[model_providers.camel_stream]
name = "camelStream"
base_url = "https://stream.camelai.com/v1"
env_key = "CAMEL_API_KEY"
wire_api = "responses"
# Create ~/.codex/camel-stream.config.toml
model = "deepseek-v4-flash"
model_provider = "camel_stream"Troubleshooting
Check these details first.
Most connection issues come down to the endpoint, API mode, model ID, or key. Start with these checks.
The Codex base URL includes /v1: https://stream.camelai.com/v1.
Set wire_api to responses, not chat or chat_completions.
Put the provider in your user Codex config; project-level provider settings are ignored.
If authentication fails, confirm CAMEL_API_KEY is available in the same shell that starts Codex.
Frequently asked questions
Before you connect.
More coding-agent guides
Use Stream with another agent.
Give your coding agent room to work.
DeepSeek V4 Flash through an OpenAI-compatible API with unlimited token usage for one fixed monthly price.
Get your API key