Skip to content

fix(listen): warn when keywords is used with nova-3 model#480

Open
peteroyce wants to merge 1 commit intodeepgram:mainfrom
peteroyce:fix/warn-keywords-incompatible-nova3
Open

fix(listen): warn when keywords is used with nova-3 model#480
peteroyce wants to merge 1 commit intodeepgram:mainfrom
peteroyce:fix/warn-keywords-incompatible-nova3

Conversation

@peteroyce
Copy link
Copy Markdown

Fixes #474

Adds a runtime console.warn() in WrappedListenV1Client.connect() when the caller passes both keywords and a nova-3 model (nova-3, nova-3-general, nova-3-medical). The Deepgram API silently rejects this combination with an HTTP 400, making it very hard to diagnose.

Before: The WebSocket upgrade fails with a bare HTTP 400 — no feedback to the developer.

After: A clear warning is printed before the connection attempt:

[Deepgram] The 'keywords' parameter is not supported with nova-3 models and will cause
the WebSocket connection to be rejected (HTTP 400). Use 'keyterm' instead.
See: https://developers.deepgram.com/docs/keyterm

Why CustomClient.ts: This file is not auto-generated by Fern and will survive SDK regenerations. The check is placed before the WebSocket is created so developers see the warning immediately.

No breaking changes — this is a warning only, existing behavior is unchanged.

@peteroyce peteroyce requested a review from lukeocodes as a code owner April 10, 2026 10:41
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.

nova-3 returns HTTP 400 when keywords param is used in streaming WebSocket

1 participant