feat: LiteLLM endpoint toggle in settings - #46
Merged
Conversation
Add an enable/disable toggle for the Anthropic API override in the settings panel. When disabled, new sessions use the default Anthropic endpoint instead of the custom LiteLLM proxy URL. - Server: `anthropicOverrideEnabled` flag in AppSettings — buildEnv() only injects ANTHROPIC_BASE_URL/AUTH_TOKEN when flag is not false (defaults to true for backward compat) - API: GET/PUT /api/settings now includes the toggle state - Dashboard: Toggle switch in settings panel header — immediately saves on click. URL/token fields dim when override is disabled but values are preserved for easy re-enable. Workflow: toggle off → restart all sessions → Claude uses direct API. Toggle on → restart → uses LiteLLM again. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nox-0x
approved these changes
Mar 23, 2026
nox-0x
left a comment
Collaborator
There was a problem hiding this comment.
Clean, focused implementation. The !== false default-true pattern is consistent across both maskSettings and sessions.ts, maintaining full backward compatibility for existing users who have override values already configured. Toggle saves immediately and fields stay dimmed-but-preserved on disable — exactly right. No critical issues.
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
Add an enable/disable toggle for the Anthropic API override in the settings panel. Lets you quickly switch between LiteLLM proxy and direct Anthropic API when LiteLLM has downtime.
How it works
ANTHROPIC_BASE_URLandANTHROPIC_AUTH_TOKENare injected into new sessions from settingsTest plan
🤖 Generated with Claude Code