CC Switch + BazaarLink Configuration Guide
CC Switch lets you save and switch provider configurations for coding tools. This guide covers the two BazaarLink paths that matter here: Claude Code and Codex.
Before you begin
Create a BazaarLink API key, keep it local, and use the live model catalog when you want to change the examples below. The base URL in the CC Switch fields is the same for both paths.
Base URL: https://api.bazaarlink.ai
Model catalog: https://bazaarlink.ai/api/v1/models1. Add BazaarLink for Claude Code
In CC Switch, select Claude Code, click +, choose App-specific Provider, and select Custom when BazaarLink is not shown in the preset list. Paste the JSON below into the provider configuration, replace the key placeholder locally, then save.
Claude Code fields
Enable the provider
Click Enable on the saved BazaarLink provider card. CC Switch documents Claude Code as taking effect immediately after the switch; no terminal restart is required. The deep-link importer writes the URL key into ANTHROPIC_AUTH_TOKEN, while the manual Custom configuration above uses ANTHROPIC_API_KEY.
2. Add BazaarLink for Codex
In CC Switch, select Codex, click +, choose App-specific Provider, and select Custom. Codex keeps the key in auth.json and the model/provider settings in config.toml, so enter the two blocks separately.
~/.codex/auth.json
{
"OPENAI_API_KEY": "YOUR_BAZAARLINK_API_KEY"
}~/.codex/config.toml
Enable and restart the terminal
Click Enable on the saved provider card. CC Switch documents that Codex needs a terminal restart after switching: close the current terminal window and open a new one before running Codex.
3. Use a current model ID
The model catalog is the source of truth. Fetch it before changing a model, then copy the full id exactly into ANTHROPIC_MODEL, the Claude role fields, or model in config.toml.
curl -sS https://bazaarlink.ai/api/v1/models | jq -r '.data[].id'Verified examples used above
claude-sonnet-4.6
claude-haiku-4.5
claude-opus-4.6
gpt-5.3-codex4. One-click import
CC Switch's verified provider importer accepts ccswitch://v1/import?resource=provider links. Replace the key placeholder locally before opening a link, and never publish or share a completed link because the apiKey value is part of the URL.
Claude Code
ccswitch://v1/import?resource=provider&app=claude&name=BazaarLink&homepage=https%3A%2F%2Fbazaarlink.ai&endpoint=https%3A%2F%2Fapi.bazaarlink.ai&apiKey=YOUR_BAZAARLINK_API_KEY&model=claude-sonnet-4.6Codex
ccswitch://v1/import?resource=provider&app=codex&name=BazaarLink&homepage=https%3A%2F%2Fbazaarlink.ai&endpoint=https%3A%2F%2Fapi.bazaarlink.ai&apiKey=YOUR_BAZAARLINK_API_KEY&model=gpt-5.3-codexOpen the link on a device where CC Switch is installed, review the import confirmation, and confirm it. Then use Enable in CC Switch; follow the Codex terminal-restart step above when importing the Codex provider.
5. Troubleshooting
Authentication error
Replace YOUR_BAZAARLINK_API_KEY with the key on your own machine. Do not put a real key in a guide, repository, screenshot, or shared deep link.
Model rejected
Fetch https://bazaarlink.ai/api/v1/models and copy an id exactly, including punctuation. A model name that is not in the current response is not a valid example for this setup.
Codex still uses the old provider
After enabling the provider, close the current terminal and open a new one. CC Switch documents a terminal restart for Codex switches.