Skip to main content

everruns_openrouter/
lib.rs

1//! OpenRouter provider driver for Everruns.
2//!
3//! `everruns-openrouter` is part of the [Everruns](https://everruns.com)
4//! ecosystem. It implements the [`ChatDriver`] contract from `everruns-core`
5//! and registers the OpenRouter provider into a [`DriverRegistry`].
6//!
7//! OpenRouter exposes an OpenAI-compatible Responses API, so [`OpenRouterChatDriver`]
8//! wraps `everruns_provider::OpenResponsesProtocolChatDriver` tagged with
9//! `DriverId::OpenRouter`. Its `/models` endpoint advertises richer metadata
10//! (a `supported_parameters` array) that the crate parses into capability
11//! profiles at discovery time.
12//!
13//! # Registering the Driver
14//!
15//! ```
16//! use everruns_provider::DriverRegistry;
17//! use everruns_openrouter::register_driver;
18//!
19//! let mut registry = DriverRegistry::new();
20//! register_driver(&mut registry);
21//! ```
22
23mod driver;
24mod request_ext;
25mod types;
26
27pub use driver::{OpenRouterChatDriver, register_driver};
28pub use request_ext::OpenRouterRequestExtension;
29pub use types::{
30    OpenRouterArchitecture, OpenRouterModelInfo, OpenRouterModelsResponse, OpenRouterPricing,
31    OpenRouterTopProvider,
32};
33
34// Re-export core types for convenience
35pub use everruns_provider::driver_registry::{ChatDriver, DriverRegistry};