fix: add model tier mappings and disable experimental betas#100
Merged
mpkrass7 merged 1 commit intoApr 8, 2026
Merged
Conversation
… settings The Databricks AI Gateway proxy rejects experimental API fields like cache_control.scope that newer Claude Code versions send. Also adds ANTHROPIC_DEFAULT_*_MODEL env vars so Claude Code correctly maps its internal model tiers (opus/sonnet/haiku) to Databricks endpoint names. Co-authored-by: Isaac
Collaborator
|
@dgokeeffe can you confirm you deployed to a workspace and you were able to use the anthropic models? |
Contributor
Author
Find screenshot attached @mpkrass7
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
ANTHROPIC_DEFAULT_OPUS_MODEL,ANTHROPIC_DEFAULT_SONNET_MODEL,ANTHROPIC_DEFAULT_HAIKU_MODELto Claude settings so model tier switching works correctly through the Databricks AI GatewayCLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1to prevent 400 errors from the gateway rejecting experimentalcache_control.scopefieldsANTHROPIC_MODELfromdatabricks-claude-sonnet-4-6todatabricks-claude-opus-4-6Context
Newer Claude Code versions send
cache_control: { type: "ephemeral", scope: "..." }on system messages as an experimental beta feature. The Databricks AI Gateway proxy uses strict validation and rejects the unknownscopefield with:Files changed
app.py— runtime settings written during token rotationsetup_claude.py— initial settings written at app startupTest plan
This pull request was AI-assisted by Isaac.