OpenRouter plugin for vision agents
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vision_agents_plugins_openrouter-0.4.3.tar.gz.
File metadata
- Download URL: vision_agents_plugins_openrouter-0.4.3.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d60beb05e3a63e26cb2531b649d62f771d6cd8fe1081595cb623ff00938d5b7
|
|
| MD5 |
545fdf100f91884a2214a0f7399bc377
|
|
| BLAKE2b-256 |
8d2d7a4cb68105a335d7b27a2641037684b4c3794d25fe9e6bf3036631069b8d
|
File details
Details for the file vision_agents_plugins_openrouter-0.4.3-py3-none-any.whl.
File metadata
- Download URL: vision_agents_plugins_openrouter-0.4.3-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74b1d6d4cc83470edd4ca8fe4395de3469351bb9c75aa163abe4a2857c7ec2f
|
|
| MD5 |
7c6dba4417007be52dc96a5660653ee7
|
|
| BLAKE2b-256 |
80980e3d2c973011b7cf8088fcc15313d03c312cae305d4d99f3d12b34f22548
|