How to supply keywords to Deepgram Nova 3 STT with LiveKit Inference?

I’m using LiveKit Inference with deepgram/nova-3:multi.

The TypeScript types for DeepgramOptions specify it as:

  /** Keywords with boost values. */
  keywords?: Array<[string, number]>;

But passing modelOptions: { keywords: [] }leads to a 400 websocket handshake error, and STT fails. Things I have tried:

  • omitting the modelOptions.keywords: STT works, but obviously, no keywords support.
  • providing keywords as empty array (matches the type spec): fails
  • providing keywords with an entry matching the specified type: fails keywords: [[‘donuts’, 5]]
  • providing keywords as a string: fails keywords: ‘donuts:5’

At this point, I’m kind of out of ideas to successfully pass keywords to Nova 3 when using Inference. The specific error message when it fails:

[16:27:42.129] WARN (15777): Failed to parse STT server event
    rawData: {
      "type": "error",
      "session_id": "7d2828da-a488-48f0-be2a-7f1f7a2fed63",
      "message": "Failed to connect to provider for session 7d2828da-a488-48f0-be2a-7f1f7a2fed63: failed to connect to provider nova-3: Provider deepgram error (status 400): websocket: bad handshake - retryable: false",
      "code": 2006
    }

(As a bonus, every error message comes with about a page of Zod errors, since the spec types the code as a string, but it’s actually sending a number.)

When using LiveKit Inference with Deepgram Nova‑3, keywords must be omitted entirely unless you provide at least one valid entry. An empty array is forwarded to Deepgram and results in a 400 handshake failure.

For Nova‑3 specifically, Deepgram’s newer models prefer keyterms (string list) instead of the legacy weighted keywords tuple format. The Deepgram STT plugin supports both keywords (list of [string, float]) and keyterms (list of strings), but model compatibility varies, which explains the provider‑level 400 error you’re seeing. See the Deepgram STT reference for the supported parameters:
Deepgram STT plugin reference

Use either:

  • Omit keywords entirely, or

  • Use keyterms: ["donuts"] instead of weighted tuples.

keyterms did work when I tested it, so I’ll drop the weights and just use the words.

FWIW, I did try the Array<[str, float] 2-tuple> format documented in the reference and the Inference types, and it errored on that.

Thank you!