Deepgram flux-general-en STT throws 400, while nova-3 works

I’m trying to use the flux-general-en STT by passing this to AgentSessionOptions (node SDK):

{
stt: new deepgram.STT({ model: ‘flux-general-en’ }),
};

I’m getting the following error:

ERROR (27220): AgentSession is closing due to an unrecoverable error
type: “stt_error”
label: “deepgram.STT”
recoverable: false
error: {
“type”: “APIStatusError”,
“message”: “Deepgram WebSocket connection rejected with status 400”,
“stack”:
APIStatusError: Deepgram WebSocket connection rejected with status 400
at WebSocket.onUnexpectedResponse (C:\Projects\myproject\livekit-agent\node_modules.pnpm@livekit+agents@1.8.1_@live_1f2f4d1578e9959998da1e2ff02a2afe\node_modules@livekit\agents\src\utils.ts:69:9)
at Object.onceWrapper (node:events:623:26)
at WebSocket.emit (node:events:508:28)
at ClientRequest. (C:\Projects\myproject\livekit-agent\node_modules.pnpm\ws@8.21.0\node_modules\ws\lib\websocket.js:929:27)
at ClientRequest.emit (node:events:508:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:780:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:125:17)
at TLSSocket.socketOnData (node:_http_client:615:22)
at TLSSocket.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
“body”: null,
“retryable”: false,
“name”: “APIStatusError”,
“statusCode”: 400,
“requestId”: null
}

To my understanding it should be supported:

It works as expected when passing nova-3.

Hi, for Flux models, please use STTv2, i.e.

import * as deepgram from '@livekit/agents-plugin-deepgram';

const session = new voice.AgentSession({
    stt: new deepgram.STTv2({
        model: "flux-general-en",
    }),
    // ... llm, tts, etc.
});

Got it, thanks.

Is there anything to gain from using flux instead of nova STT for transcription alongside a realtime model?

According to the comparison, the main added value seems to be turn-based transcription, but I’m not sure whether it adds anything in this configuration.

So you have a realtime (speech-to-speech) model in your agent and you are using a separate STT for accurate transcription? If that is the case, I agree with you that you wouldn’t gain anything by using Flux since, as you say, the primary reason to choose it is for its turn taking model.

Correct. Fair enough, wanted to make sure I wasn’t missing anything. Thanks Darryn.