feat: add LiteLLM as LLM provider (Python SDK + TypeScript proxy)#183
Merged
nicolotognoni merged 1 commit intoJun 17, 2026
Merged
Conversation
Signed-off-by: RheagalFire <arishalam121@gmail.com>
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
Add LiteLLM as an LLM provider, giving users access to 100+ LLM providers (OpenAI, Anthropic, Google, Azure, AWS Bedrock, Ollama, Cohere, Mistral, and more) through a single unified interface. Python SDK uses the native
litellmSDK (litellm.acompletion); TypeScript SDK uses LiteLLM as an OpenAI-compatible proxy.Changes
libraries/python/getpatter/providers/litellm_llm.py-LiteLLMProvidersatisfying theLLMProviderprotocol (streaming, tool calls, cancel_event barge-in, usage tracking, warmup).drop_params=Trueby default for cross-provider compatibility.libraries/python/getpatter/llm/litellm.py- thinLLMwrapper withLITELLM_API_KEYenv var fallback.libraries/typescript/src/llm/litellm.ts-LLMpreset extendingOpenAICompatibleLLMProviderwith LiteLLM proxy defaults (LITELLM_BASE_URL,LITELLM_API_KEY).libraries/python/pyproject.toml-litellm = ["litellm>=1.80.0,<2.0"]optional extra.libraries/python/tests/test_litellm_llm.py- 7 unit tests (mocked).libraries/typescript/tests/litellm-llm.test.ts- 4 unit tests.__init__.py,index.ts) withLiteLLMLLMflat alias andlitellmnamespace object.Pre-merge checklist
bash scripts/pr-validate.sh(mirrors thePR-blocking CI — Python + TypeScript tests, lint, pre-commit).
feature ships in Python AND TypeScript in the same PR, same API shape
and defaults (
snake_case↔camelCase). New/Python-only or TS-only isnot accepted.
CHANGELOG.mdupdated — added an entry under## Unreleased(
### Added/### Changed/### Fixed/ …) for any user-visiblechange. Refactor / test-only / docs-only diffs are exempt — say so below.
(carrier / provider WebSocket) is mocked.
comments in source files (integrating a provider/carrier and naming it
is fine; copying a competitor's lineage is not).
Breaking change?
No — or describe the migration path.