fix: correct telemetry response for Responses API output#3733
Merged
roblourens merged 3 commits intomicrosoft:mainfrom Feb 17, 2026
Merged
fix: correct telemetry response for Responses API output#3733roblourens merged 3 commits intomicrosoft:mainfrom
roblourens merged 3 commits intomicrosoft:mainfrom
Conversation
The test was asserting messagesJson[0].content[0].text but rawMessageToCAPI converts single text content parts to a plain string, so content is a string not an array. Updated assertion to check messagesJson[0].content directly. Also added telemetry emission (sendEngineMessagesTelemetry) to processResponseFromChatEndpoint so engine.messages events are sent for Responses API completions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds telemetry emission coverage for the OpenAI Responses API stream handling, ensuring assistant output is logged via the existing engine.messages telemetry pathway.
Changes:
- Emit
engine.messagestelemetry when a Responses API stream yields a completed assistant message. - Add a unit test that validates
engine.messagesis emitted and contains the assistant’s final text output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/platform/endpoint/node/test/responsesApi.spec.ts | Adds a unit test asserting engine.messages telemetry contains the Responses API assistant output. |
| src/platform/endpoint/node/responsesApi.ts | Sends engine.messages telemetry for the final response.completed assistant message (including token usage measurements when available). |
607e5e1 to
107088f
Compare
roblourens
previously approved these changes
Feb 13, 2026
…stant_telemetry # Conflicts: # src/platform/endpoint/node/responsesApi.ts
auto-merge was automatically disabled
February 17, 2026 18:06
Head branch was pushed to by a user without write access
e8ab62e to
b4a28b4
Compare
roblourens
approved these changes
Feb 17, 2026
dmitrivMS
approved these changes
Feb 17, 2026
karthiknadig
pushed a commit
that referenced
this pull request
Feb 24, 2026
Cherry-pick of 1af66f4 from main
karthiknadig
added a commit
that referenced
this pull request
Feb 24, 2026
fix: correct telemetry response for Responses API output (cherry-pick #3733)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.