Skip to content

Commit 95bff82

Browse files
committed
bye bye litellm
1 parent 4eba6ec commit 95bff82

10 files changed

Lines changed: 7 additions & 173 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export PRIME_API_KEY=...
115115

116116

117117
### Model Providers
118-
We currently support most major clients (OpenAI, Anthropic), as well as the router platforms (OpenRouter, Portkey, LiteLLM). For local models, we recommend using vLLM (which interfaces with the [OpenAI client](https://github.com/alexzhang13/rlm/blob/main/rlm/clients/openai.py)). To view or add support for more clients, start by looking at [`rlm/clients/`](https://github.com/alexzhang13/rlm/tree/main/rlm/clients).
118+
We currently support most major clients (OpenAI, Anthropic), as well as the router platforms (OpenRouter, Portkey). For local models, we recommend using vLLM (which interfaces with the [OpenAI client](https://github.com/alexzhang13/rlm/blob/main/rlm/clients/openai.py)). To view or add support for more clients, start by looking at [`rlm/clients/`](https://github.com/alexzhang13/rlm/tree/main/rlm/clients).
119119

120120
## Relevant Reading
121121
* **[Dec '25]** [Recursive Language Models arXiv](https://arxiv.org/abs/2512.24601)

docs/api/rlm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ RLM(
7171
#### `backend`
7272
{: .no_toc }
7373

74-
**Type:** `Literal["openai", "portkey", "openrouter", "vllm", "litellm", "anthropic"]`
74+
**Type:** `Literal["openai", "portkey", "openrouter", "vllm", "anthropic"]`
7575
**Default:** `"openai"`
7676

7777
The LM provider backend to use for the root model.
@@ -104,7 +104,7 @@ Configuration passed to the LM client. Required fields vary by backend:
104104
| `portkey` | `model_name`, `api_key` | `base_url` |
105105
| `openrouter` | `model_name` | `api_key` |
106106
| `vllm` | `model_name`, `base_url` ||
107-
| `litellm` | `model_name` | varies by provider |
107+
108108

109109
```python
110110
backend_kwargs = {

docs/src/app/api/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ print(result.response)`} />
6161
[<code key="2" className="text-sm">"anthropic"</code>, "Anthropic API"],
6262
[<code key="3" className="text-sm">"portkey"</code>, "Portkey AI gateway"],
6363
[<code key="4" className="text-sm">"openrouter"</code>, "OpenRouter"],
64-
[<code key="5" className="text-sm">"litellm"</code>, "LiteLLM (multi-provider)"],
64+
6565
[<code key="6" className="text-sm">"vllm"</code>, "Local vLLM server"],
6666
]}
6767
/>

docs/src/app/backends/page.tsx

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function BackendsPage() {
77

88
<p className="text-muted-foreground mb-6">
99
<p>
10-
RLMs natively support a wide range of language model providers, including <code>OpenAI</code>, <code>Anthropic</code>, <code>Portkey</code>, <code>OpenRouter</code>, and <code>LiteLLM</code>. Additional providers can be supported with minimal effort. The <code>backend_kwargs</code> are named arguments passed directly to the backend client.
10+
RLMs natively support a wide range of language model providers, including <code>OpenAI</code>, <code>Anthropic</code>, <code>Portkey</code>, and <code>OpenRouter</code>. Additional providers can be supported with minimal effort. The <code>backend_kwargs</code> are named arguments passed directly to the backend client.
1111
</p>
1212
</p>
1313

@@ -64,20 +64,6 @@ export default function BackendsPage() {
6464

6565
<hr className="my-8 border-border" />
6666

67-
<h2 className="text-2xl font-semibold mb-4">LiteLLM</h2>
68-
<p className="text-muted-foreground mb-4">
69-
<a href="https://docs.litellm.ai/docs/" className="text-primary underline font-medium" target="_blank" rel="noopener noreferrer">LiteLLM</a> is a universal interface for 100+ model providers, with support for local models and custom endpoints.
70-
</p>
71-
<CodeBlock code={`rlm = RLM(
72-
backend="litellm",
73-
backend_kwargs={
74-
"model_name": "gpt-5-mini",
75-
},
76-
)
77-
# Set provider API keys in environment`} />
78-
79-
<hr className="my-8 border-border" />
80-
8167
<h2 className="text-2xl font-semibold mb-4">vLLM (Local)</h2>
8268
<p className="text-muted-foreground mb-4">Local model serving.</p>
8369
<CodeBlock language="bash" code={`# Start vLLM server

rlm/clients/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ def get_client(
4141

4242
backend_kwargs.setdefault("base_url", "https://ai-gateway.vercel.sh/v1")
4343
return OpenAIClient(**backend_kwargs)
44-
elif backend == "litellm":
45-
from rlm.clients.litellm import LiteLLMClient
46-
47-
return LiteLLMClient(**backend_kwargs)
4844
elif backend == "anthropic":
4945
from rlm.clients.anthropic import AnthropicClient
5046

@@ -59,5 +55,5 @@ def get_client(
5955
return AzureOpenAIClient(**backend_kwargs)
6056
else:
6157
raise ValueError(
62-
f"Unknown backend: {backend}. Supported backends: ['openai', 'vllm', 'portkey', 'openrouter', 'litellm', 'anthropic', 'azure_openai', 'gemini', 'vercel']"
58+
f"Unknown backend: {backend}. Supported backends: ['openai', 'vllm', 'portkey', 'openrouter', 'anthropic', 'azure_openai', 'gemini', 'vercel']"
6359
)

rlm/clients/litellm.py

Lines changed: 0 additions & 105 deletions
This file was deleted.

rlm/core/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"openrouter",
99
"vercel",
1010
"vllm",
11-
"litellm",
1211
"anthropic",
1312
"azure_openai",
1413
"gemini",

tests/clients/test_timeout.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -140,32 +140,6 @@ def test_timeout_passed_to_client(self):
140140
assert async_call_kwargs["timeout"] == 120.0
141141

142142

143-
class TestLiteLLMClientTimeout:
144-
"""Tests for LiteLLM client timeout."""
145-
146-
def test_timeout_passed_to_completion(self):
147-
"""Timeout should be passed to litellm.completion call."""
148-
pytest.importorskip("litellm")
149-
from rlm.clients.litellm import LiteLLMClient
150-
151-
mock_response = MagicMock()
152-
mock_response.choices = [MagicMock()]
153-
mock_response.choices[0].message.content = "Hello"
154-
mock_response.usage.prompt_tokens = 10
155-
mock_response.usage.completion_tokens = 5
156-
mock_response.usage.total_tokens = 15
157-
158-
with patch(
159-
"rlm.clients.litellm.litellm.completion", return_value=mock_response
160-
) as mock_completion:
161-
client = LiteLLMClient(model_name="gpt-4o", timeout=120.0)
162-
client.completion("Hello")
163-
164-
mock_completion.assert_called_once()
165-
call_kwargs = mock_completion.call_args[1]
166-
assert call_kwargs["timeout"] == 120.0
167-
168-
169143
class TestGeminiClientTimeout:
170144
"""Tests for Gemini client timeout."""
171145

tests/test_imports.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ def test_portkey_client_import(self):
6767

6868
assert PortkeyClient is not None
6969

70-
def test_litellm_client_import(self):
71-
"""Test LiteLLMClient import."""
72-
pytest.importorskip("litellm")
73-
from rlm.clients.litellm import LiteLLMClient
74-
75-
assert LiteLLMClient is not None
76-
7770
def test_get_client_function(self):
7871
"""Test get_client function import."""
7972
from rlm.clients import get_client
@@ -322,7 +315,6 @@ def test_no_circular_imports(self):
322315
("rlm.clients.openai", "openai"),
323316
("rlm.clients.anthropic", "anthropic"),
324317
("rlm.clients.portkey", "portkey_ai"),
325-
("rlm.clients.litellm", "litellm"),
326318
("rlm.environments.modal_repl", "modal"),
327319
("rlm.environments.prime_repl", "prime_sandboxes"),
328320
]
@@ -463,14 +455,6 @@ def test_all_client_classes_importable(self):
463455
except Exception:
464456
pass
465457

466-
try:
467-
pytest.importorskip("litellm")
468-
from rlm.clients.litellm import LiteLLMClient
469-
470-
assert isinstance(LiteLLMClient, type)
471-
except Exception:
472-
pass
473-
474458
def test_all_environment_classes_importable(self):
475459
"""Test that all environment classes can be imported."""
476460
from rlm.environments.base_env import BaseEnv, IsolatedEnv, NonIsolatedEnv

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)