Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Swarmauri Logo

PyPI version Python versions Downloads Hits License

swarmauri_provider_openrouter

swarmauri_provider_openrouter describes OpenRouter authentication, endpoints, model metadata, routing preferences, provider errors, and tool schemas without owning an HTTP implementation.

Features

  • Bearer authentication with optional application attribution headers.
  • Capability-based resolution for chat, catalog, and image-generation APIs.
  • Provider routing, fallback, data-collection, and ZDR preferences.
  • Mutable provider catalog populated by an injected model client.
  • OpenRouter-compatible function-tool schema conversion.
  • Serializable connection configurations that exclude credentials.

Installation

uv add swarmauri_provider_openrouter
pip install swarmauri_provider_openrouter

Usage

from swarmauri_provider_openrouter import (
    OpenRouterProvider,
    OpenRouterProviderPreferences,
)

provider = OpenRouterProvider(
    api_key="...",
    site_url="https://example.com",
    app_name="My application",
)
config = provider.connection_config(
    "chat.completions",
    model="openai/gpt-4o-mini",
)
headers = provider.authorize(config)
routing = OpenRouterProviderPreferences(order=["OpenAI"])

Pass the provider and routing preferences to a compatible model package. The provider returns connection configuration; a Swarmauri transport such as swarmauri_transport_httpx performs the request.

Metadata

Release files for swarmauri_provider_openrouter 0.1.0.dev2

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

Source distribution (sdist)

Source distribution for swarmauri_provider_openrouter 0.1.0.dev2
File Size Uploaded Provenance Actions
swarmauri_provider_openrouter-0.1.0.dev2.tar.gz 4.7 kB Without provenance Details for swarmauri_provider_openrouter-0.1.0.dev2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_provider_openrouter 0.1.0.dev2
File Interpreter ABI Platform Actions
swarmauri_provider_openrouter-0.1.0.dev2-py3-none-any.whl Python 3 none any Details for swarmauri_provider_openrouter-0.1.0.dev2-py3-none-any.whl

Total release size: 13.1 kB

Release files / swarmauri_provider_openrouter-0.1.0.dev2.tar.gz

Download URL swarmauri_provider_openrouter-0.1.0.dev2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a5213d21fe2aa280d6208a9cb65f569670af8bf41593e03ce0d8053e53fc3a8e
BLAKE2b-256 checksum
How to use checksums
085351436632155aca73b99b424cbb47a68b1e8fd2bb9ac93ce5b89383d21309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_provider_openrouter-0.1.0.dev2-py3-none-any.whl

Download URL swarmauri_provider_openrouter-0.1.0.dev2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef0565887d1bbcf1a8e63eade0ce323f3d741af13a03ec14e191fa3df831fd0e
BLAKE2b-256 checksum
How to use checksums
cf53bff5d57bff1ca9f6bf1f10f403508ad92f21f936d5b1e36d3d2ad1824ff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for swarmauri_provider_openrouter 0.1.0.dev2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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