Skip to content

Commit 149e886

Browse files
committed
todo
1 parent e0df1f6 commit 149e886

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

plugins/openrouter/README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,22 @@ uv pip install vision-agents-plugins-openrouter
1111
## Usage
1212

1313
```python
14-
from vision_agents.plugins import openrouter
15-
16-
llm = openrouter.LLM()
14+
from vision_agents.plugins import openrouter, getstream, elevenlabs, cartesia, deepgram, smart_turn
15+
16+
17+
agent = Agent(
18+
edge=getstream.Edge(),
19+
agent_user=User(name="OpenRouter AI"),
20+
instructions="Be helpful and friendly to the user",
21+
llm=openrouter.LLM(
22+
model="anthropic/claude-haiku-4.5", # Can also use other models like anthropic/claude-3-opus
23+
),
24+
tts=elevenlabs.TTS(),
25+
stt=deepgram.STT(),
26+
turn_detection=smart_turn.TurnDetection(
27+
buffer_duration=2.0, confidence_threshold=0.5
28+
)
29+
)
1730
```
1831

1932
## Configuration

plugins/openrouter/tests/test_openrouter_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async def llm(self) -> LLM:
7979
if not os.environ.get("OPENROUTER_API_KEY"):
8080
pytest.skip("OPENROUTER_API_KEY environment variable not set")
8181

82-
llm = LLM(model="z-ai/glm-4.6")
82+
llm = LLM(model="anthropic/claude-haiku-4.5")
8383
return llm
8484

8585
@pytest.mark.integration

plugins/openrouter/vision_agents/plugins/openrouter/openrouter_llm.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77

88
class OpenRouterLLM(OpenAILLM):
99
"""OpenRouter LLM that extends OpenAI LLM with OpenRouter-specific configuration.
10-
11-
OpenRouter provides an OpenAI-compatible API, so we can reuse the OpenAI plugin
12-
implementation with OpenRouter-specific defaults.
10+
11+
It proxies the regular models by setting base url.
12+
It supports create response like the regular openAI API. It doesn't support conversation id, so that requires customization
13+
14+
TODO:
15+
- Use manual conversation storage
1316
"""
1417

1518
def __init__(

0 commit comments

Comments
 (0)