Skip to content

fix: add model tier mappings and disable experimental betas#100

Merged
mpkrass7 merged 1 commit into
datasciencemonkey:mainfrom
dgokeeffe:fix/claude-settings-model-tiers
Apr 8, 2026
Merged

fix: add model tier mappings and disable experimental betas#100
mpkrass7 merged 1 commit into
datasciencemonkey:mainfrom
dgokeeffe:fix/claude-settings-model-tiers

Conversation

@dgokeeffe
Copy link
Copy Markdown
Contributor

Summary

  • Adds ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL to Claude settings so model tier switching works correctly through the Databricks AI Gateway
  • Adds CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 to prevent 400 errors from the gateway rejecting experimental cache_control.scope fields
  • Updates default ANTHROPIC_MODEL from databricks-claude-sonnet-4-6 to databricks-claude-opus-4-6

Context

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 unknown scope field with:

API Error: 400 {"message":"system.2.cache_control.ephemeral.scope: Extra inputs are not permitted"}

Files changed

  • app.py — runtime settings written during token rotation
  • setup_claude.py — initial settings written at app startup

Test plan

  • Deploy to a Databricks workspace and verify Claude Code starts without the 400 error
  • Verify model tier switching works (e.g. subagent spawning with haiku/sonnet)

This pull request was AI-assisted by Isaac.

… 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
@mpkrass7
Copy link
Copy Markdown
Collaborator

mpkrass7 commented Apr 7, 2026

@dgokeeffe can you confirm you deployed to a workspace and you were able to use the anthropic models?

@dgokeeffe
Copy link
Copy Markdown
Contributor Author

image Find screenshot attached @mpkrass7

@mpkrass7 mpkrass7 self-requested a review April 8, 2026 12:12
@mpkrass7 mpkrass7 merged commit 3e7712f into datasciencemonkey:main Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants