Skip to main content

langchain-otari

Run LangChain and LangGraph through Otari, the open-source LLM gateway, and get its budgets, usage tracking, fallback routing and guardrails on every model call.

pip install langchain-otari
export OTARI_API_KEY=<your-otari-key>                # from otari.ai, or from your own gateway
export OTARI_BASE_URL=http://localhost:8000/api/v1   # only for a self-hosted gateway: its URL plus /api/v1
from langchain_otari import ChatOtari

llm = ChatOtari(model="anthropic:claude-sonnet-4-6")
print(llm.invoke("Say hello in one sentence.").content)
  • ChatOtari is ChatOpenAI pointed at Otari, so it takes every ChatOpenAI argument and works anywhere a LangChain chat model does: create_agent, with_structured_output, bind_tools, LangGraph nodes.
  • model is any model your gateway routes: provider:model, or the name of a routing policy or alias.
  • base_url and api_key override the environment. Without OTARI_BASE_URL, requests go to otari.ai's gateway, https://api.otari.ai/api/v1.
  • OPENAI_API_KEY is never used as a fallback, so an OpenAI key is not sent to the gateway by mistake. Token usage is requested on streams too.

Full guides: Use with LangChain and Use with LangGraph.

Developed in mozilla-ai/otari, where every change is tested against a running Otari.

Metadata

Release files for langchain-otari 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-otari 0.1.0
File Size Uploaded Provenance
langchain_otari-0.1.0.tar.gz 7.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-otari 0.1.0
File Interpreter ABI Platform
langchain_otari-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / langchain_otari-0.1.0.tar.gz

Download URL langchain_otari-0.1.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bad265d3bdc3e4858e6404c8f45466fd0525c30f3e97e50e54cd8b708984f0fe
BLAKE2b-256 checksum
How to use checksums
2e0bbbb97f5ddaf47d8c1daf934b9ea0d40f6d253aaac0552176d949b866f67d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / langchain_otari-0.1.0-py3-none-any.whl

Download URL langchain_otari-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
943d66acbdbf13629a0923aca915ac8be0596f323149b5deb1c157b391e6fef8
BLAKE2b-256 checksum
How to use checksums
170e653be8c4e74cd42b3eedb75d503f4296ce2a179a90749f8bb778310029f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for langchain-otari 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_otari-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page