feat: add LiteLLM as LLM provider - #60
Open
RheagalFire wants to merge 2 commits into
Open
Conversation
Author
Author
|
@softsweetengineer do you have any update on this PR? |
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
ask_llm_anything(), enabling access to 100+ LLM providers (OpenAI, Anthropic, Google, Azure, Bedrock, Ollama, etc.) via a single unified SDKmodel_provider="litellm", routes throughlitellm.completion()withdrop_params=Trueinstead of the OpenAI clientChanges
tools/ask_llm_v2.py- addedimport litellmat top level, added litellm code path inask_llm_anything(): whenmodel_provider == "litellm", callslitellm.completion()withdrop_params=Truemodel_config.yaml- addedlitellmprovider entry (uses"EMPTY"placeholder following repo convention, litellm falls back to provider env vars)requirements.txt- addedlitellm>=1.60.0,<2.0.0tests/test_litellm_provider.py- 12 unit tests (all passing)Proof of work
Unit tests (12/12 passing):
Live E2E (Azure Foundry, Claude):
Example usage
See https://docs.litellm.ai/docs/providers for 100+ supported model strings.
Impact
litellmadded torequirements.txtas a dependencydrop_params=Truesilently drops provider-unsupported kwargs"EMPTY"api_key/api_base values are skipped so litellm falls back to provider env vars