use serde::{Deserialize, Serialize};
use schemars::JsonSchema;
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Hash, JsonSchema)]
#[serde(rename_all = "snake_case")]
#[schemars(rename = "agent.OutputMode")]
pub enum OutputMode {
#[schemars(title = "Instruction")]
Instruction,
#[schemars(title = "JsonSchema")]
JsonSchema,
#[schemars(title = "ToolCall")]
ToolCall,
}
impl std::default::Default for OutputMode {
fn default() -> Self {
OutputMode::Instruction
}
}
impl From<super::openrouter::OutputMode> for OutputMode {
fn from(mode: super::openrouter::OutputMode) -> Self {
match mode {
super::openrouter::OutputMode::Instruction => {
OutputMode::Instruction
}
super::openrouter::OutputMode::JsonSchema => OutputMode::JsonSchema,
super::openrouter::OutputMode::ToolCall => OutputMode::ToolCall,
}
}
}
impl From<super::claude_agent_sdk::OutputMode> for OutputMode {
fn from(mode: super::claude_agent_sdk::OutputMode) -> Self {
match mode {
super::claude_agent_sdk::OutputMode::Instruction => {
OutputMode::Instruction
}
}
}
}
impl From<super::codex_sdk::OutputMode> for OutputMode {
fn from(mode: super::codex_sdk::OutputMode) -> Self {
match mode {
super::codex_sdk::OutputMode::Instruction => OutputMode::Instruction,
}
}
}
impl From<super::mock::OutputMode> for OutputMode {
fn from(mode: super::mock::OutputMode) -> Self {
match mode {
super::mock::OutputMode::Instruction => OutputMode::Instruction,
super::mock::OutputMode::JsonSchema => OutputMode::JsonSchema,
super::mock::OutputMode::ToolCall => OutputMode::ToolCall,
}
}
}