Skip to content

Conversation

SkinnnyJay
Copy link

@SkinnnyJay SkinnnyJay commented Sep 14, 2025

Changes being requested

Adds missing type support for the documented include value to resolve TypeScript compile errors without affecting runtime behavior.

Core changes:

  • Extend ResponseIncludable to include 'web_search_call.action.sources'.
  • File touched: src/resources/responses/responses.ts (surgical one-line union addition).

Test coverage:

  • Add a long-term invariant test to ensure the includable literal is accepted and arbitrary strings are rejected: tests/responses.includable.test.ts.
  • Remove temporary tests under tests/temp/* after validating the fix.

Additional context & links

Bug: #1645

This addresses TypeScript errors when using the documented include 'web_search_call.action.sources' in the Responses API.

Problem:
The OpenAPI description listed the value, but the enum omitted it. The SDK’s generated types mirror the enum, so the literal was missing and caused the TS compile
failures.

Solution:
Include the missing literal in ResponseIncludable and add focused tests to prevent regressions. This is a minimal, type-only change with no runtime impact.

Impact:

  • ✅ Restores type-safety for the documented include
  • ✅ No runtime behavior changes
  • ✅ Minimal, surgical change
  • ✅ Tests added to guard against regressions

✅ I understand that this repository is auto-generated, and my pull request may not be merged

…invariant\n\n- Add temp repro in tests/temp demonstrating missing includable (now parked post-fix)\n- Add post-fix type assertion test in tests/temp\n- Add long-term invariant test in tests/ to guard against regressions
Align types with documented include values; enables post-fix tests.
@SkinnnyJay SkinnnyJay requested a review from a team as a code owner September 14, 2025 04:17
@SkinnnyJay SkinnnyJay mentioned this pull request Sep 14, 2025
1 task
@SkinnnyJay
Copy link
Author

Ready for review..

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.

1 participant