$npx skillfedfor your agent

langchain-openrouter

An integration package connecting OpenRouter and LangChain

Worth itPyPI Artificial IntelligenceReleased Aug 2026567.3K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — langchain_openrouter-0.2.8-py3-none-any.whl
v0.2.8 · released 2026-08-14 · Python <4.0.0,>=3.10.0 · 2 runtime deps: langchain-core, openrouter

Yes. This is a straightforward, low-friction integration for LangChain users who want to access OpenRouter's multi-provider model catalog. It has no security vulnerabilities, active maintenance, permissive licensing, and minimal dependencies. Install it if you're building with LangChain and want the flexibility to choose from hundreds of models without rewriting your code.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; you must have an OpenRouter API key configured (typically via OPENROUTER_API_KEY environment variable).
  • Low friction: pure Python wheel with only two runtime dependencies (langchain-core and openrouter).
  • Actively maintained with a recent release and no known vulnerabilities.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 144,266 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 567,328 downloads/mo, #5,968 on PyPI

Verify before relying

pip install langchain-openrouter

from langchain_openrouter import ChatOpenRouter

model = ChatOpenRouter(model="openrouter/auto")
response = model.invoke("Hello, world!")
  • Whether the package handles model fallback or error recovery when a requested model is unavailable on OpenRouter.
  • Performance characteristics and latency overhead compared to direct OpenRouter or LangChain calls.
  • Which specific OpenRouter features (routing logic, pricing tiers, rate limiting) are exposed through the LangChain integration.
Same gist for agents: .md · .json

What it is and what it does

langchain-openrouter is a LangChain integration that bridges your LangChain application to OpenRouter, a unified API for accessing hundreds of AI models from many providers. Instead of managing separate connections to different model providers, you point LangChain to OpenRouter and let it handle routing to the underlying models. The package wraps OpenRouter's API in LangChain's standard model interfaces, so you can swap models or providers by changing a configuration string rather than rewriting application code.

It depends on langchain-core (LangChain's base abstractions) and openrouter (the direct Python client for OpenRouter). The package is in Beta status, actively maintained, and supports Python 3.10 through 3.14. It carries no known security vulnerabilities and uses a permissive MIT license.

Use it for

  • Build a chatbot that can switch between different AI models (GPT, Claude, Llama, etc.) without changing application logic.
  • Prototype LangChain agents with multiple model providers to compare quality and cost without rewriting integration code.
  • Deploy a production service that routes requests to different models based on availability, cost, or performance tiers via OpenRouter.
  • Evaluate different models on the same task by iterating over model names in a LangChain pipeline.
  • Reduce vendor lock-in by abstracting model selection through a single, provider-agnostic API layer.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a straightforward, low-friction integration for LangChain users who want to access OpenRouter's multi-provider model catalog. It has no security vulnerabilities, active maintenance, permissive licensing, and minimal dependencies. Install it if you're building with LangChain and want the flexibility to choose from hundreds of models without rewriting your code.

Install

langchain-openrouter on PyPI

Before you install

Low friction: pure Python wheel with only two runtime dependencies (langchain-core and openrouter). Actively maintained with a recent release and no known vulnerabilities.

Requires Python 3.10 or later; you must have an OpenRouter API key configured (typically via OPENROUTER_API_KEY environment variable).

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

Quickstart

pip install langchain-openrouter

from langchain_openrouter import ChatOpenRouter

model = ChatOpenRouter(model="openrouter/auto")
response = model.invoke("Hello, world!")

Verify before relying

  • Whether the package handles model fallback or error recovery when a requested model is unavailable on OpenRouter.
  • Performance characteristics and latency overhead compared to direct OpenRouter or LangChain calls.
  • Which specific OpenRouter features (routing logic, pricing tiers, rate limiting) are exposed through the LangChain integration.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0.0,>=3.10.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
langchain-coreopenrouter
MaintenanceActively maintained 0 days since the last release
Last repo commit
First released
Downloads567,328 / month, #5,968 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence

Evidence: langchain_openrouter-0.2.8-py3-none-any.whl

Tags

Capabilities
langchain openrouter integrationunified ai model api gatewaymulti-provider language model accessopenrouter langchain connectorswitch ai models without code changeshundreds of models single apilangchain model provider abstraction
Topics
langchain-integrationmodel-abstractionmulti-provider

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “langchain openrouter integration”

  • langchain-openrouterConnects LangChain applications to OpenRouter, a unified API gateway…
  • openrouterA Python SDK for accessing 400+ AI models across multiple providers…
  • langchain-xaiConnects xAI's language models to LangChain applications through…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also langchain-openai · openrouter · langchain-xai · langchain-mistralai · langchain-ollama · langchain-aws · langchain-google-vertexai · langchain-groq · langchain-deepseek