Adds LiteLLM as an LLM provider, enabling access to 100+ LLM providers (OpenAI, Anthropic, Google, Azure, Bedrock, Ollama, etc.) through a single unified interface
New ChatLiteLLM client using litellm.acompletion() directly, follows the same Pydantic BaseModel + async __call__ pattern as ChatOpenAI, ChatOpenRouter, ChatAnthropic, and ChatGoogle
No proxy server required, uses litellm SDK directly
Motivation
DeepResearchAgent currently supports OpenAI, OpenRouter, Anthropic, and Google as LLM providers, each with its own dedicated client class using raw provider SDKs. Adding LiteLLM gives users access to 100+
additional providers (Azure, Bedrock, Vertex, Groq, Together, Ollama, etc.) through the same pattern. Since every existing provider uses raw SDKs (not LangChain), ChatLiteLLM follows the same approach by
calling litellm.acompletion() directly.
Changes
src/model/litellm/__init__.py - module init
src/model/litellm/chat.py - ChatLiteLLM client class with:
litellm.acompletion() for async completion (lazy-imported)
drop_params=True for cross-provider kwargs compatibility
OpenAIChatSerializer for message/tool formatting (same as OpenAI/OpenRouter)
Full tool call + structured output support matching ChatOpenAI
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
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
Motivation
DeepResearchAgent currently supports OpenAI, OpenRouter, Anthropic, and Google as LLM providers, each with its own dedicated client class using raw provider SDKs. Adding LiteLLM gives users access to 100+
additional providers (Azure, Bedrock, Vertex, Groq, Together, Ollama, etc.) through the same pattern. Since every existing provider uses raw SDKs (not LangChain), ChatLiteLLM follows the same approach by
calling litellm.acompletion() directly.
Changes
Tests
1. Code verification (AST parse):
$ python -c "import ast; ..."
Classes: ['ChatLiteLLM']
Async methods: ['call', '_format_response']
PASS: AST parse valid, all required methods and patterns present
PASS: manager.py correctly imports and registers litellm
2. Lint (ruff):
$ ruff check src/model/litellm/
All checks passed!
$ ruff format --check src/model/litellm/
2 files already formatted
3. Tests (mocked litellm):
Example usage
See https://docs.litellm.ai/docs/providers for 100+ supported model strings.
Risk / Compatibility