feat(litellm): add support for local proxy without API key#46
Open
vinit13792 wants to merge 2 commits intorepowise-dev:mainfrom
Open
feat(litellm): add support for local proxy without API key#46vinit13792 wants to merge 2 commits intorepowise-dev:mainfrom
vinit13792 wants to merge 2 commits intorepowise-dev:mainfrom
Conversation
- Add litellm to interactive provider selection menu - Support LITELLM_BASE_URL for local proxy deployments (no API key required) - Auto-add openai/ prefix when using api_base for proper LiteLLM routing - Add dummy API key for local proxies (OpenAI SDK requirement) - Add validation and tests for litellm provider configuration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
This is clean. The sk-dummy workaround is exactly what the LiteLLM docs recommend for local proxies, and the openai/ prefix auto-add is the right UX touch. 14 tests is solid coverage. One small request before merge: add a comment next to the sk-dummy value so it does not trip future secret-scanning tools: # LiteLLM requires a non-empty key even for unauthenticated local proxies (OpenAI SDK requirement)
call_kwargs["api_key"] = "sk-dummy"This appears in two places in litellm.py (_generate_with_retry and stream_chat). Once that comment is added, I am ready to merge. |
… false positives Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Yup makes sense! Updated! Ready for you to merge the code. |
shasaxena-equinix
approved these changes
Apr 7, 2026
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
LITELLM_BASE_URLfor local proxy deployments (no API key required)openai/prefix when usingapi_basefor proper LiteLLM routingChanges
CLI (
packages/cli)_PROVIDER_ENVand_PROVIDER_SIGNUPinui.py_detect_provider_status()to check forLITELLM_BASE_URLinteractive_provider_select()to skip API key prompt for local proxyhelpers.pyresolve_provider()andvalidate_provider_config()Core (
packages/core)LiteLLMProviderto auto-addopenai/prefix whenapi_baseis setsk-dummy) for local proxy without authenticationTests
tests/unit/cli/test_helpers.pytests/unit/test_providers/test_litellm_provider.pywith 14 testsTest Plan
🤖 Generated with Claude Code