Add opt-in reasoning status for realtime V3 delegations (#47377)

## What changed

Add `backend_reasoning_status`, disabled by default, to relay public reasoning summaries during active, server-managed realtime V3 delegations.

Use the last non-empty summary from each completed reasoning item, truncate it to 256 bytes at a character boundary, and append it as `[STATUS]` context on the `commentary` channel. Discard queued updates if their delegation is no longer active.

## Testing

Add an integration test covering enabled and disabled behavior, selection of the latest non-empty summary, exclusion of raw reasoning and partial summaries, and delivery without triggering `response.create` or changing the model's reasoning-summary setting.

GitOrigin-RevId: 75ce87dbbbab15a6d9d0ad0b23737738837192fd
This commit is contained in:
guinness-oai
2026-09-22 22:20:00 +00:00
committed by copyberry
parent 418199f6ad
commit 90e653014a
20 changed files with 303 additions and 9 deletions
@@ -220,6 +220,9 @@ pub struct ThreadRealtimeStartParams {
/// default to `thinking`. Realtime V1 and V2 ignore this setting.
#[ts(optional = nullable)]
pub codex_response_handoff_mode: Option<CodexResponseHandoffMode>,
/// Relays public reasoning summaries as quiet context for realtime V3 delegations. Defaults to false.
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
pub backend_reasoning_status: bool,
/// Overrides BEM channel prefixes by `analysis`, `commentary`, or `final`.
/// Omitted channels retain their default uppercase bracketed prefixes.
#[ts(optional = nullable)]