pub struct OpenAiCompat {
pub supports_store: bool,
pub supports_developer_role: bool,
pub supports_reasoning_effort: bool,
pub supports_usage_in_streaming: bool,
pub max_tokens_field: MaxTokensField,
pub requires_tool_result_name: bool,
pub requires_assistant_after_tool_result: bool,
pub thinking_format: ThinkingFormat,
}Expand description
Compatibility flags for OpenAI-compatible providers. Different providers have different quirks even though they share the same base API.
Fields§
§supports_store: boolSupports the store parameter for conversation persistence.
supports_developer_role: boolSupports developer role (system-level instructions).
supports_reasoning_effort: boolSupports reasoning_effort parameter.
supports_usage_in_streaming: boolIncludes usage data in streaming responses.
max_tokens_field: MaxTokensFieldWhich field name to use for max tokens.
requires_tool_result_name: boolTool results must include a name field.
requires_assistant_after_tool_result: boolMust insert an assistant message after tool results.
thinking_format: ThinkingFormatHow thinking/reasoning content is formatted in streaming.
Implementations§
Source§impl OpenAiCompat
impl OpenAiCompat
Sourcepub fn openrouter() -> Self
pub fn openrouter() -> Self
Compat flags for OpenRouter.
Trait Implementations§
Source§impl Clone for OpenAiCompat
impl Clone for OpenAiCompat
Source§fn clone(&self) -> OpenAiCompat
fn clone(&self) -> OpenAiCompat
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 OpenAiCompat
impl Debug for OpenAiCompat
Source§impl Default for OpenAiCompat
impl Default for OpenAiCompat
Source§impl<'de> Deserialize<'de> for OpenAiCompat
impl<'de> Deserialize<'de> for OpenAiCompat
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 OpenAiCompat
impl RefUnwindSafe for OpenAiCompat
impl Send for OpenAiCompat
impl Sync for OpenAiCompat
impl Unpin for OpenAiCompat
impl UnsafeUnpin for OpenAiCompat
impl UnwindSafe for OpenAiCompat
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