generated from deepgram/oss-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
When using the flux model, I get 400 errors if keyterm string length is greater than 100
What happened?
When using the flux model, I get 400 errors if keyterm string length is greater than 100
Steps to reproduce
Try to connect to Deepgram Flux with key term string length greater than 100
Minimal code sample
n/aLogs / traceback
## When length is <= 100
2025-10-28 16:43:56.505 INFO DeepgramFluxTranscriptionProvider: _get_keyword_params: keywords: 13 result_length: 100
2025-10-28 16:43:56.862 INFO DeepgramFluxTranscriptionProvider: _on_open: connection opened
2025-10-28 16:43:56.863 INFO DeepgramSynthesisProvider: _on_open: connection opened
2025-10-28 16:43:56.865 INFO DeepgramFluxTranscriptionProvider: _handle_socket_message: connected
## When length is > 100
2025-10-28 16:44:35.868 INFO DeepgramFluxTranscriptionProvider: _get_keyword_params: keywords: 13 result_length: 101
2025-10-28 16:44:36.131 INFO DeepgramSynthesisProvider: _on_open: connection opened
2025-10-28 16:44:36.158 ERROR DeepgramFluxTranscriptionProvider: _listen: failed
Traceback (most recent call last):
File "/Users/kyu/aurelian/receptionist/backend/.venv/lib/python3.11/site-packages/deepgram/listen/v2/client.py", line 236, in connect
async with websockets_client_connect(ws_url, extra_headers=headers) as protocol:
File "/Users/kyu/aurelian/receptionist/backend/.venv/lib/python3.11/site-packages/websockets/legacy/client.py", line 629, in __aenter__
return await self
^^^^^^^^^^
File "/Users/kyu/aurelian/receptionist/backend/.venv/lib/python3.11/site-packages/websockets/legacy/client.py", line 647, in __await_impl_timeout__
return await self.__await_impl__()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kyu/aurelian/receptionist/backend/.venv/lib/python3.11/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
await protocol.handshake(
File "/Users/kyu/aurelian/receptionist/backend/.venv/lib/python3.11/site-packages/websockets/legacy/client.py", line 325, in handshake
raise InvalidStatusCode(status_code, response_headers)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 400
deepgram.core.api_error.ApiError: headers: {'X-Fern-Language': 'Python', 'X-Fern-SDK-Name': 'deepgram', 'X-Fern-SDK-Version': '5.1.0', 'x-deepgram-session-id': 'b7dde145-ec27-4d84-9335-d391c6504465', 'Authorization': 'Token {redacted}'}, status_code: 400, body: Unexpected error when initializing websocket connection.
Transport
WebSocket
API endpoint / path
listen.v2.connect
Model(s) used
flux
How often?
Always
Is this a regression?
- Yes, it worked in an earlier version
Last working SDK version (if known)
No response
SDK version
5.1.9
Python version
3.11
Install method
uv
OS
Linux (x86_64)
Environment details
Link to minimal repro (optional)
No response
Session ID (optional)
No response
Project ID (optional)
No response
Request ID (optional)
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working