pub struct OpenRouterConfig;Expand description
OpenRouter configuration for the generic provider
Trait Implementations§
Source§impl OpenAIProviderConfig for OpenRouterConfig
impl OpenAIProviderConfig for OpenRouterConfig
Source§const PROVIDER_NAME: &'static str = "OpenRouter"
const PROVIDER_NAME: &'static str = "OpenRouter"
The name of the provider (e.g., “OpenAI”, “Mistral”, “XAI”)
Source§const DEFAULT_BASE_URL: &'static str = "https://openrouter.ai/api/v1/"
const DEFAULT_BASE_URL: &'static str = "https://openrouter.ai/api/v1/"
Default base URL for the provider
Source§const DEFAULT_MODEL: &'static str = "moonshotai/kimi-k2:free"
const DEFAULT_MODEL: &'static str = "moonshotai/kimi-k2:free"
Default model for the provider
Source§const SUPPORTS_REASONING_EFFORT: bool = false
const SUPPORTS_REASONING_EFFORT: bool = false
Whether this provider supports reasoning effort
Source§const SUPPORTS_STRUCTURED_OUTPUT: bool = true
const SUPPORTS_STRUCTURED_OUTPUT: bool = true
Whether this provider supports structured output
Source§const SUPPORTS_PARALLEL_TOOL_CALLS: bool = false
const SUPPORTS_PARALLEL_TOOL_CALLS: bool = false
Whether this provider supports parallel tool calls
Source§const CHAT_ENDPOINT: &'static str = "chat/completions"
const CHAT_ENDPOINT: &'static str = "chat/completions"
Chat completions endpoint path (usually “chat/completions”)
Source§const SUPPORTS_STREAM_OPTIONS: bool = false
const SUPPORTS_STREAM_OPTIONS: bool = false
Whether this provider supports stream options (like include_usage)
Auto Trait Implementations§
impl Freeze for OpenRouterConfig
impl RefUnwindSafe for OpenRouterConfig
impl Send for OpenRouterConfig
impl Sync for OpenRouterConfig
impl Unpin for OpenRouterConfig
impl UnwindSafe for OpenRouterConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more