Problem
When using BYOK with Azure OpenAI (provider "openai", wireApi "responses"), reasoning models (e.g., gpt-5.4, o3, o4-mini) consume reasoning tokens but the thinking/reasoning text is never exposed to the SDK consumer. The AssistantReasoningDeltaEvent events are never emitted.
Root Cause
The Azure OpenAI Responses API requires the reasoning.summary parameter in the request body to expose reasoning text. Without it, the provider performs reasoning internally but returns an empty summary array.
Without reasoning.summary:
// Request
{"model":"gpt-5.4","reasoning":{"effort":"high"},"input":"Why is 2+2=4?","stream":false}
// Response — reasoning tokens consumed, but summary is empty
"output": [{ "type": "reasoning", "summary": [] }]
"usage": { "output_tokens_details": { "reasoning_tokens": 173 } }
With reasoning.summary: "auto":
// Request
{"model":"gpt-5.4","reasoning":{"effort":"high","summary":"auto"},"input":"Why is 2+2=4?","stream":false}
// Response — reasoning text is exposed
"output": [{
"type": "reasoning",
"summary": [{ "type": "summary_text", "text": "Explaining why 2+2=4... I need to answer the user's question..." }]
}]
"usage": { "output_tokens_details": { "reasoning_tokens": 231 } }
Tested directly against Azure OpenAI endpoint https://{resource}.openai.azure.com/openai/v1/responses — both calls succeed, the only difference is the summary field in the reasoning object.
What's Already Wired (SDK side)
The SDK receive pipeline is fully implemented:
AssistantReasoningDeltaEvent / AssistantReasoningDeltaData.DeltaContent — exists in event types
SessionConfig.Streaming = true — enables delta events
SessionConfig.ReasoningEffort — maps to reasoning.effort ✅
ModelCapabilitiesOverride.Supports.ReasoningEffort — capability flag ✅
The only missing piece is sending reasoning.summary in the request body.
Proposed Solution
Add a ReasoningSummary property to SessionConfig (and ResumeSessionConfig):
/// <summary>
/// Reasoning summary mode for models that support it.
/// Valid values: "auto", "concise", "detailed".
/// When set, the provider includes reasoning summary text in the response,
/// which is emitted as AssistantReasoningDeltaEvent when streaming is enabled.
/// </summary>
public string? ReasoningSummary { get; set; }
The CLI would then include it in the reasoning object of the Responses API request:
{
"reasoning": {
"effort": "high",
"summary": "auto"
}
}
Environment
- SDK version: v0.3.0 (also verified against
main branch source)
- CLI version: 1.0.36
- Provider: Azure OpenAI (
"openai" provider type, "responses" wireApi)
- Models tested:
gpt-5.4 (Azure deployment)
- OS: Windows 11
Related Issues
Problem
When using BYOK with Azure OpenAI (provider
"openai", wireApi"responses"), reasoning models (e.g.,gpt-5.4,o3,o4-mini) consume reasoning tokens but the thinking/reasoning text is never exposed to the SDK consumer. TheAssistantReasoningDeltaEventevents are never emitted.Root Cause
The Azure OpenAI Responses API requires the
reasoning.summaryparameter in the request body to expose reasoning text. Without it, the provider performs reasoning internally but returns an empty summary array.Without
reasoning.summary:With
reasoning.summary: "auto":Tested directly against Azure OpenAI endpoint
https://{resource}.openai.azure.com/openai/v1/responses— both calls succeed, the only difference is thesummaryfield in thereasoningobject.What's Already Wired (SDK side)
The SDK receive pipeline is fully implemented:
AssistantReasoningDeltaEvent/AssistantReasoningDeltaData.DeltaContent— exists in event typesSessionConfig.Streaming = true— enables delta eventsSessionConfig.ReasoningEffort— maps toreasoning.effort✅ModelCapabilitiesOverride.Supports.ReasoningEffort— capability flag ✅The only missing piece is sending
reasoning.summaryin the request body.Proposed Solution
Add a
ReasoningSummaryproperty toSessionConfig(andResumeSessionConfig):The CLI would then include it in the
reasoningobject of the Responses API request:{ "reasoning": { "effort": "high", "summary": "auto" } }Environment
mainbranch source)"openai"provider type,"responses"wireApi)gpt-5.4(Azure deployment)Related Issues
reasoning_effortfor BYOK (fixed)reasoning.effortformat (fixed in CLI 1.0.14+)ModelCapabilitiesOverride(fixed)reasoningEffort(implemented)