New Live API Features Don't Work through the API (Proactive audio and Affective dialong)

Well, When you try and use the new features such as Affective dialog or Proactive audio on the new models, You get returned with a 1007 Error code which has the messages

websockets.exceptions.ConnectionClosedError: received 1007 (invalid frame payload data) Invalid JSON payload received. Unknown name "proactivity" at 'setup': Cannot find field.; then sent 1007 (invalid frame payload data) Invalid JSON payload received. Unknown name "proactivity" at 'setup': Cannot find field.

for Proactive Audio
and

websockets.exceptions.ConnectionClosedError: received 1007 (invalid frame payload data) Invalid JSON payload received. Unknown name "enableAffectiveDialog" at 'setup.generation_config': Cannot find field.; then sent 1007 (invalid frame payload data) Invalid JSON payload received. Unknown name "enableAffectiveDialog" at 'setup.generation_config': Cannot find field.

for the Affective dialog, i’m Using the latest python package for GenAI, Not sure if the features just arent out yet or they are just broken, Heres where i found the info for it

2 Likes

Facing the same issue for both enable_affective_dialog and proactivity parameters

websockets.exceptions.ConnectionClosedError: received 1007 (invalid frame payload data) Invalid JSON payload received. Unknown name “enableAffectiveDialog” at ‘setup.generation_config’: Cannot find field.; then sent 1007 (invalid frame payload data) Invalid JSON payload received. Unknown name “enableAffectiveDialog” at ‘setup.generation_config’: Cannot find field.

I have the same problem with Affective Dialogue and Proactive Audio. I use the SDK for Go with the gemini-2.5-flash-preview-native-audio-dialog model.
I also noticed that in AI Studio, if you select one of the Affective Dialogue or Proactive Audio options, the other is automatically disabled.
And as a feedback: the quality of the selectable voices with the gemini-2.5-flash-preview-native-audio-dialog model is better than those offered by the gemini-2.0-flash-live-001 model, but regarding the content of the dialogue, the gemini-2.0-flash-live-001 model is definitely better (language: Italian).

Hey, Could you try updating to the latest google-genai package version 1.16.1 and see if it works?

Let me know if the issue still persists.

Thanks.

Hello, I have already tried on the latest version for Python which is 1.17.0

1 Like

I tested the new version 1.7 of the Google Gen AI Go SDK, but it still gives the same errors:

  • receive model response error: websocket: close 1007 (invalid payload data): Invalid JSON payload received. Unknown name “enableAffectiveDialog” at ‘setup.generation_config’: Cannot find field.
  • receive model response error: websocket: close 1007 (invalid payload data): Invalid JSON payload received. Unknown name “proactivity” at ‘setup’: Cannot find field.

In the API documentation the field name for the proactivity feature is proactiveAudio.
As for AffectiveDialog feature there is no documented field. So maybe for proactivity it is just the wrong name, while for AffectiveDialog it may be that it is only supported on Vertex. Note: I do not use the Vertex AI Client, but I use the Gemini API Client.

Hello, Little update on the error situation, Looks like you need to change your API version to v1alpha for these new features to work properly, I’ve tried it out and it works.
It is shown here, And i swear this was never here before

1 Like

I confirm it works, both AffectiveDialog and Proactivity, with Google Gen AI Go SDK 1.7. Thank you.

1 Like