Fix stale Claude model discovery setting - #445
Merged
lilly-luo merged 5 commits intoSep 2, 2026
Merged
Conversation
lilly-luo
force-pushed
the
lilly-luo_data/stack/fix-claude-model-discovery-state
branch
from
September 2, 2026 02:23
30400ea to
ce72b71
Compare
lilly-luo
force-pushed
the
lilly-luo_data/stack/fix-claude-model-discovery-state
branch
from
September 2, 2026 02:27
ce72b71 to
3f2c822
Compare
lilly-luo
marked this pull request as ready for review
September 2, 2026 02:30
# Conflicts: # tests/test_agent_claude.py
…model-discovery-state' into stack/fix-claude-model-discovery-state
lilly-luo
commented
Sep 2, 2026
andy-xu-db
approved these changes
Sep 2, 2026
lilly-luo
enabled auto-merge (squash)
September 2, 2026 14:57
lilly-luo
disabled auto-merge
September 2, 2026 14:57
lilly-luo
deleted the
lilly-luo_data/stack/fix-claude-model-discovery-state
branch
September 2, 2026 14:57
andy-xu-db
added a commit
that referenced
this pull request
Sep 2, 2026
Reconcile PR #445 (launch-scoped, never-persisted CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY) with this branch's removal of the Anthropic model-discovery proxy: - launch(): first_prompt_routing goes straight to smart_routing_v2.launch_claude (no proxy); the discovery branch sets CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY in the process env and falls through to the direct gateway launch instead of the proxy. - tests: keep test_gateway_discovery_uses_direct_gateway and add the launch-scoped discovery-flag assertion; drop the two proxy-based tests. Co-authored-by: Isaac <no-reply@databricks.com>
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.
problem: if i ran
--enable-model-discoveryor--enable-smart-routingat any point, then CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY env var gets set to 1.However, it does not get pruned later if i run
ucode claudewithout --enable-model-discovery. as such, once you enable model discovery, it's basically enabled forever.this PR
1/ prunes CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY if --enable-model-discovery or --enable-smart-routing is not set
2/ avoids setting the env var in settings.json if the flags are passed
test:
ucode claude --enable-model-discoverystill worksucode claude --enable-model-discoverystill works but when i close, the settings.json does not leave behind CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1ucode claude --enable-smart-routingstill worksucode claude --enable-smart-routingstill works but when i close, the settings.json does not leave behind CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1