Require Claude Code 2.1.248 and remove gateway auth workaround - #413
Require Claude Code 2.1.248 and remove gateway auth workaround#413andy-xu-db wants to merge 7 commits into
Conversation
| if not smart_routing: | ||
| os.environ["OAUTH_TOKEN"] = get_databricks_token(workspace, state.get("profile")) |
There was a problem hiding this comment.
why do you need this? should be orthogonal to smart routing right?
There was a problem hiding this comment.
ah you're right this can be removed
|
the model discovery proxy is now completely separate from the relayed auth proxy now right? model discovery is responsible for patching the model name where as relayed auth swaps headers. in that case, i think it makes sense to fully decouple them. |
makes sense, i updated it so model discovery and relayed auth use separate proxies now |
…-248 # Conflicts: # src/ucode/anthropic_model_discovery_proxy.py
Summary
apiKeyHelperas the only credentialANTHROPIC_AUTH_TOKENand stop creating a refresh cache for native gateway model discoveryTesting
uv run pytest tests/test_agent_claude.py tests/test_anthropic_model_discovery_proxy.py tests/test_gateway_proxy.py -q(167 passed)uv run pytest tests/test_lint.py -q(3 passed)uv run ruff check .Live end-to-end verification
Verified on
eng-ml-inference-stagingwith Claude Code 2.1.251:ucode claude --enable-model-discovery --skip-preflightlaunched through the PR model-alias proxyANTHROPIC_BASE_URLand had noANTHROPIC_AUTH_TOKEN/modeldisplayed gateway models (system.ai.claude-sonnet-4-6[1m],system.ai.claude-haiku-4-5, plus 13 more), proving/v1/modelsauthenticated viaapiKeyHelperUCODE_PR_413_OKwith exit code 0Local full-suite note: the locally installed Claude Code 2.1.251 returned a canned response in
TestClaudeUserAgent::test_user_agent_arrives_at_gatewaywithout contacting its localhost capture server; the same test passed in GitHub CI.