BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills

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/models

1. 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

{
  "env": {
    "ANTHROPIC_API_KEY": "YOUR_BAZAARLINK_API_KEY",
    "ANTHROPIC_BASE_URL": "https://api.bazaarlink.ai",
    "ANTHROPIC_MODEL": "claude-sonnet-4.6",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4.6",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4.6"
  }
}

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

model_provider = "custom"
model = "gpt-5.3-codex"
model_reasoning_effort = "high"
disable_response_storage = true

[model_providers.custom]
name = "BazaarLink"
base_url = "https://api.bazaarlink.ai"
wire_api = "responses"
requires_openai_auth = true

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-codex

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.

Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.