This release is a pre-release and may not be stable for production use.
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.
Project links
Metadata
Release files for swarmauri_provider_openrouter 0.1.0.dev1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swarmauri_provider_openrouter-0.1.0.dev1.tar.gz | 4.7 kB | Without provenance | Details for swarmauri_provider_openrouter-0.1.0.dev1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swarmauri_provider_openrouter-0.1.0.dev1-py3-none-any.whl | Python 3 | none | any | Details for swarmauri_provider_openrouter-0.1.0.dev1-py3-none-any.whl |
Total release size: 13.1 kB
Release files / swarmauri_provider_openrouter-0.1.0.dev1.tar.gz
| Download URL | swarmauri_provider_openrouter-0.1.0.dev1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a688470d55a7c04cbb93f8900185644c483ca950fae2f10568551d009bc8f4a2
|
|
BLAKE2b-256 checksum How to use checksums |
0a2ee658b342c8dd853a33503530710c2669271c976e4094d4f972fb65b436f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.dev1-py3-none-any.whl
| Download URL | swarmauri_provider_openrouter-0.1.0.dev1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9ce67b5ce86580a7f3cdaf2f960a20dcd9d2d53644920e2ae79e6db3b15fa78
|
|
BLAKE2b-256 checksum How to use checksums |
9cb146186151cef8967b99f6a1097c46061fa7d7a76a8d93a114a2e6cf06512d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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.dev1
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.