Add LiteLLM provider for 100+ LLM provider support - #9
Open
RheagalFire wants to merge 2 commits into
Open
Conversation
Adds litellm as a new model type alongside openai, anthropic, google, ollama, and xai. Users can now test any of 100+ LLM providers through a single unified interface using --target-model-type litellm.
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
Adds LiteLLM as a new model type (
--target-model-type litellm), giving promptmap access to 100+ LLM providers (AWS Bedrock, Azure, Google Vertex AI, Mistral, Cohere, etc.) through a single unified interface.Changes
promptmap2.py- Addedlitellmas a valid--target-model-typeand--controller-model-typechoice. Implementedlitellm.completion()call path intest_prompt(), following the same pattern as existing providers. Skipped API key validation (provider keys resolved by litellm SDK).initialize_clientreturnsNone(litellm manages its own client).requirements.txt- Addedlitellm>=1.60,<2.0tests/test_litellm.py- 7 unit tests covering API key validation, client init, completion call params, model validation, and CLI argsREADME.md- Added LiteLLM to features list, usage examples, and API key docsTests
1. Unit tests (7/7 passing):
2. Live E2E against Anthropic via LiteLLM SDK:
Example usage
Set the provider's standard API key env var (e.g.
ANTHROPIC_API_KEY,AWS_ACCESS_KEY_ID). Full list: https://docs.litellm.ai/docs/providersRisk / Compatibility
litellmis a regular pip dependency, no change to the install flow.drop_params=Trueensures cross-provider compatibility by silently dropping provider-unsupported kwargs.