Skip to content

fix: type structured MCP call errors#1940

Open
kiwigitops wants to merge 1 commit into
openai:mainfrom
kiwigitops:fix-response-mcp-call-error-object
Open

fix: type structured MCP call errors#1940
kiwigitops wants to merge 1 commit into
openai:mainfrom
kiwigitops:fix-response-mcp-call-error-object

Conversation

@kiwigitops

Copy link
Copy Markdown
Contributor

Fixes #1568.

Summary:

  • add a Responses-specific ResponseMcpCallError object type for MCP tool failures
  • allow mcp_call.error to be either the existing string value or a structured error object
  • add a regression for the reported mcp_protocol_error payload

Verification:

  • jest tests/responsesItems.test.ts --runInBand
  • prettier --check src/resources/responses/responses.ts tests/responsesItems.test.ts
  • eslint src/resources/responses/responses.ts tests/responsesItems.test.ts
  • tsc --noEmit --pretty false
  • git diff --check

@kiwigitops kiwigitops requested a review from a team as a code owner June 15, 2026 08:47

Copy link
Copy Markdown
Contributor Author

Quick bump on this. Happy to adjust the type shape or test coverage if you'd prefer a different approach.

@HAYDEN-OAI HAYDEN-OAI added the upstream Needs to be addressed in Stainless upstream label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Needs to be addressed in Stainless upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect type for mcp_call Response output item

2 participants