Skip to main content

gproxy_protocol/claude/common/
output.rs

1use serde::{Deserialize, Serialize};
2
3use super::{JsonSchemaFormat, OutputEffort, TaskBudgetType};
4
5#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
6#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
7pub struct OutputConfig {
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub effort: Option<OutputEffort>,
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub format: Option<JsonSchemaFormat>,
12    #[serde(skip_serializing_if = "Option::is_none")]
13    pub task_budget: Option<TokenTaskBudget>,
14    #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
15    pub rest: serde_json::Map<String, serde_json::Value>,
16}
17
18#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
19#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
20pub struct SystemMessageOutputConfig {
21    #[serde(skip_serializing_if = "Option::is_none")]
22    pub effort: Option<OutputEffort>,
23    #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
24    pub rest: serde_json::Map<String, serde_json::Value>,
25}
26
27#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
28#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
29pub struct TokenTaskBudget {
30    pub total: u64,
31    #[serde(rename = "type")]
32    pub type_: TaskBudgetType,
33    #[serde(skip_serializing_if = "Option::is_none")]
34    pub remaining: Option<u64>,
35    #[serde(default, flatten, skip_serializing_if = "serde_json::Map::is_empty")]
36    pub rest: serde_json::Map<String, serde_json::Value>,
37}