Struct OpenAiResponsesModelProvider
pub struct OpenAiResponsesModelProvider { /* private fields */ }Implementations§
Source§impl OpenAiResponsesModelProvider
impl OpenAiResponsesModelProvider
Sourcepub fn builder(alias: &str) -> OpenAiResponsesBuilder
pub fn builder(alias: &str) -> OpenAiResponsesBuilder
Entry point. Only alias is required; every other field is set
via a labelled chain method on the returned OpenAiResponsesBuilder.
Trait Implementations§
Source§impl Attributable for OpenAiResponsesModelProvider
impl Attributable for OpenAiResponsesModelProvider
fn role(&self) -> Role
fn alias(&self) -> &str
Source§fn tool_provenance(&self) -> ToolProvenance
fn tool_provenance(&self) -> ToolProvenance
Source§impl ModelProvider for OpenAiResponsesModelProvider
impl ModelProvider for OpenAiResponsesModelProvider
Source§fn default_base_url(&self) -> Option<&str>
fn default_base_url(&self) -> Option<&str>
Reports the instance’s resolved endpoint so callers can verify which host a responses provider will actually hit (e.g. a compat family’s default base vs. OpenAI’s).
Source§fn list_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_models<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Configured Responses-wire aliases (custom/self-hosted endpoints using
wire_api = "responses") have no default public fallback the way the
OpenAI family does, so an unimplemented listing method here silently
drops the configured endpoint in favor of a generic catalog. Probe
the sibling /models endpoint next to the configured /responses
URL, the same OpenAI-compatible convention OpenAiCompatibleModelProvider
uses, so a credentialed or header-authenticated alias returns its own
live models instead of an unrelated public list.
Source§fn supports_single_tool_rounds(&self, _model: &str) -> bool
fn supports_single_tool_rounds(&self, _model: &str) -> bool
Source§fn capabilities(&self) -> ProviderCapabilities
fn capabilities(&self) -> ProviderCapabilities
Source§fn default_wire_api(&self) -> &str
fn default_wire_api(&self) -> &str
"responses" (OpenAI Codex-style) or
"chat_completions" (everything else). Providers override to their
native format.Source§fn supports_native_tools(&self) -> bool
fn supports_native_tools(&self) -> bool
Source§fn supports_streaming(&self) -> bool
fn supports_streaming(&self) -> bool
Source§fn supports_streaming_tool_events(&self) -> bool
fn supports_streaming_tool_events(&self) -> bool
Source§fn chat_with_system<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
system_prompt: Option<&'life1 str>,
message: &'life2 str,
model: &'life3 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn chat_with_system<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
system_prompt: Option<&'life1 str>,
message: &'life2 str,
model: &'life3 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
simple_chat for
the temperature contract.Source§fn chat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ProviderChatRequest<'life1>,
model: &'life2 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<ProviderChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn chat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ProviderChatRequest<'life1>,
model: &'life2 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<ProviderChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
simple_chat for
the temperature contract.Source§fn chat_with_tool_round_policy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ProviderChatRequest<'life1>,
model: &'life2 str,
temperature: Option<f64>,
policy: ToolRoundPolicy,
) -> Pin<Box<dyn Future<Output = Result<ProviderChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn chat_with_tool_round_policy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ProviderChatRequest<'life1>,
model: &'life2 str,
temperature: Option<f64>,
policy: ToolRoundPolicy,
) -> Pin<Box<dyn Future<Output = Result<ProviderChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn stream_chat(
&self,
request: ProviderChatRequest<'_>,
model: &str,
temperature: Option<f64>,
options: StreamOptions,
) -> BoxStream<'static, StreamResult<StreamEvent>>
fn stream_chat( &self, request: ProviderChatRequest<'_>, model: &str, temperature: Option<f64>, options: StreamOptions, ) -> BoxStream<'static, StreamResult<StreamEvent>>
simple_chat for the
temperature contract.fn stream_chat_with_tool_round_policy( &self, request: ProviderChatRequest<'_>, model: &str, temperature: Option<f64>, options: StreamOptions, policy: ToolRoundPolicy, ) -> BoxStream<'static, StreamResult<StreamEvent>>
Source§fn has_stable_request_identity(&self, _model: &str) -> bool
fn has_stable_request_identity(&self, _model: &str) -> bool
model are dispatched to one stable
provider/model identity. Read moreSource§fn capabilities_for_model(&self, _model: &str) -> ProviderCapabilities
fn capabilities_for_model(&self, _model: &str) -> ProviderCapabilities
Source§fn vision_limited_by(&self, _model: &str) -> Option<String>
fn vision_limited_by(&self, _model: &str) -> Option<String>
vision to false on this provider’s
Self::capabilities_for_model, for providers that aggregate several
named entries (e.g. a primary plus configured fallbacks) into one
capability set. Returns None when this provider is not such an
aggregate, or when nothing about it limits vision for model.Source§fn has_mixed_native_tool_support_for_model(&self, _model: &str) -> bool
fn has_mixed_native_tool_support_for_model(&self, _model: &str) -> bool
Source§fn default_temperature(&self) -> f64
fn default_temperature(&self) -> f64
None into a wire value.Source§fn default_max_tokens(&self) -> u32
fn default_max_tokens(&self) -> u32
Source§fn default_timeout_secs(&self) -> u64
fn default_timeout_secs(&self) -> u64
Source§fn convert_tools(&self, tools: &[ToolSpec]) -> ToolsPayload
fn convert_tools(&self, tools: &[ToolSpec]) -> ToolsPayload
Source§fn simple_chat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
message: &'life1 str,
model: &'life2 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn simple_chat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
message: &'life1 str,
model: &'life2 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
temperature == None means the field is omitted on the wire.Source§fn list_models_with_pricing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ModelInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn list_models_with_pricing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ModelInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
list_models and returns no
pricing. Concrete providers that receive pricing from their /models
endpoint override this to return enriched data.Source§fn chat_with_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [ChatMessage],
model: &'life2 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn chat_with_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [ChatMessage],
model: &'life2 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
simple_chat for the temperature
contract.Source§fn supports_vision(&self) -> bool
fn supports_vision(&self) -> bool
Source§fn warmup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn warmup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§fn chat_with_tools<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [ChatMessage],
_tools: &'life2 [Value],
model: &'life3 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn chat_with_tools<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [ChatMessage],
_tools: &'life2 [Value],
model: &'life3 str,
temperature: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
simple_chat for the temperature contract.Source§fn stream_chat_with_system(
&self,
_system_prompt: Option<&str>,
_message: &str,
_model: &str,
_temperature: Option<f64>,
_options: StreamOptions,
) -> Pin<Box<dyn Stream<Item = Result<StreamChunk, StreamError>> + Send>>
fn stream_chat_with_system( &self, _system_prompt: Option<&str>, _message: &str, _model: &str, _temperature: Option<f64>, _options: StreamOptions, ) -> Pin<Box<dyn Stream<Item = Result<StreamChunk, StreamError>> + Send>>
simple_chat for
the temperature contract.Source§fn stream_chat_with_history(
&self,
messages: &[ChatMessage],
model: &str,
temperature: Option<f64>,
options: StreamOptions,
) -> Pin<Box<dyn Stream<Item = Result<StreamChunk, StreamError>> + Send>>
fn stream_chat_with_history( &self, messages: &[ChatMessage], model: &str, temperature: Option<f64>, options: StreamOptions, ) -> Pin<Box<dyn Stream<Item = Result<StreamChunk, StreamError>> + Send>>
simple_chat for the temperature
contract.Auto Trait Implementations§
impl Freeze for OpenAiResponsesModelProvider
impl RefUnwindSafe for OpenAiResponsesModelProvider
impl Send for OpenAiResponsesModelProvider
impl Sync for OpenAiResponsesModelProvider
impl Unpin for OpenAiResponsesModelProvider
impl UnsafeUnpin for OpenAiResponsesModelProvider
impl UnwindSafe for OpenAiResponsesModelProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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