Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vision_agents_plugins_openrouter-0.6.8.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file vision_agents_plugins_openrouter-0.6.8.tar.gz.

File metadata

  • Download URL: vision_agents_plugins_openrouter-0.6.8.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for vision_agents_plugins_openrouter-0.6.8.tar.gz
Algorithm Hash digest
SHA256 a0bcc7215d30db5d8dd50e28ee975c1e46f92d30b805e23a011c9117516c9fec
MD5 5c2f6d3218a41fadeb4d2d03f0de825d
BLAKE2b-256 b17bf8a97e9c076955f937835ae4c351640c6522c1fe6880eb5d4a2590170a69

See more details on using hashes here.

File details

Details for the file vision_agents_plugins_openrouter-0.6.8-py3-none-any.whl.

File metadata

  • Download URL: vision_agents_plugins_openrouter-0.6.8-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for vision_agents_plugins_openrouter-0.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a2fd5513bbf1f47bf66fe1636d922a7955d5a01010d77cf6b60400084c1afe5f
MD5 5d2048fc28aa21b6bb301f9007b890da
BLAKE2b-256 cec88d0e4dc54c8a1ef13b556fcf3124f2b00caf2bd8011bb6e63747adc9f647

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page