Feat/add litellm provider#685
Open
RheagalFire wants to merge 3 commits into
Open
Conversation
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.
Add LiteLLM as a native provider using the LiteLLM Python SDK (
litellm.acompletion), giving ha-llmvision access to 100+ LLM providers (Anthropic, Google, AWS Bedrock, Groq, Ollama, etc.) without requiring a separate proxy deployment.Users set their provider's API key and use LiteLLM's model format (e.g.
anthropic/claude-sonnet-4-6,gemini/gemini-2.0-flash). LiteLLM routes to the correct provider and translates the request format automatically.drop_params=Truehandles per-provider parameter differences.Changes:
LiteLLM(Provider)class inproviders.pyusinglitellm.acompletion()for both vision and text requestsAuthenticationError,NotFoundError,RateLimitError,ContextWindowExceededError,Timeout, andBadRequestErrorfromlitellm.exceptionsrequest_timeout) passed through to litellm SDK callslitellm>=1.80,<1.88added tomanifest.jsonrequirementsUsage:
anthropic/claude-sonnet-4-6,openai/gpt-4o-mini,gemini/gemini-2.0-flashNo proxy server needed - LiteLLM SDK handles provider routing directly.