Disable Claude Code thinking to unblock Opus 4.7 gateway calls#102
Disable Claude Code thinking to unblock Opus 4.7 gateway calls#102jxk590 wants to merge 1 commit into
Conversation
Claude Code sends `thinking.type=enabled` on outbound requests, which the Databricks AI Gateway rejects for adaptive-only models (Opus 4.7 family) with a 400. The gateway expects `thinking.type=adaptive` + `output_config.effort`. Claude Code does support that shape but only when its model-name pattern matches a known Anthropic id — the gateway exposes models as `databricks-claude-opus-4-7`, so the prefix throws off detection and Claude Code falls back to the legacy `enabled` shape. The result: `ucode claude` validation fails and the config is reverted. Set `CLAUDE_CODE_DISABLE_THINKING=1` in the Claude Code env block so the field is omitted entirely. The gateway still applies adaptive reasoning server-side on Opus 4.7 (where it's mandatory), so reasoning quality is preserved on the new family. Older models lose client-side extended thinking through the gateway, which is the correct tradeoff for a configuration that actually works end-to-end.
|
@jxk590 I'm not able to reproduce the original issue - can you please share a detailed repro of how you came across this issue? |
|
@AarushiShah-db I received a 400 error when attempting to run ✔ Databricks auth already available for https://adb-xxxxxxxxxxxxxxxxxxx.x.azuredatabricks.net |
Claude Code sends
thinking.type=enabledon outbound requests, which the Databricks AI Gateway rejects for adaptive-only models (Opus 4.7 family) with a 400. The gateway expectsthinking.type=adaptive+output_config.effort. Claude Code does support that shape but only when its model-name pattern matches a known Anthropic id — the gateway exposes models asdatabricks-claude-opus-4-7, so the prefix throws off detection and Claude Code falls back to the legacyenabledshape. The result:ucode claudevalidation fails and the config is reverted.Set
CLAUDE_CODE_DISABLE_THINKING=1in the Claude Code env block so the field is omitted entirely. The gateway still applies adaptive reasoning server-side on Opus 4.7 (where it's mandatory), so reasoning quality is preserved on the new family. Older models lose client-side extended thinking through the gateway, which is the correct tradeoff for a configuration that actually works end-to-end.