Description
Objective
Understand whether it is expected behavior that no audio response is triggered after an MCP call completes when using the Realtime API.
Context
We are using the Realtime API with MCP enabled.
When an MCP call completes, we receive the event:
⚠️ Unhandled message type: response.mcp_call.completed
However, no responseAudioDelta event is emitted afterward. As a result, audio playback is not triggered automatically.
To get audio output, we currently have to send another user message (for example, “Do you have a result yet?”) to trigger responseAudioDelta.
What We Observed
In OpenAIRealtimeSession.swift, there does not appear to be a handler for:
response.mcp_call.completed Reference:
|
// MCP (Model Context Protocol) message types |
Suggested Improvement
If response.mcp_call.completed were handled, we could use it to manually trigger a response using:
session.sendMessage(OpenAIRealtimeResponseCreate())
This would in theory allow us to invoke a response and start audio playback without requiring an additional user prompt.
Request
Is this the expected behavior?
If not, should support for handling response.mcp_call.completed be added?
Description
Objective
Understand whether it is expected behavior that no audio response is triggered after an MCP call completes when using the Realtime API.
Context
We are using the Realtime API with MCP enabled.
When an MCP call completes, we receive the event:
⚠️ Unhandled message type: response.mcp_call.completedHowever, no responseAudioDelta event is emitted afterward. As a result, audio playback is not triggered automatically.
To get audio output, we currently have to send another user message (for example, “Do you have a result yet?”) to trigger responseAudioDelta.
What We Observed
In
OpenAIRealtimeSession.swift, there does not appear to be a handler for:response.mcp_call.completedReference:SwiftOpenAI/Sources/OpenAI/Private/Realtime/OpenAIRealtimeSession.swift
Line 214 in b138a46
Suggested Improvement
If
response.mcp_call.completedwere handled, we could use it to manually trigger a response using:This would in theory allow us to invoke a response and start audio playback without requiring an additional user prompt.
Request
Is this the expected behavior?
If not, should support for handling
response.mcp_call.completedbe added?