use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct ProviderCapabilities {
pub chat: bool,
pub chat_stream: bool,
pub tool_calling: bool,
pub parallel_tool_calls: bool,
pub json_schema_output: bool,
pub vision: bool,
pub embeddings: bool,
pub max_input_tokens: Option<u32>,
pub max_output_tokens: Option<u32>,
}
impl ProviderCapabilities {
#[must_use]
pub const fn chat() -> Self {
Self {
chat: true,
..Self::empty()
}
}
#[must_use]
pub const fn embeddings() -> Self {
Self {
embeddings: true,
..Self::empty()
}
}
#[must_use]
pub const fn empty() -> Self {
Self {
chat: false,
chat_stream: false,
tool_calling: false,
parallel_tool_calls: false,
json_schema_output: false,
vision: false,
embeddings: false,
max_input_tokens: None,
max_output_tokens: None,
}
}
}