Codex Desk / API provider change
Switch Codex API provider. Keep your project history.
Your old API gateway is unavailable, or you want the next task to use another endpoint and model. Carry reviewed project evidence into a new native conversation and keep the original thread as your record.
Python 3.11+ · Existing configured Codex CLI · Responses-compatible target API
Native integration exercised with CLI 0.171.0 on Linux
New to Desk? Follow the current installation instructions, launch codex-desk in that environment, and open its printed local URL. See the existing illustrated task walkthrough.
- ChooseResume or new provider
- ReviewEvidence + next goal
- VerifyOne own-project task
- ReturnThe new saved thread
1. Restart, or change provider?
Same provider, same conversationReopen the saved session.
Continue the same native thread.
New API provider, reviewed handoffRead saved evidence.
Start a distinct native thread.
If you only restarted Desk, choose the same named, previously used session. To find older work, choose Open a project, enter its exact saved folder, keep Current Codex settings, then Find existing sessions and resume the matching title. Full find-and-resume steps.
A same-thread resume uses the selected current settings; the recorded source provider is history metadata. For an intentional provider change, use the reviewed-handoff route below so the original conversation stays separate.
2. Save the target endpoint and model locally.
Choose Add API provider. Your existing provider key is enough. Enter an unused Profile name, the provider’s exact API base URL, the Model ID enabled for your key, and your API key. Click Save local profile.
- Base URL: the API root before
/responses; include/v1only when the provider requires that prefix. - Protocol: Desk’s form writes
wire_api = "responses". Choose a provider with Responses support. - Model: copy the exact ID your provider makes available to this key or token group.
The form creates new-router.config.toml in the selected CODEX_HOME for a profile named new-router, normally ~/.codex/new-router.config.toml. The key is stored in that local file, with mode 0600 on Linux. Desk sends provider overrides to native Codex through private stdin and keeps your main config/auth files and source rollout intact.
Confirm the saved values in Open a project: select the new profile and read its provider, model and endpoint below the selector. Then cancel. The handoff’s Next provider selector shows profile names.
Exact profile shape written by the local form
These placeholders illustrate the released profile writer. Enter your actual values in Desk’s local form:
model = "YOUR_PROVIDER_MODEL_ID"
model_provider = "desk_provider"
[model_providers.desk_provider]
name = "new-router"
base_url = "https://your-provider.example/v1"
wire_api = "responses"
experimental_bearer_token = "YOUR_EXISTING_API_KEY"
An existing same-name file is kept. To update an existing Desk profile, choose Manage API profiles → Edit profile. Leave the key blank to keep it, or enter a replacement to rotate it. Relaunch Desk before using changed settings in already-loaded native sessions. Custom native files remain editable in your Codex home; an env_key profile needs its key variable in the shell that launches Desk.
Optional account sources: CometAPI signup (affiliate link) · 88API signup (affiliate link). Blucca can earn a commission through these links. Use each provider’s CometAPI or 88API Codex setup documentation for current endpoint and model access.
3. Review the evidence before the new task.
- Choose Browse existing Codex sessions and search part of the saved title. Beside the source conversation, choose Review handoff. This reads local history without resuming the old task. From an already-open session, use Continue with another provider.
- Check the Project folder, then select the target profile you verified under Next provider.
- Edit Goal / current request, Completed and Remaining / constraints in the handoff. Retain the useful command output, exit codes, file changes and MCP results; remove irrelevant or sensitive text before sending it to the target API.
Review the evidence budget too.
The prefilled handoff uses a 24,000-character budget, keeping recent readable items in their original order. Its ending reports omitted items; an oversized item has a shortening marker. The textarea is editable: trim it to the next task, or add an essential earlier result you checked. Encrypted reasoning is not carried into the new thread.
Reviewing the handoff runs no model turn and does not ask the old provider to compact the thread. See the existing handoff-review panel.
4. Run one verification task in your own project.
For What should Codex do next?, use this small first goal:
Find this project's verification command in README, run it, and report the exact command, output and exit status. Do not install dependencies or edit files.
Click Start new native conversation when the goal, evidence, folder and target profile are ready. This creates a distinct native thread and starts the goal immediately. Review any native command approval, then check the actual command output and exit status alongside the answer.
Check the new session’s provider/model binding, and use Rename session to give it a recognizable name, such as API switch — project verification. Keep the original conversation available as the source record.
5. Reopen the new conversation.
After the task finishes, close the browser, reopen Desk’s printed URL while its terminal is running, and choose the new named session. Confirm the verification output is still there. Closing the page leaves the backend running; Ctrl+C stops Desk and its owned native tasks.
Next time, activate the same installation environment and run codex-desk. Reuse your original --codex, --codex-home and --state-dir arguments if supplied. The saved, used session resumes its new native thread; the original source conversation remains a separate session in local history.
Bring the next task or the step that blocked it.
Get help with one provider-switch task
Include your CLI version, operating system, project task and step reached. Say whether the verification task finished and you reopened the new session. For a failure, include a short redacted error and the step: profile setup, history read, handoff start, task, or return.