Skip to content

Conversation

@mattapperson
Copy link
Collaborator

Summary

Changes

Type Safety Improvements

  • Add type guard isNonStreamingResponse for safer response type checking
  • Refactor IIFE patterns in getMessage/getText to private helper methods (getMessageInternal/getTextInternal)
  • Add validation before assigning finalResponse
  • Fix embeddings types to match API response structure

Code Quality

  • Add braces to single-line if statements for readability
  • Implement cleaner inline casts in stream handling

CI/Build

  • Switch to pnpm for package management
  • Add pnpm setup to Speakeasy workflow
  • Remove redundant test typecheck step (handled by build and vitest)

Test plan

  • Existing tests pass
  • Type checking passes with pnpm exec tsc
  • Linting passes with pnpm exec biome check

@mattapperson mattapperson merged commit b458181 into main Dec 2, 2025
2 checks passed
@mattapperson mattapperson deleted the matt/fix-more-types branch December 2, 2025 20:10
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