If your Allowed Headers are already set to
*, you can skip this note. If not and you face issues integrating Bifrost
with Claude Code, try switching to * or adding the specific headers required by your client. By default, Bifrost
whitelists: Content-Type, Authorization, X-Requested-With, X-Stainless-Timeout, and X-Api-Key.To install Claude code
Configuring Claude Code to work with Bifrost
To avoid getting into different caching issues of Claude code -
- Ensure there is no
modelfield insettings.json. If it’s present remove it. This overwrites theenvmodel selection. - Once you update the
settings.json, start claude, and execute /logout. And restart - select use API key even if its not recommended.
- Update settings.json
settings.json is placed in your home folder.
- macOS / Linux / WSL (User Global):
~/.claude/settings.json - Windows (User Global):
%USERPROFILE%\.claude\settings.json - Project-Specific:
.claude/settings.json(located within your individual project’s root directory) - Local Overrides:
.claude/settings.local.json(also in the project root, used for personal preferences that aren’t shared via Git)
settings.json.
1. Using alias
- Add following routing rules in Bifrost
sonnet-model route
- Keep it a global level and assign priority you want to assign
- Add model condition as
model=sonnet-model. This option is not available out of the box - so type this string and selectCreate sonnet-model - And add second header condition; to check if the
user-agentstarts withclaude-cli. - And then you can map this model to any model you want. In the configuration given - we are using
vertex/claude-sonnet-4-6.

haiku-model route
- Repeat the above steps by replacing
sonnet-modelwithhaiku-model.
- Update
settings.json
The JSON snippets below show only the
env key. Merge them into your existing settings.json top-level
object — do not paste them as a standalone file, or you will overwrite other settings like permissions,
model, and apiKeyHelper.2. Using provider-specific model pinning
Anthropic
Updatesettings.json to pick Anthropic models. For Anthropic models, you don’t need to prefix models with provider name.
Bedrock
Updatesettings.json to pick Anthropic models on Bedrock.

Vertex
Updatesettings.json to pick Anthropic models on Vertex.
Azure
Updatesettings.json to pick Anthropic models on Azure.

Model Configuration
Claude Code uses three model tiers: Sonnet (default), Opus (complex tasks), and Haiku (fast, lightweight). With Bifrost, you can override these defaults to use any model from any provider. Start with a Specific Model: Launch Claude Code with a specific model using the--model flag:
Switching Models Mid-Session
Use the/model command to switch models during an active session:
Provider Compatibility
Checklist
- Ensure the model selected is same as you configured in the
settings.json.

- Select model using /config
- Execute
/config - Search for model
- Select the correct model

- Or pass the model using
/model <model_name>e.g.,/model sonnet-model

