objectiveai_sdk/agent/
output_mode.rs1use serde::{Deserialize, Serialize};
8use schemars::JsonSchema;
9
10#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Hash, JsonSchema)]
18#[serde(rename_all = "snake_case")]
19#[schemars(rename = "agent.OutputMode")]
20pub enum OutputMode {
21 #[schemars(title = "Instruction")]
25 Instruction,
26 #[schemars(title = "JsonSchema")]
30 JsonSchema,
31 #[schemars(title = "ToolCall")]
35 ToolCall,
36}
37
38impl std::default::Default for OutputMode {
39 fn default() -> Self {
40 OutputMode::Instruction
41 }
42}
43
44impl From<super::openrouter::OutputMode> for OutputMode {
45 fn from(mode: super::openrouter::OutputMode) -> Self {
46 match mode {
47 super::openrouter::OutputMode::Instruction => {
48 OutputMode::Instruction
49 }
50 super::openrouter::OutputMode::JsonSchema => OutputMode::JsonSchema,
51 super::openrouter::OutputMode::ToolCall => OutputMode::ToolCall,
52 }
53 }
54}
55
56impl From<super::claude_agent_sdk::OutputMode> for OutputMode {
57 fn from(mode: super::claude_agent_sdk::OutputMode) -> Self {
58 match mode {
59 super::claude_agent_sdk::OutputMode::Instruction => {
60 OutputMode::Instruction
61 }
62 }
63 }
64}
65
66impl From<super::codex_sdk::OutputMode> for OutputMode {
67 fn from(mode: super::codex_sdk::OutputMode) -> Self {
68 match mode {
69 super::codex_sdk::OutputMode::Instruction => OutputMode::Instruction,
70 }
71 }
72}
73
74impl From<super::mock::OutputMode> for OutputMode {
75 fn from(mode: super::mock::OutputMode) -> Self {
76 match mode {
77 super::mock::OutputMode::Instruction => OutputMode::Instruction,
78 super::mock::OutputMode::JsonSchema => OutputMode::JsonSchema,
79 super::mock::OutputMode::ToolCall => OutputMode::ToolCall,
80 }
81 }
82}