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 schemars::JsonSchema;
8use serde::{Deserialize, Serialize};
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,
19 Copy,
20 Debug,
21 Default,
22 Serialize,
23 Deserialize,
24 PartialEq,
25 Hash,
26 JsonSchema,
27 arbitrary::Arbitrary,
28)]
29#[serde(rename_all = "snake_case")]
30#[schemars(rename = "agent.codex_sdk.OutputMode")]
31pub enum OutputMode {
32 /// The model is instructed via the prompt to output a specific key.
33 ///
34 /// This is the default and most widely supported mode.
35 #[default]
36 Instruction,
37}