Credentials. Your API key is stored on your own machine, so keep the computer and its config backups private.
Who it is forA developer who has an API address and API Key from a provider and wants Codex or Claude Code to use it without editing config files by hand.
The problemSetting up each client by hand means finding the right config files, the right protocol and the right model IDs for each provider.
The outcomeThe provider is saved, the client is configured to use it, and the client restarts into a new conversation with the provider's models.
What you need first
- A desktop computer running Windows, Linux or macOS
- An API address and API Key from your provider
- Codex or Claude Code installed on the same machine
- For building from source: Node.js 20 or newer, Rust 1.89 or newer, and the platform build tools listed in the README
Steps
- Download the installer for your system from the GitHub Releases page, for example uni-switch_0.5.25_x64-setup.exe on Windows x64.
- Open Uni Switch and select Codex or Claude Code on the left. For Claude Code, choose desktop or CLI.
- Click 添加供应商, enter the API address and API Key, then click 添加并使用.
- Restart the client as prompted and start a new conversation to confirm the model and thinking level.
- To switch later, click 使用 on the provider's row.
Prompt for your agent
Using the uni-switch project at github.com/dieqiyun/uni-switch, add a provider with API address <api-address> and the API key stored in <key-env-var>, then confirm the provider appears in use for the chosen client. Expected output: the provider listed as in use, with a note to restart the client and start a new conversation. Verify that the local config backup was created before the change.
Caveat. Claude desktop third-party model support depends on the client's own Gateway support, and a successful build does not mean every client version was tested on real hardware.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for dieqiyun/uni-switch and "Switch Codex and Claude Code to a new API provider"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer