feat(cli): Add LiteLLM as a first-class provider#10840
Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
Draft
feat(cli): Add LiteLLM as a first-class provider#10840roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
- Add "litellm" to supportedProviders in types.ts - Add litellmBaseUrl to FlagOptions type - Add LITELLM_API_KEY to environment variable mapping - Add litellm case to getProviderSettings function - Add --litellm-base-url CLI flag with default http://localhost:4000 - Add litellmBaseUrl to ExtensionHostOptions interface - Add support for LITELLM_BASE_URL environment variable - Add tests for LiteLLM provider functionality - Update README with LiteLLM documentation Closes #10839
2 tasks
Contributor
Author
Review complete. No issues found. This PR cleanly implements LiteLLM as a first-class provider with proper type safety, environment variable handling, and comprehensive test coverage. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved 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.
This PR attempts to address Issue #10839 by adding LiteLLM as a first-class provider in the Roo Code CLI.
Summary
LiteLLM already has backend support in the core types package, but the CLI did not expose it as a first-class provider. This implementation updates the CLI to support LiteLLM with the following changes:
Changes
New Provider Support
"litellm"to thesupportedProvidersarray inapps/cli/src/types/types.tslitellm: "LITELLM_API_KEY"to the environment variable mappingNew CLI Flag
--litellm-base-url <url>flag for specifying the LiteLLM endpointhttp://localhost:4000when using litellm providerEnvironment Variables
LITELLM_API_KEY- API key for LiteLLMLITELLM_BASE_URL- Base URL for LiteLLM endpoint (optional)Provider Settings
Added support in
getProviderSettings()for:litellmApiKeylitellmModelIdlitellmBaseUrlDocumentation
Updated CLI README with LiteLLM provider documentation including:
--litellm-base-urloption in the Options tableTests
Added tests for:
getApiKeyFromEnvwith litellm providergetProviderSettingswith LiteLLM-specific settingsUsage Examples
Closes #10839
Feedback and guidance are welcome!
Important
Add LiteLLM as a first-class provider in the CLI, updating provider settings, CLI options, and environment variables, with tests to ensure functionality.
"litellm"tosupportedProvidersintypes.ts.litellm: "LITELLM_API_KEY"inprovider.ts.getProviderSettings()inprovider.tsto handlelitellmwithapiKey,model, andbaseUrl.--litellm-base-url <url>option inindex.tsandrun.ts.litellmBaseUrltohttp://localhost:4000if not provided.LITELLM_API_KEYandLITELLM_BASE_URLinREADME.md.getApiKeyFromEnvandgetProviderSettingswithlitellminprovider.test.ts.This description was created by
for 103d436. You can customize this summary. It will automatically update as commits are pushed.