Repository navigation
Conversation
`ug configure` already writes `CLAUDE_CODE_USE_BEDROCK`/`CLAUDE_CODE_USE_VERTEX` blank into the managed settings when a workspace publishes an agent configuration. Move the two blanks into the shared Claude env builder so the self-configured path (managed file and ucode-settings.json) gets them too, keeping a stale provider switch in the shell or user settings from routing around the gateway. The managed file settles them like the credential blanks: added by an explicit `ug configure`, preserved as found by plain launches, and a value someone else set is kept with a warning. 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.
Summary
CLAUDE_CODE_USE_BEDROCK/CLAUDE_CODE_USE_VERTEXin a developer's shell or user settings routes Claude Code around Unity Gateway and fails against the provider (e.g. a Bedrock 400 for an invalid model id). Published workspace configs already blank both switches in the managed settings.ug configure's managed file, inucode-settings.json(includingUG_SKIP_OS_SETTINGS/--userruns and relayed launches), and through the published path unchanged. In the managed file the blanks settle like the credential blanks: an explicitug configurewrites them, plain launches keep the file as found, and a value someone else set is kept with a warning.Testing
uv run pytest tests/test_claude_credential_blanks.py tests/test_ownership.py tests/test_published_agent_config.py(126 passed) — extended to assert both blank flags in the overlay, both files, skip mode, relayed launches, and revertuv run pytest tests/test_agent_claude.py tests/test_published_agent_config.py tests/test_claude_header_mod.py tests/test_managed_files.py tests/test_configure_managed_writes.py tests/test_managed_config.py tests/test_managed_resolve.pyuv run pytest tests/(full unit suite, minus two env-gated otel metrics files: 9225 passed; 12 failures and the skips reproduce on unmodified main in this environment)ruff check+ruff format --check+tyon the changed filesHOME,CLAUDE_CODE_USE_BEDROCK=1in user settings unless noted)ug configure --global: no provider switches in the managed file, andclaude -pfails with the Bedrock 400claude -preaches Unity Gateway, and so doug claude, the switch set in the shell instead, andCLAUDE_CODE_USE_VERTEX=1in user settingsug revertrestores the original managed file byte for byteclaude -preaches Unity GatewayCLAUDE_CODE_USE_BEDROCK=1: plainug configurekeeps it and warns (still the Bedrock 400); a published config replaces itThis pull request and its description were written by Isaac.