feat(litellm): add support for local proxy without API key#46
feat(litellm): add support for local proxy without API key#46vinit13792 wants to merge 2 commits intorepowise-dev:mainfrom
Conversation
|
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. |
|
Yup makes sense! Updated! Ready for you to merge the code. |
|
Code looks good, the comment is in place. Just needs a rebase on main to resolve conflicts, a few PRs landed since this was opened. Once that's clean I'll merge right away. |
- 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>
… false positives Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Rebased on latest \main\ and resolved a merge conflict in \litellm.py\ (import |
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