Skip to content

detect conflicting env keys set by enterprise settings - #250

Open
asujithan wants to merge 2 commits into
mainfrom
asujithan/claude-enterprise-debug
Open

detect conflicting env keys set by enterprise settings#250
asujithan wants to merge 2 commits into
mainfrom
asujithan/claude-enterprise-debug

Conversation

@asujithan

Copy link
Copy Markdown
Collaborator

Adds warning message when default models are set in the managed/enterprise settings which would override what's in ucode-settings. Blocking error is thrown if ANTHROPIC_BASE_URL or ANTHROPIC_CUSTOM_HEADERS is set in the managed settings since that will prevent claude terminal from being started with Claude Max/Enterprise subscription.

@asujithan
asujithan requested a review from AarushiShah-db July 28, 2026 21:58
Comment thread src/ucode/agents/claude.py Outdated
Comment on lines +162 to +166
"ANTHROPIC_DEFAULT_OPUS_MODEL",
"ANTHROPIC_DEFAULT_SONNET_MODEL",
"ANTHROPIC_DEFAULT_HAIKU_MODEL",
"ANTHROPIC_DEFAULT_FABLE_MODEL",
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to include these? shouldn't ANTHROPIC_MODEL be sufficient, because that is the one that we launch with?

Comment thread src/ucode/agents/claude.py Outdated
"auth — you'd be billed for API usage instead of using your subscription. "
"Remove the 'apiKeyHelper' from that file (or ask your admin to) before "
"running relayed auth. Not starting Claude Code."
"Enterprise managed settings is present, which Claude Code always "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Enterprise managed settings is present, which Claude Code always "
"Enterprise managed settings are present, which Claude Code always "

Comment thread src/ucode/agents/claude.py Outdated
Comment on lines +857 to +859
f"Default models {models} are set in your enterprise managed settings "
f"({managed_path}). Remove those keys if the default models are deprecated."
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about

f"Default models {models} are set in your enterprise-managed settings "
f"({managed_path}) and may override ucode settings. Remove these entries if "
f"you encounter issues."

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