Skip to content

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

@kuldeepdaftary

Description

@kuldeepdaftary

Description

When using the Deepgram streaming WebSocket API (wss://api.deepgram.com/v1/listen) with model=nova-3, including the keywords query parameter causes Deepgram to reject the WebSocket upgrade with HTTP 400.

The same request works fine with model=nova-2, and using keyterm instead of keywords works on nova-3.

Steps to Reproduce

import asyncio, websockets

KEY = "your-api-key"

async def test(model, param):
    uri = f"wss://api.deepgram.com/v1/listen?model={model}&language=en-GB&encoding=linear16&sample_rate=24000&channels=1&{param}=Jonty"
    try:
        async with websockets.connect(uri, additional_headers={"Authorization": f"Token {KEY}"}) as ws:
            print(f"{model} + {param}: OK")
            await ws.close()
    except Exception as e:
        print(f"{model} + {param}: FAIL ({e})")

asyncio.run(test("nova-3", "keywords"))   # FAIL - HTTP 400
asyncio.run(test("nova-3", "keyterm"))     # OK
asyncio.run(test("nova-2", "keywords"))    # OK
asyncio.run(test("nova-2", "keyterm"))     # OK

Expected Behaviour

Either:

  1. keywords should work on nova-3 (backwards compatible with nova-2), or
  2. The API should return a clear error message (not just HTTP 400) indicating that keywords is not supported on nova-3 and that keyterm should be used instead

Impact

This is a silent breaking change when upgrading from nova-2 to nova-3. The WebSocket upgrade is rejected with a bare HTTP 400 — no JSON error body is returned, making it very difficult to diagnose. We spent significant time debugging this in production.

The LiveKit agents SDK (@livekit/agents-plugin-deepgram) exposes both keywords and keyterm options and doesn't warn about model compatibility, which compounds the issue.

Environment

  • Deepgram streaming WebSocket API
  • Models tested: nova-2 (works), nova-3 (fails)
  • Tested with both Python websockets and Node.js ws packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions