Skip to content

feat: add LiteLLM as AI gateway provider#283

Open
RheagalFire wants to merge 2 commits into
open-multi-agent:mainfrom
RheagalFire:feat/add-litellm-provider
Open

feat: add LiteLLM as AI gateway provider#283
RheagalFire wants to merge 2 commits into
open-multi-agent:mainfrom
RheagalFire:feat/add-litellm-provider

Conversation

@RheagalFire
Copy link
Copy Markdown

What

Adds LiteLLM as a provider (provider: 'litellm'), giving users access to 100+ LLM providers through a LiteLLM proxy server. Thin OpenAIAdapter wrapper following the same pattern as DeepSeek, Grok, and MiniMax adapters.

Why

Users who run a LiteLLM proxy can route to Anthropic, OpenAI, Gemini, Azure, Bedrock, Ollama, and 100+ other providers from a single OpenAI-compatible endpoint. This adapter lets them use provider: 'litellm' instead of manually configuring baseURL on the OpenAI adapter.

Checklist

  • npm run lint passes
  • npm test passes (978 passed, 0 failures)
  • Added/updated tests for changed behavior (6 tests in tests/litellm-adapter.test.ts)
  • No new runtime dependencies (reuses openai SDK already in deps; lazy import)

@RheagalFire
Copy link
Copy Markdown
Author

cc @JackChen-me

@JackChen-me
Copy link
Copy Markdown
Member

Works today without an adapter: the LiteLLM proxy is OpenAI-compatible, so provider: 'openai' + baseURL reaches it, same as OpenRouter and the other OpenAI-compatible endpoints in docs/providers.md. It's self-hosted with no canonical endpoint, so a built-in would add a provider name but no usable default (just your own localhost:4000). Better as a row in that table. Want to send that instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants