objectiveai_sdk/agent/codex_sdk/output_mode.rs
1//! Output mode configuration for vector completions.
2//!
3//! The output mode determines how the LLM is constrained to select from
4//! a set of predefined responses during vector completion. This setting
5//! is **only used for vector completions** and is ignored for agent completions.
6
7use serde::{Deserialize, Serialize};
8use schemars::JsonSchema;
9
10/// The method used to constrain LLM output to valid response keys.
11///
12/// In vector completions, the model must select from a predefined set of
13/// responses. This enum controls *how* that constraint is enforced.
14///
15/// **Note:** This setting is only relevant for vector completions and is
16/// completely ignored for agent completions.
17#[derive(
18 Clone, Copy, Debug, Default, Serialize, Deserialize, PartialEq, Hash, JsonSchema, arbitrary::Arbitrary,
19)]
20#[serde(rename_all = "snake_case")]
21#[schemars(rename = "agent.codex_sdk.OutputMode")]
22pub enum OutputMode {
23 /// The model is instructed via the prompt to output a specific key.
24 ///
25 /// This is the default and most widely supported mode.
26 #[default]
27 Instruction,
28}