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:
keywords should work on nova-3 (backwards compatible with nova-2), or
- 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
Description
When using the Deepgram streaming WebSocket API (
wss://api.deepgram.com/v1/listen) withmodel=nova-3, including thekeywordsquery parameter causes Deepgram to reject the WebSocket upgrade with HTTP 400.The same request works fine with
model=nova-2, and usingkeyterminstead ofkeywordsworks onnova-3.Steps to Reproduce
Expected Behaviour
Either:
keywordsshould work onnova-3(backwards compatible with nova-2), orkeywordsis not supported on nova-3 and thatkeytermshould be used insteadImpact
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 bothkeywordsandkeytermoptions and doesn't warn about model compatibility, which compounds the issue.Environment
websocketsand Node.jswspackages