Skip to content

Fix message logging for Response API requests#3226

Merged
alexdima merged 2 commits intomainfrom
alexd/damp-echidna
Jan 28, 2026
Merged

Fix message logging for Response API requests#3226
alexdima merged 2 commits intomainfrom
alexd/damp-echidna

Conversation

@alexdima
Copy link
Member

Response API uses input field instead of messages. This PR converts the input field to standard messages format when logging to ensure consistent data across all API types.

Changes:

  • Convert Response API input to messages format during logging
  • Add graceful fallback if conversion fails

Impact: Consistent message logging for both Response API and ChatCompletion API models.

Response API uses `input` field instead of `messages`. Convert input to
messages format when logging to ensure consistent data across all API types.
Copilot AI review requested due to automatic review settings January 28, 2026 10:24
@alexdima alexdima self-assigned this Jan 28, 2026
@alexdima alexdima requested a review from roblourens January 28, 2026 10:24
@alexdima alexdima enabled auto-merge January 28, 2026 10:24
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 28, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes message logging inconsistencies for Response API requests by converting the input field to the standard messages format used in telemetry. Response API uses a different request format than ChatCompletion API, but both need consistent logging.

Changes:

  • Added conversion logic to detect Response API requests (those with input instead of messages)
  • Convert Response API input to messages format for telemetry logging using existing utility functions
  • Added error handling with fallback to empty array if conversion fails

@alexdima alexdima added this pull request to the merge queue Jan 28, 2026
Merged via the queue into main with commit b6c46ea Jan 28, 2026
19 checks passed
@alexdima alexdima deleted the alexd/damp-echidna branch January 28, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants