Codex CLI with QuickSilver Pro: setup, models and cost
Add QuickSilver Pro as a model provider in Codex CLI's config.toml, run GPT-6.1 Sol at $2.00 / $10.00 per million tokens or GPT-6 Luna for far less, and see what a small bug fix cost.
Codex CLI is OpenAI's coding agent for the terminal. It talks to the OpenAI Responses API, and its config file lets you add your own model provider. QuickSilver Pro serves the Responses API at https://api.quicksilverpro.io/v1/responses, so Codex runs on it with no wrapper or proxy: one key, prepaid billing, and every model in the catalog that supports the Responses API (68 of them today).
You do not need an OpenAI account or a ChatGPT plan for this. You need a QuickSilver Pro API key from the dashboard. New accounts get $0.05 of free credit. It only covers the starter models (GPT-6 Luna, Claude Haiku 5.5, DeepSeek V4.1 Flash, Qwen3.8 Flash Next and MiMo-V2.6-Flash), but two of those, GPT-6 Luna and DeepSeek V4.1 Flash, work in Codex, so you can check the whole setup before paying anything. GPT-6.1 Sol needs a top-up, from $5.
We tested everything here on 2026-10-27 with Codex CLI 0.164.0.
Setup
Put your key in the environment, so the config file can refer to it without storing it:
export QSP_API_KEY=YOUR_QSP_KEY
Then add a provider to ~/.codex/config.toml (create the file if it does not exist):
model = "gpt-6.1-sol"
model_provider = "quicksilverpro"
[model_providers.quicksilverpro]
name = "QuickSilver Pro"
base_url = "https://api.quicksilverpro.io/v1"
env_key = "QSP_API_KEY"
wire_api = "responses"
base_urlends in/v1. Codex adds/responsesto it.env_keynames the environment variable that holds your key. Codex sends it as a bearer token.wire_api = "responses"is the only value current Codex accepts. Older guides that saywire_api = "chat"no longer work (see below).modelandmodel_providerat the top make QuickSilver Pro the default for every session.
Then run Codex as usual:
codex # interactive, uses the default model
codex -m gpt-6-luna # another model for this session
codex exec -s workspace-write "the tests in test_stats.py fail; fix the bug"
codex exec runs one task without the interactive UI. Its default sandbox is read-only, so give it -s workspace-write when you want it to edit files. Any model ID from the model list that supports the Responses API works with -m.
If you already use Codex with a ChatGPT login and want to keep that setup untouched, give QuickSilver Pro its own config directory instead. Put the same config.toml in, say, ~/.codex-qsp/ and start Codex with:
CODEX_HOME=~/.codex-qsp codex
That is how we ran the tests below: nothing in ~/.codex changed.
Which models to use
| Use | Model | QuickSilver Pro (input / output) |
|---|---|---|
| Default | GPT-6.1 Sol | $2.00 / $10.00 |
| Cheap, and on the free trial | GPT-6 Luna | $0.10 / $0.50 |
| Cheapest | DeepSeek V4.1 Flash | $0.125 / $0.55 |
Prices are per million tokens. GPT-6.1 Sol is the model Codex is built around; GPT-6 Luna is a much cheaper GPT model that still uses Codex's own tool set, and it handled our test task in a third of the time. DeepSeek V4.1 Flash is an open model: Codex does not know it, so it falls back to generic settings (and says so, see below), but it did the job. Other catalog models that list the Responses API can be used the same way; these three are the ones we ran.
What a small fix cost
On 2026-10-27 we gave Codex the same task with each model, in a fresh copy of a two-file Python project: average() divided by len(numbers) - 1, and a test caught it. The prompt was "test_stats.py fails. Find the bug in stats.py and fix it with a minimal edit. Do not change the tests. Run the test afterwards to confirm." We ran codex exec -s workspace-write. A run passed if the test passed afterwards. Token counts are what the API reported; the cost is what QuickSilver Pro charged for those requests.
| Model | Passed | Requests | Input tokens (cached) | Output tokens | Time | Cost |
|---|---|---|---|---|---|---|
| GPT-6.1 Sol | yes | 5 | 66,172 (52,637) | 279 | 62 s | $0.042 |
| GPT-6 Luna | yes | 6 | 75,572 (62,617) | 524 | 20 s | $0.0025 |
| DeepSeek V4.1 Flash | yes | 3 | 35,055 (29,056) | 294 | 8 s | $0.0013 |
All three read the files, made the same one-line edit, ran the test and reported that it passed. This is one run per model on a deliberately easy bug, so read it for the order of magnitude, not as a ranking. What the numbers show:
- Codex sends about 12,000 to 13,000 tokens before it reads any of your code: its instructions and tool definitions, on every request. From the second request on, that prefix is served from the prompt cache at a tenth of the input price.
- The first request is the expensive one. With GPT-6.1 Sol it cost $0.033 of the $0.042 total, because writing the prefix to the cache is billed at slightly more than normal input. The four requests after it cost about $0.002 each.
- GPT-6 Luna did the same work for about a seventeenth of the price. On harder tasks the gap in quality will matter more than it did here; we did not compare them on harder work.
Each request also shows up in your dashboard with its model, tokens and cost.
Things we ran into
Model metadata for 'deepseek-v4.1-flash' not found. Defaulting to fallback metadata; this can degrade performance and cause issues.Codex prints this for any model it does not have built-in settings for. It is a warning, not an error: the DeepSeek run above went through it and passed. The GPT models did not trigger it.wire_api = "chat"is no longer supported. Current Codex only speaks the Responses API to custom providers. Usewire_api = "responses".unknown configuration field 'preferred_auth_method'. Some older configs includepreferred_auth_method = "apikey". Codex 0.164.0 ignores it, but--strict-configrefuses to start with it. You do not need it:env_keyis enough.Reading additional input from stdin...codex execprints this whenever stdin is not a terminal, as in scripts and CI, because anything piped in is appended to the prompt. With nothing piped in it is harmless; we ran every test above with< /dev/null.I couldn't edit stats.py: the workspace is read-only.That iscodex execwithout-s workspace-write. It still tells you the fix, but does not make it.- Reasoning effort is chosen by Codex. In our runs it asked GPT-6.1 Sol for
loweffort and GPT-6 Luna formedium. To change it, addmodel_reasoning_effort = "high"toconfig.tomlor pass-c model_reasoning_effort="high". More effort means more output tokens, and output is the expensive side.
Using Claude Code instead? See Claude Code with QuickSilver Pro. OpenCode or Crush? See Use QuickSilver Pro in OpenCode and Crush. Calling models from your own code? The quickstart and integrations pages cover the SDKs.