OpenRouter Plugin
This plugin provides LLM capabilities using OpenRouter's API, which offers access to multiple LLM providers through a unified OpenAI-compatible interface. It enables developers to easily switch between different models from various providers (Anthropic, Google, OpenAI, etc.) without changing their code.
Features
- Access to multiple LLM providers through a single API
- OpenAI-compatible interface for easy integration
- Support for various models including Claude, Gemini, GPT, and more
- Automatic conversion of instructions to system messages
- Manual conversation history management
Installation
uv add "vision-agents[openrouter]"
# or directly
uv add vision-agents-plugins-openrouter
Usage
from vision_agents.core import User, Agent
from vision_agents.plugins import openrouter, getstream, elevenlabs, deepgram, smart_turn
agent = Agent(
edge=getstream.Edge(),
agent_user=User(name="OpenRouter AI"),
instructions="Be helpful and friendly to the user",
llm=openrouter.LLM(
model="anthropic/claude-haiku-4.5",
),
tts=elevenlabs.TTS(),
stt=deepgram.STT(),
turn_detection=smart_turn.TurnDetection(),
)
Configuration
| Parameter | Description | Accepted Values |
|---|---|---|
api_key |
OpenRouter API key | str | None. If not provided, uses OPENROUTER_API_KEY environment variable |
base_url |
OpenRouter API base URL | str. Default: "https://openrouter.ai/api/v1" |
model |
Model identifier to use | str. Default: "openrouter/andromeda-alpha". Examples: "anthropic/claude-haiku-4.5", "google/gemini-2.5-flash", "openai/gpt-4o" |
**kwargs |
Additional arguments passed to OpenAI LLM | Any additional parameters supported by the underlying OpenAI LLM implementation |
Dependencies
- vision-agents
- vision-agents-plugins-openai
Metadata
Release files for vision-agents-plugins-openrouter 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vision_agents_plugins_openrouter-0.6.9.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vision_agents_plugins_openrouter-0.6.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / vision_agents_plugins_openrouter-0.6.9.tar.gz
| Download URL | vision_agents_plugins_openrouter-0.6.9.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
913e58eaf30c9daac07b00384f18e8acbe26a020dfecc6f40a30028d48d19374
|
|
BLAKE2b-256 checksum How to use checksums |
c6487a903279145b6524e25ed53f8a7f65647203b17b3ba70f796b40a3fc35c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vision_agents_plugins_openrouter-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_openrouter-0.6.9-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
783e454a9b25065f70248128d74e9608cbc4c53fd3d84e4cb72a913107c5e86c
|
|
BLAKE2b-256 checksum How to use checksums |
3adcb52e02908118317a1103ffa592c5cc84b10ab042823730b1dc906d3c9866
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|