pub struct CompatSettings {
pub supports_store: bool,
pub supports_developer_role: bool,
pub supports_reasoning_effort: bool,
pub supports_usage_in_streaming: bool,
pub max_tokens_field: Option<MaxTokensField>,
pub requires_tool_result_name: bool,
pub requires_assistant_after_tool_result: bool,
pub requires_thinking_as_text: bool,
pub thinking_format: Option<ThinkingFormat>,
}Expand description
Compatibility settings for OpenAI-compatible APIs.
Not every OpenAI-compatible provider supports every feature. These flags let the streaming layer adapt its request shape.
Fields§
§supports_store: boolWhether the provider supports the store parameter.
supports_developer_role: boolWhether the provider recognises the developer role.
supports_reasoning_effort: boolWhether the provider supports reasoning_effort.
supports_usage_in_streaming: boolWhether the provider returns usage data in streaming responses.
max_tokens_field: Option<MaxTokensField>Which JSON field name to use for the max-tokens parameter.
requires_tool_result_name: boolWhether tool results must include the tool name.
requires_assistant_after_tool_result: boolWhether an assistant message must follow every tool result.
requires_thinking_as_text: boolWhether thinking should be sent as plain text.
thinking_format: Option<ThinkingFormat>Provider-specific thinking wire-format.
Trait Implementations§
Source§impl Clone for CompatSettings
impl Clone for CompatSettings
Source§fn clone(&self) -> CompatSettings
fn clone(&self) -> CompatSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompatSettings
impl Debug for CompatSettings
Source§impl Default for CompatSettings
impl Default for CompatSettings
Source§fn default() -> CompatSettings
fn default() -> CompatSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompatSettingswhere
CompatSettings: Default,
impl<'de> Deserialize<'de> for CompatSettingswhere
CompatSettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompatSettings
impl RefUnwindSafe for CompatSettings
impl Send for CompatSettings
impl Sync for CompatSettings
impl Unpin for CompatSettings
impl UnsafeUnpin for CompatSettings
impl UnwindSafe for CompatSettings
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