Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start conversation action stops Google Gen AI on voice PE from being able to respond until current conversation expires #141547

Closed
TheBoxTrot opened this issue Mar 27, 2025 · 1 comment · Fixed by #141893

Comments

@TheBoxTrot
Copy link

TheBoxTrot commented Mar 27, 2025

The problem

If you use the Start conversation via the action on a voice PE the device will not be able to respond to the request and any other request made to the device after that point with an error in the logs being
(History must start with a user turn.)
Using Google Gemini as the Ai

What version of Home Assistant Core has the issue?

core-2025.4.0b1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Generative AI

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/google_generative_ai_conversation

Diagnostics information

Logger: homeassistant.components.assist_pipeline.pipeline
Source: components/assist_pipeline/pipeline.py:1189
integration: Assist pipeline (documentation, issues)
First occurred: 4:28:36 PM (1 occurrences)
Last logged: 4:28:36 PM

Unexpected error during intent recognition
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1189, in recognize_intent
    conversation_result = await conversation.async_converse(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<8 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/components/conversation/agent_manager.py", line 117, in async_converse
    result = await method(conversation_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/conversation/entity.py", line 49, in internal_async_process
    return await self.async_process(user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/conversation/entity.py", line 62, in async_process
    return await self._async_handle_message(user_input, chat_log)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/google_generative_ai_conversation/conversation.py", line 410, in _async_handle_message
    chat = self._genai_client.aio.chats.create(
        model=model_name, history=messages, config=generateContentConfig
    )
  File "/usr/local/lib/python3.13/site-packages/google/genai/chats.py", line 516, in create
    return AsyncChat(
        modules=self._modules,
    ...<2 lines>...
        history=history if history else [],
    )
  File "/usr/local/lib/python3.13/site-packages/google/genai/chats.py", line 379, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        model=model,
        ^^^^^^^^^^^^
        config=config,
        ^^^^^^^^^^^^^^
        history=history,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/google/genai/chats.py", line 126, in __init__
    self._curated_history = _extract_curated_history(history)
                            ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/google/genai/chats.py", line 87, in _extract_curated_history
    raise ValueError("History must start with a user turn.")
ValueError: History must start with a user turn.

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

Hey there @tronikos, @IvanLH, mind taking a look at this issue as it has been labeled with an integration (google_generative_ai_conversation) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of google_generative_ai_conversation can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign google_generative_ai_conversation Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


google_generative_ai_conversation documentation
google_generative_ai_conversation source
(message by IssueLinks)

@frenck frenck added this to the 2025.4.0 milestone Mar 27, 2025
@balloob balloob changed the title Start conversation action stops LLMS on voice PE from being able to respond to any request Start conversation action stops Google Gen AI on voice PE from being able to respond to any request Mar 31, 2025
@balloob balloob changed the title Start conversation action stops Google Gen AI on voice PE from being able to respond to any request Start conversation action stops Google Gen AI on voice PE from being able to respond until current conversation expires Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants