Skip to content

Add defaults for type fields in types.beta.realtime and support open str type for session.model #2479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kfinn-soundhound
Copy link

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

Changes being requested

  • Add defaults for type fields in types.beta.realtime

This makes it simpler and cleaner to programmatically construct events for more complex client flows - the type is redundant with class name in practice.

  • Add str fallback for SessionUpdateEvent.session.model field

This makes it more flexible to use different client and server versions as things evolve over time. And it's consistent with how voice field is handled.

Additional context & links

this is consistent with voice field now

and it allows more flexibilty between client and server versions
Makes it cleaner to programmatically construct events if needed

The type fields were previously required to construct,
but only accepted one possible value, so it was unneeded verbosity

Done with automated find/replace in realtime folder:
type: Literal\["([\w\.]+)"\]
type: Literal["$1"] = "$1"
@kfinn-soundhound kfinn-soundhound requested a review from a team as a code owner July 18, 2025 17:18
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