mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
[codex] Wire reasoning summary delivery config
This commit is contained in:
@@ -2300,6 +2300,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReasoningSummaryDelivery": {
|
||||
"description": "Controls when reasoning summaries are delivered relative to later response items.",
|
||||
"enum": [
|
||||
"sequential",
|
||||
"concurrent",
|
||||
"concurrent_cutoff"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"RemoteControlDisableParams": {
|
||||
"properties": {
|
||||
"ephemeral": {
|
||||
@@ -3673,6 +3682,23 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -4184,6 +4210,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -4361,6 +4404,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
+70
@@ -7936,6 +7936,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoning_summary_delivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"review_model": {
|
||||
"type": [
|
||||
"string",
|
||||
@@ -14844,6 +14854,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReasoningSummaryDelivery": {
|
||||
"description": "Controls when reasoning summaries are delivered relative to later response items.",
|
||||
"enum": [
|
||||
"sequential",
|
||||
"concurrent",
|
||||
"concurrent_cutoff"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ReasoningSummaryPartAddedNotification": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
@@ -17329,6 +17348,23 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -19062,6 +19098,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -19459,6 +19512,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
+70
@@ -4176,6 +4176,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoning_summary_delivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"review_model": {
|
||||
"type": [
|
||||
"string",
|
||||
@@ -11248,6 +11258,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReasoningSummaryDelivery": {
|
||||
"description": "Controls when reasoning summaries are delivered relative to later response items.",
|
||||
"enum": [
|
||||
"sequential",
|
||||
"concurrent",
|
||||
"concurrent_cutoff"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ReasoningSummaryPartAddedNotification": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
@@ -15108,6 +15127,23 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -16841,6 +16877,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -17238,6 +17291,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
@@ -381,6 +381,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoning_summary_delivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"review_model": {
|
||||
"type": [
|
||||
"string",
|
||||
@@ -710,6 +720,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReasoningSummaryDelivery": {
|
||||
"description": "Controls when reasoning summaries are delivered relative to later response items.",
|
||||
"enum": [
|
||||
"sequential",
|
||||
"concurrent",
|
||||
"concurrent_cutoff"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"SandboxMode": {
|
||||
"enum": [
|
||||
"read-only",
|
||||
|
||||
@@ -63,6 +63,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReasoningSummaryDelivery": {
|
||||
"description": "Controls when reasoning summaries are delivered relative to later response items.",
|
||||
"enum": [
|
||||
"sequential",
|
||||
"concurrent",
|
||||
"concurrent_cutoff"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"SandboxMode": {
|
||||
"enum": [
|
||||
"read-only",
|
||||
@@ -146,6 +155,23 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
@@ -449,6 +449,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReasoningSummaryDelivery": {
|
||||
"description": "Controls when reasoning summaries are delivered relative to later response items.",
|
||||
"enum": [
|
||||
"sequential",
|
||||
"concurrent",
|
||||
"concurrent_cutoff"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ResponseItem": {
|
||||
"oneOf": [
|
||||
{
|
||||
@@ -1398,6 +1407,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
@@ -227,6 +227,15 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ReasoningSummaryDelivery": {
|
||||
"description": "Controls when reasoning summaries are delivered relative to later response items.",
|
||||
"enum": [
|
||||
"sequential",
|
||||
"concurrent",
|
||||
"concurrent_cutoff"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"SandboxMode": {
|
||||
"enum": [
|
||||
"read-only",
|
||||
@@ -365,6 +374,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"reasoningSummaryDelivery": {
|
||||
"anyOf": [
|
||||
{
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ReasoningSummaryDelivery"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Controls when reasoning summaries are delivered relative to later response items.
|
||||
*/
|
||||
export type ReasoningSummaryDelivery = "sequential" | "concurrent" | "concurrent_cutoff";
|
||||
@@ -64,6 +64,7 @@ export type { ReasoningEffort } from "./ReasoningEffort";
|
||||
export type { ReasoningItemContent } from "./ReasoningItemContent";
|
||||
export type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary";
|
||||
export type { ReasoningSummary } from "./ReasoningSummary";
|
||||
export type { ReasoningSummaryDelivery } from "./ReasoningSummaryDelivery";
|
||||
export type { RequestId } from "./RequestId";
|
||||
export type { Resource } from "./Resource";
|
||||
export type { ResourceContent } from "./ResourceContent";
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@ import type { AutoCompactTokenLimitScope } from "../AutoCompactTokenLimitScope";
|
||||
import type { ForcedLoginMethod } from "../ForcedLoginMethod";
|
||||
import type { ReasoningEffort } from "../ReasoningEffort";
|
||||
import type { ReasoningSummary } from "../ReasoningSummary";
|
||||
import type { ReasoningSummaryDelivery } from "../ReasoningSummaryDelivery";
|
||||
import type { Verbosity } from "../Verbosity";
|
||||
import type { WebSearchMode } from "../WebSearchMode";
|
||||
import type { JsonValue } from "../serde_json/JsonValue";
|
||||
@@ -20,4 +21,4 @@ export type Config = {model: string | null, review_model: string | null, model_c
|
||||
* [UNSTABLE] Optional default for where approval requests are routed for
|
||||
* review.
|
||||
*/
|
||||
approvals_reviewer: ApprovalsReviewer | null, sandbox_mode: SandboxMode | null, sandbox_workspace_write: SandboxWorkspaceWrite | null, forced_chatgpt_workspace_id: ForcedChatgptWorkspaceIds | null, forced_login_method: ForcedLoginMethod | null, web_search: WebSearchMode | null, tools: ToolsV2 | null, instructions: string | null, developer_instructions: string | null, compact_prompt: string | null, model_reasoning_effort: ReasoningEffort | null, model_reasoning_summary: ReasoningSummary | null, model_verbosity: Verbosity | null, service_tier: string | null, analytics: AnalyticsConfig | null, desktop: { [key in string]?: JsonValue } | null} & ({ [key in string]?: number | string | boolean | Array<JsonValue> | { [key in string]?: JsonValue } | null });
|
||||
approvals_reviewer: ApprovalsReviewer | null, sandbox_mode: SandboxMode | null, sandbox_workspace_write: SandboxWorkspaceWrite | null, forced_chatgpt_workspace_id: ForcedChatgptWorkspaceIds | null, forced_login_method: ForcedLoginMethod | null, web_search: WebSearchMode | null, tools: ToolsV2 | null, instructions: string | null, developer_instructions: string | null, compact_prompt: string | null, model_reasoning_effort: ReasoningEffort | null, model_reasoning_summary: ReasoningSummary | null, reasoning_summary_delivery: ReasoningSummaryDelivery | null, model_verbosity: Verbosity | null, service_tier: string | null, analytics: AnalyticsConfig | null, desktop: { [key in string]?: JsonValue } | null} & ({ [key in string]?: number | string | boolean | Array<JsonValue> | { [key in string]?: JsonValue } | null });
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ReasoningSummaryDelivery } from "../ReasoningSummaryDelivery";
|
||||
import type { JsonValue } from "../serde_json/JsonValue";
|
||||
import type { ApprovalsReviewer } from "./ApprovalsReviewer";
|
||||
import type { AskForApproval } from "./AskForApproval";
|
||||
@@ -30,7 +31,7 @@ model?: string | null, modelProvider?: string | null, serviceTier?: string | nul
|
||||
* Override where approval requests are routed for review on this thread
|
||||
* and subsequent turns.
|
||||
*/
|
||||
approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, ephemeral?: boolean, /**
|
||||
approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, reasoningSummaryDelivery?: ReasoningSummaryDelivery | null | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, ephemeral?: boolean, /**
|
||||
* Optional client-supplied analytics source classification for this forked thread.
|
||||
*/
|
||||
threadSource?: ThreadSource | null};
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Personality } from "../Personality";
|
||||
import type { ReasoningSummaryDelivery } from "../ReasoningSummaryDelivery";
|
||||
import type { JsonValue } from "../serde_json/JsonValue";
|
||||
import type { ApprovalsReviewer } from "./ApprovalsReviewer";
|
||||
import type { AskForApproval } from "./AskForApproval";
|
||||
@@ -30,4 +31,4 @@ model?: string | null, modelProvider?: string | null, serviceTier?: string | nul
|
||||
* Override where approval requests are routed for review on this thread
|
||||
* and subsequent turns.
|
||||
*/
|
||||
approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null};
|
||||
approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, reasoningSummaryDelivery?: ReasoningSummaryDelivery | null | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null};
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Personality } from "../Personality";
|
||||
import type { ReasoningSummaryDelivery } from "../ReasoningSummaryDelivery";
|
||||
import type { JsonValue } from "../serde_json/JsonValue";
|
||||
import type { ApprovalsReviewer } from "./ApprovalsReviewer";
|
||||
import type { AskForApproval } from "./AskForApproval";
|
||||
@@ -13,7 +14,7 @@ export type ThreadStartParams = {model?: string | null, modelProvider?: string |
|
||||
* Override where approval requests are routed for review on this thread
|
||||
* and subsequent turns.
|
||||
*/
|
||||
approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, serviceName?: string | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, ephemeral?: boolean | null, sessionStartSource?: ThreadStartSource | null, /**
|
||||
approvalsReviewer?: ApprovalsReviewer | null, sandbox?: SandboxMode | null, reasoningSummaryDelivery?: ReasoningSummaryDelivery | null | null, config?: { [key in string]?: JsonValue } | null, serviceName?: string | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, ephemeral?: boolean | null, sessionStartSource?: ThreadStartSource | null, /**
|
||||
* Optional client-supplied analytics source classification for this thread.
|
||||
*/
|
||||
threadSource?: ThreadSource | null};
|
||||
|
||||
@@ -7,6 +7,7 @@ use codex_experimental_api_macros::ExperimentalApi;
|
||||
use codex_protocol::config_types::AutoCompactTokenLimitScope;
|
||||
use codex_protocol::config_types::ForcedLoginMethod;
|
||||
use codex_protocol::config_types::ReasoningSummary;
|
||||
use codex_protocol::config_types::ReasoningSummaryDelivery;
|
||||
use codex_protocol::config_types::Verbosity;
|
||||
use codex_protocol::config_types::WebSearchMode;
|
||||
use codex_protocol::config_types::WebSearchToolConfig;
|
||||
@@ -265,6 +266,7 @@ pub struct Config {
|
||||
pub compact_prompt: Option<String>,
|
||||
pub model_reasoning_effort: Option<ReasoningEffort>,
|
||||
pub model_reasoning_summary: Option<ReasoningSummary>,
|
||||
pub reasoning_summary_delivery: Option<ReasoningSummaryDelivery>,
|
||||
pub model_verbosity: Option<Verbosity>,
|
||||
pub service_tier: Option<String>,
|
||||
pub analytics: Option<AnalyticsConfig>,
|
||||
|
||||
@@ -2,6 +2,7 @@ use super::*;
|
||||
use crate::ServerNotification;
|
||||
use codex_protocol::approvals::ElicitationRequest as CoreElicitationRequest;
|
||||
use codex_protocol::config_types::MultiAgentMode;
|
||||
use codex_protocol::config_types::ReasoningSummaryDelivery;
|
||||
use codex_protocol::items::AgentMessageContent;
|
||||
use codex_protocol::items::AgentMessageItem;
|
||||
use codex_protocol::items::CollabAgentTool as CoreCollabAgentTool;
|
||||
@@ -1718,6 +1719,7 @@ fn config_granular_approval_policy_is_marked_experimental() {
|
||||
compact_prompt: None,
|
||||
model_reasoning_effort: None,
|
||||
model_reasoning_summary: None,
|
||||
reasoning_summary_delivery: None,
|
||||
model_verbosity: None,
|
||||
service_tier: None,
|
||||
analytics: None,
|
||||
@@ -1751,6 +1753,7 @@ fn config_approvals_reviewer_is_marked_experimental() {
|
||||
compact_prompt: None,
|
||||
model_reasoning_effort: None,
|
||||
model_reasoning_summary: None,
|
||||
reasoning_summary_delivery: None,
|
||||
model_verbosity: None,
|
||||
service_tier: None,
|
||||
analytics: None,
|
||||
@@ -3921,20 +3924,40 @@ fn dynamic_tool_response_serializes_text_and_image_content_items() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn thread_start_params_preserve_explicit_null_service_tier() {
|
||||
let params: ThreadStartParams =
|
||||
serde_json::from_value(json!({ "serviceTier": null })).expect("params should deserialize");
|
||||
fn thread_start_params_preserve_nullable_overrides() {
|
||||
let params: ThreadStartParams = serde_json::from_value(json!({
|
||||
"serviceTier": null,
|
||||
"reasoningSummaryDelivery": "concurrent_cutoff"
|
||||
}))
|
||||
.expect("params should deserialize");
|
||||
assert_eq!(params.service_tier, Some(None));
|
||||
assert_eq!(
|
||||
params.reasoning_summary_delivery,
|
||||
Some(Some(ReasoningSummaryDelivery::ConcurrentCutoff))
|
||||
);
|
||||
|
||||
let serialized = serde_json::to_value(¶ms).expect("params should serialize");
|
||||
assert_eq!(
|
||||
serialized.get("serviceTier"),
|
||||
Some(&serde_json::Value::Null)
|
||||
);
|
||||
assert_eq!(
|
||||
serialized.get("reasoningSummaryDelivery"),
|
||||
Some(&json!("concurrent_cutoff"))
|
||||
);
|
||||
|
||||
let params: ThreadStartParams =
|
||||
serde_json::from_value(json!({ "reasoningSummaryDelivery": null }))
|
||||
.expect("params should deserialize");
|
||||
assert_eq!(params.reasoning_summary_delivery, Some(None));
|
||||
|
||||
let serialized_without_override =
|
||||
serde_json::to_value(ThreadStartParams::default()).expect("params should serialize");
|
||||
assert_eq!(serialized_without_override.get("serviceTier"), None);
|
||||
assert_eq!(
|
||||
serialized_without_override.get("reasoningSummaryDelivery"),
|
||||
None
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -18,6 +18,7 @@ use codex_protocol::config_types::CollaborationMode;
|
||||
use codex_protocol::config_types::MultiAgentMode;
|
||||
use codex_protocol::config_types::Personality;
|
||||
use codex_protocol::config_types::ReasoningSummary;
|
||||
use codex_protocol::config_types::ReasoningSummaryDelivery;
|
||||
pub use codex_protocol::dynamic_tools::DynamicToolFunctionSpec;
|
||||
pub use codex_protocol::dynamic_tools::DynamicToolNamespaceSpec;
|
||||
pub use codex_protocol::dynamic_tools::DynamicToolNamespaceTool;
|
||||
@@ -90,6 +91,14 @@ pub struct ThreadStartParams {
|
||||
#[experimental("thread/start.permissions")]
|
||||
#[ts(optional = nullable)]
|
||||
pub permissions: Option<String>,
|
||||
#[serde(
|
||||
default,
|
||||
deserialize_with = "crate::protocol::serde_helpers::deserialize_double_option",
|
||||
serialize_with = "crate::protocol::serde_helpers::serialize_double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[ts(optional = nullable)]
|
||||
pub reasoning_summary_delivery: Option<Option<ReasoningSummaryDelivery>>,
|
||||
#[ts(optional = nullable)]
|
||||
pub config: Option<HashMap<String, JsonValue>>,
|
||||
#[ts(optional = nullable)]
|
||||
@@ -376,6 +385,14 @@ pub struct ThreadResumeParams {
|
||||
#[experimental("thread/resume.permissions")]
|
||||
#[ts(optional = nullable)]
|
||||
pub permissions: Option<String>,
|
||||
#[serde(
|
||||
default,
|
||||
deserialize_with = "crate::protocol::serde_helpers::deserialize_double_option",
|
||||
serialize_with = "crate::protocol::serde_helpers::serialize_double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[ts(optional = nullable)]
|
||||
pub reasoning_summary_delivery: Option<Option<ReasoningSummaryDelivery>>,
|
||||
#[ts(optional = nullable)]
|
||||
pub config: Option<HashMap<String, serde_json::Value>>,
|
||||
#[ts(optional = nullable)]
|
||||
@@ -544,6 +561,14 @@ pub struct ThreadForkParams {
|
||||
#[experimental("thread/fork.permissions")]
|
||||
#[ts(optional = nullable)]
|
||||
pub permissions: Option<String>,
|
||||
#[serde(
|
||||
default,
|
||||
deserialize_with = "crate::protocol::serde_helpers::deserialize_double_option",
|
||||
serialize_with = "crate::protocol::serde_helpers::serialize_double_option",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[ts(optional = nullable)]
|
||||
pub reasoning_summary_delivery: Option<Option<ReasoningSummaryDelivery>>,
|
||||
#[ts(optional = nullable)]
|
||||
pub config: Option<HashMap<String, serde_json::Value>>,
|
||||
#[ts(optional = nullable)]
|
||||
|
||||
Reference in New Issue
Block a user