Repository: home-assistant/core
Pull request #144131: Fixes #140182 by checking file status before sending the prompt.
Author: login: IvanLH
Labels: name: cla-signed
name: cherry-picked
name: has-tests
name: by-code-owner
name: bugfix
name: Quality Scale: No score
name: integration: google_generative_ai_conversation
Created: 2025-05-03T01:19:46Z | Merged: 2025-05-06T06:45:39Z

<!--
  You are amazing! Thanks for contributing to our project!
  Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->


## Proposed change
<!--
  Describe the big picture of your changes here to communicate to the
  maintainers why we should accept this pull request. If it fixes a bug
  or resolves a feature request, be sure to link to that issue in the
  additional information section.
-->

Adds a step to the Generate Content Action in which the files that are not in ACTIVE state, are polled until they become so or the processing fails, if it fails a HomeAssistantError will be raised. 


## Type of change
<!--
  What type of change does your PR introduce to Home Assistant?
  NOTE: Please, check only 1! box!
  If your PR requires multiple boxes to be checked, you'll most likely need to
  split it into multiple PRs. This makes things easier and faster to code review.
-->

- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests

## Additional information
<!--
  Details are important, and help maintainers processing your PR.
  Please be sure to fill out additional details, if applicable.
-->

- This PR fixes or closes issue: fixes #140182
- This PR is related to issue: 
- Link to documentation pull request: 
- Link to developer documentation pull request: 
- Link to frontend pull request: 

## Checklist
<!--
  Put an `x` in the boxes that apply. You can also fill these out after
  creating the PR. If you're unsure about any of them, don't hesitate to ask.
  We're here to help! This is simply a reminder of what we are going to look
  for before merging your code.
-->

- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]

If the code communicates with devices, web services, or third-party tools:

- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.  
      Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.  
      Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

<!--
  This project is very active and we have a high turnover of pull requests.

  Unfortunately, the number of incoming pull requests is higher than what our
  reviewers can review and merge so there is a long backlog of pull requests
  waiting for review. You can help here!
  
  By reviewing another pull request, you will help raise the code quality of
  that pull request and the final review will be faster. This way the general
  pace of pull request reviews will go up and your wait time will go down.
  
  When picking a pull request to review, try to choose one that hasn't yet
  been reviewed.

  Thanks for helping out!
-->

To help with the load of incoming pull requests:

- [ ] I have reviewed two other [open pull requests][prs] in this repository.

[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure

<!--
  Thank you for contributing <3

  Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr


Linked issue #140182: Google Generative AI - Integration requesting reponse prior to file being analised.
### The problem

When using Google Gnerative AI, it appears to be attempting to request an analysis before Google has finished processing the file. This results in the below error.

Error: Error generating content: 400 FAILED_PRECONDITION. {'error': {'code': 400, 'message': 'The File 5y6l7yja98jc is not in an ACTIVE state and usage is not allowed.', 'status': 'FAILED_PRECONDITION'}}

Their response is to wait a couple of seconds then try again. Is it possible to create a loop that checks every couple of seconds if the file is not yet processed?

### What version of Home Assistant Core has the issue?

2025.3.1

### What was the last working version of Home Assistant Core?

NA

### 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://www.home-assistant.io/integrations/google_generative_ai_conversation

### Diagnostics information

_No response_

### Example YAML snippet

```yaml
data:
  prompt: >-
    Wait until the file uploaded is "active" then describe what triggered the
    motion detection. If it looks like a false trigger, respond with dry humour.
  filenames:
    - "{{ video_filename }}"
response_variable: ai_description
action: google_generative_ai_conversation.generate_content
```

### Anything in the logs that might be useful for us?

```txt
Error: Error generating content: 400 FAILED_PRECONDITION. {'error': {'code': 400, 'message': 'The File 5y6l7yja98jc is not in an ACTIVE state and usage is not allowed.', 'status': 'FAILED_PRECONDITION'}}
```

### Additional information

Please note that error occurs with video files larger than 500kB. Pictures seem to work fine.
Linked issue comments: user: login: home-assistant[bot]
created_at: 2025-03-09T09:13:54Z
body: 
Hey there @tronikos, 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](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L573) for? Thanks!

<details>
<summary>Code owner commands</summary>


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.

</details>


<sub><sup>(message by CodeOwnersMention)</sup></sub>

---

[google_generative_ai_conversation documentation](https://www.home-assistant.io/integrations/google_generative_ai_conversation)
[google_generative_ai_conversation source](https://github.com/home-assistant/core/tree/dev/homeassistant/components/google_generative_ai_conversation)
<sub><sup>(message by IssueLinks)</sup></sub>
author_association: CONTRIBUTOR
user: login: tronikos
created_at: 2025-04-30T08:20:57Z
body: @IvanLH Is this an issue of the SDK?
author_association: MEMBER
user: login: IvanLH
created_at: 2025-05-01T04:09:16Z
body: It could be an error in processing the File, however the integration can check before sending the prompt. Working on a fix. 
author_association: CONTRIBUTOR

Diff:
diff --git a/homeassistant/components/google_generative_ai_conversation/__init__.py b/homeassistant/components/google_generative_ai_conversation/__init__.py
index 88a51446cda6fa..79d092a60c306d 100644
--- a/homeassistant/components/google_generative_ai_conversation/__init__.py
+++ b/homeassistant/components/google_generative_ai_conversation/__init__.py
@@ -2,11 +2,13 @@
 
 from __future__ import annotations
 
+import asyncio
 import mimetypes
 from pathlib import Path
 
 from google.genai import Client
 from google.genai.errors import APIError, ClientError
+from google.genai.types import File, FileState
 from requests.exceptions import Timeout
 import voluptuous as vol
 
@@ -32,6 +34,8 @@
     CONF_CHAT_MODEL,
     CONF_PROMPT,
     DOMAIN,
+    FILE_POLLING_INTERVAL_SECONDS,
+    LOGGER,
     RECOMMENDED_CHAT_MODEL,
     TIMEOUT_MILLIS,
 )
@@ -91,8 +95,40 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            while True:
+                uploaded_file = await client.aio.files.get(
+                    name=uploaded_file.name,
+                    config={"http_options": {"timeout": TIMEOUT_MILLIS}},
+                )
+                if uploaded_file.state not in (
+                    FileState.STATE_UNSPECIFIED,
+                    FileState.PROCESSING,
+                ):
+                    break
+                LOGGER.debug(
+                    "Waiting for file `%s` to be processed, current state: %s",
+                    uploaded_file.name,
+                    uploaded_file.state,
+                )
+                await asyncio.sleep(FILE_POLLING_INTERVAL_SECONDS)
+
+            if uploaded_file.state == FileState.FAILED:
+                raise HomeAssistantError(
+                    f"File `{uploaded_file.name}` processing failed, reason: {uploaded_file.error.message}"
+                )
+
         await hass.async_add_executor_job(append_files_to_prompt)
 
+        tasks = [
+            asyncio.create_task(wait_for_file_processing(part))
+            for part in prompt_parts
+            if isinstance(part, File) and part.state != FileState.ACTIVE
+        ]
+        async with asyncio.timeout(TIMEOUT_MILLIS / 1000):
+            await asyncio.gather(*tasks)
+
         try:
             response = await client.aio.models.generate_content(
                 model=RECOMMENDED_CHAT_MODEL, contents=prompt_parts
diff --git a/homeassistant/components/google_generative_ai_conversation/const.py b/homeassistant/components/google_generative_ai_conversation/const.py
index a7dd584ebee8f4..239b3ff763e729 100644
--- a/homeassistant/components/google_generative_ai_conversation/const.py
+++ b/homeassistant/components/google_generative_ai_conversation/const.py
@@ -26,3 +26,4 @@
 RECOMMENDED_USE_GOOGLE_SEARCH_TOOL = False
 
 TIMEOUT_MILLIS = 10000
+FILE_POLLING_INTERVAL_SECONDS = 0.05
diff --git a/tests/components/google_generative_ai_conversation/snapshots/test_init.ambr b/tests/components/google_generative_ai_conversation/snapshots/test_init.ambr
index ce882adf6e64cf..d8e54b15f61a82 100644
--- a/tests/components/google_generative_ai_conversation/snapshots/test_init.ambr
+++ b/tests/components/google_generative_ai_conversation/snapshots/test_init.ambr
@@ -1,4 +1,21 @@
 # serializer version: 1
+# name: test_generate_content_file_processing_succeeds
+  list([
+    tuple(
+      '',
+      tuple(
+      ),
+      dict({
+        'contents': list([
+          'Describe this image from my doorbell camera',
+          File(name='doorbell_snapshot.jpg', display_name=None, mime_type=None, size_bytes=None, create_time=None, expiration_time=None, update_time=None, sha256_hash=None, uri=None, download_uri=None, state=<FileState.ACTIVE: 'ACTIVE'>, source=None, video_metadata=None, error=None),
+          File(name='context.txt', display_name=None, mime_type=None, size_bytes=None, create_time=None, expiration_time=None, update_time=None, sha256_hash=None, uri=None, download_uri=None, state=<FileState.PROCESSING: 'PROCESSING'>, source=None, video_metadata=None, error=None),
+        ]),
+        'model': 'models/gemini-2.0-flash',
+      }),
+    ),
+  ])
+# ---
 # name: test_generate_content_service_with_image
   list([
     tuple(
diff --git a/tests/components/google_generative_ai_conversation/test_init.py b/tests/components/google_generative_ai_conversation/test_init.py
index a08acc0df3f45f..94308260f7477e 100644
--- a/tests/components/google_generative_ai_conversation/test_init.py
+++ b/tests/components/google_generative_ai_conversation/test_init.py
@@ -2,6 +2,7 @@
 
 from unittest.mock import AsyncMock, Mock, mock_open, patch
 
+from google.genai.types import File, FileState
 import pytest
 from requests.exceptions import Timeout
 from syrupy.assertion import SnapshotAssertion
@@ -91,6 +92,117 @@ async def test_generate_content_service_with_image(
     assert [tuple(mock_call) for mock_call in mock_generate.mock_calls] == snapshot
 
 
+@pytest.mark.usefixtures("mock_init_component")
+async def test_generate_content_file_processing_succeeds(
+    hass: HomeAssistant, snapshot: SnapshotAssertion
+) -> None:
+    """Test generate content service."""
+    stubbed_generated_content = (
+        "A mail carrier is at your front door delivering a package"
+    )
+
+    with (
+        patch(
+            "google.genai.models.AsyncModels.generate_content",
+            return_value=Mock(
+                text=stubbed_generated_content,
+                prompt_feedback=None,
+                candidates=[Mock()],
+            ),
+        ) as mock_generate,
+        patch("pathlib.Path.exists", return_value=True),
+        patch.object(hass.config, "is_allowed_path", return_value=True),
+        patch("builtins.open", mock_open(read_data="this is an image")),
+        patch("mimetypes.guess_type", return_value=["image/jpeg"]),
+        patch(
+            "google.genai.files.Files.upload",
+            side_effect=[
+                File(name="doorbell_snapshot.jpg", state=FileState.ACTIVE),
+                File(name="context.txt", state=FileState.PROCESSING),
+            ],
+        ),
+        patch(
+            "google.genai.files.AsyncFiles.get",
+            side_effect=[
+                File(name="context.txt", state=FileState.PROCESSING),
+                File(name="context.txt", state=FileState.ACTIVE),
+            ],
+        ),
+    ):
+        response = await hass.services.async_call(
+            "google_generative_ai_conversation",
+            "generate_content",
+            {
+                "prompt": "Describe this image from my doorbell camera",
+                "filenames": ["doorbell_snapshot.jpg", "context.txt", "context.txt"],
+            },
+            blocking=True,
+            return_response=True,
+        )
+
+    assert response == {
+        "text": stubbed_generated_content,
+    }
+    assert [tuple(mock_call) for mock_call in mock_generate.mock_calls] == snapshot
+
+
+@pytest.mark.usefixtures("mock_init_component")
+async def test_generate_content_file_processing_fails(
+    hass: HomeAssistant, snapshot: SnapshotAssertion
+) -> None:
+    """Test generate content service."""
+    stubbed_generated_content = (
+        "A mail carrier is at your front door delivering a package"
+    )
+
+    with (
+        patch(
+            "google.genai.models.AsyncModels.generate_content",
+            return_value=Mock(
+                text=stubbed_generated_content,
+                prompt_feedback=None,
+                candidates=[Mock()],
+            ),
+        ),
+        patch("pathlib.Path.exists", return_value=True),
+        patch.object(hass.config, "is_allowed_path", return_value=True),
+        patch("builtins.open", mock_open(read_data="this is an image")),
+        patch("mimetypes.guess_type", return_value=["image/jpeg"]),
+        patch(
+            "google.genai.files.Files.upload",
+            side_effect=[
+                File(name="doorbell_snapshot.jpg", state=FileState.ACTIVE),
+                File(name="context.txt", state=FileState.PROCESSING),
+            ],
+        ),
+        patch(
+            "google.genai.files.AsyncFiles.get",
+            side_effect=[
+                File(name="context.txt", state=FileState.PROCESSING),
+                File(
+                    name="context.txt",
+                    state=FileState.FAILED,
+                    error={"message": "File processing failed"},
+                ),
+            ],
+        ),
+        pytest.raises(
+            HomeAssistantError,
+            match="File `context.txt` processing failed, reason: File processing failed",
+        ),
+    ):
+        await hass.services.async_call(
+            "google_generative_ai_conversation",
+            "generate_content",
+            {
+                "prompt": "Describe this image from my doorbell camera",
+                "filenames": ["doorbell_snapshot.jpg", "context.txt", "context.txt"],
+            },
+            blocking=True,
+            return_response=True,
+        )
+
+
 @pytest.mark.usefixtures("mock_init_component")
 async def test_generate_content_service_error(
     hass: HomeAssistant,


Reviews:
user: login: tronikos
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-05-03T08:27:47Z
user: login: IvanLH
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-03T17:57:42Z
user: login: IvanLH
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-03T17:57:45Z
user: login: tronikos
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-05-05T05:02:20Z
user: login: IvanLH
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T01:21:48Z
user: login: IvanLH
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T01:22:54Z
user: login: tronikos
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-06T06:45:19Z

Review comments:
diff_hunk: @@ -91,8 +95,42 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            uploaded_file = client.files.get(
+                name=uploaded_file.name,
+                config={"http_options": {"timeout": TIMEOUT_MILLIS}},
+            )
+            while uploaded_file.state in (
+                FileState.STATE_UNSPECIFIED,
+                FileState.PROCESSING,
+            ):
+                await asyncio.sleep(FILE_POLLING_INTERVAL_SECONDS)
+                LOGGER.debug(
+                    "Waiting for file `%s` to be processed, current state: %s",
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: tronikos
body: Move the log message before the sleep
created_at: 2025-05-03T08:19:35Z
author_association: MEMBER
diff_hunk: @@ -91,8 +95,42 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            uploaded_file = client.files.get(
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: tronikos
body: To avoid duplicate code you can change this to:

```
while True:
  uploaded_file = client.files.get(...
  if uploaded_file.state not in ...
    break
  await asyncio.sleep...
if uploaded_file.state == FileState.FAILED:
  raise...
```
created_at: 2025-05-03T08:24:14Z
author_association: MEMBER
diff_hunk: @@ -91,8 +95,42 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            uploaded_file = client.files.get(
+                name=uploaded_file.name,
+                config={"http_options": {"timeout": TIMEOUT_MILLIS}},
+            )
+            while uploaded_file.state in (
+                FileState.STATE_UNSPECIFIED,
+                FileState.PROCESSING,
+            ):
+                await asyncio.sleep(FILE_POLLING_INTERVAL_SECONDS)
+                LOGGER.debug(
+                    "Waiting for file `%s` to be processed, current state: %s",
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: IvanLH
body: Done
created_at: 2025-05-03T17:57:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -91,8 +95,42 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            uploaded_file = client.files.get(
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: IvanLH
body: Done
created_at: 2025-05-03T17:57:44Z
author_association: CONTRIBUTOR
diff_hunk: @@ -91,8 +95,42 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            uploaded_file = client.files.get(
+                name=uploaded_file.name,
+                config={"http_options": {"timeout": TIMEOUT_MILLIS}},
+            )
+            while uploaded_file.state in (
+                FileState.STATE_UNSPECIFIED,
+                FileState.PROCESSING,
+            ):
+                await asyncio.sleep(FILE_POLLING_INTERVAL_SECONDS)
+                LOGGER.debug(
+                    "Waiting for file `%s` to be processed, current state: %s",
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: tronikos
body: Now this is logged even if there is no wait. Move it right before the sleep
created_at: 2025-05-05T05:00:40Z
author_association: MEMBER
diff_hunk: @@ -91,8 +95,40 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            while True:
+                LOGGER.debug(
+                    "Waiting for file `%s` to be processed, current state: %s",
+                    uploaded_file.name,
+                    uploaded_file.state,
+                )
+                uploaded_file = await client.aio.files.get(
+                    name=uploaded_file.name,
+                    config={"http_options": {"timeout": TIMEOUT_MILLIS}},
+                )
+                if uploaded_file.state not in (
+                    FileState.STATE_UNSPECIFIED,
+                    FileState.PROCESSING,
+                ):
+                    break
+                await asyncio.sleep(FILE_POLLING_INTERVAL_SECONDS)
+
+            if uploaded_file.state == FileState.FAILED:
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: tronikos
body: We could be here if PROCESSING or STATE_UNSPECIFIED. Shouldn't we raise an error?
created_at: 2025-05-05T05:02:15Z
author_association: MEMBER
diff_hunk: @@ -91,8 +95,40 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            while True:
+                LOGGER.debug(
+                    "Waiting for file `%s` to be processed, current state: %s",
+                    uploaded_file.name,
+                    uploaded_file.state,
+                )
+                uploaded_file = await client.aio.files.get(
+                    name=uploaded_file.name,
+                    config={"http_options": {"timeout": TIMEOUT_MILLIS}},
+                )
+                if uploaded_file.state not in (
+                    FileState.STATE_UNSPECIFIED,
+                    FileState.PROCESSING,
+                ):
+                    break
+                await asyncio.sleep(FILE_POLLING_INTERVAL_SECONDS)
+
+            if uploaded_file.state == FileState.FAILED:
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: IvanLH
body: We can't no? the loop above only breaks if it state is not UNSPECIFIED or PROCESSING, ergo ACTIVE or FAILED. It can also break if the timeout is reached, however that would be handled on line 129, and an unhandled Timeout Exception would be thrown.

created_at: 2025-05-06T01:21:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -91,8 +95,42 @@ def append_files_to_prompt():
                     )
                     prompt_parts.append(uploaded_file)
 
+        async def wait_for_file_processing(uploaded_file: File) -> None:
+            """Wait for file processing to complete."""
+            uploaded_file = client.files.get(
+                name=uploaded_file.name,
+                config={"http_options": {"timeout": TIMEOUT_MILLIS}},
+            )
+            while uploaded_file.state in (
+                FileState.STATE_UNSPECIFIED,
+                FileState.PROCESSING,
+            ):
+                await asyncio.sleep(FILE_POLLING_INTERVAL_SECONDS)
+                LOGGER.debug(
+                    "Waiting for file `%s` to be processed, current state: %s",
path: homeassistant/components/google_generative_ai_conversation/__init__.py
user: login: IvanLH
body: Done now
created_at: 2025-05-06T01:22:54Z
author_association: CONTRIBUTOR

PR comments:
user: login: home-assistant[bot]
created_at: 2025-05-03T01:19:52Z
body: 
Hey there @tronikos, mind taking a look at this pull request as it has been labeled with an integration (`google_generative_ai_conversation`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L575) for? Thanks!

<details>
<summary>Code owner commands</summary>


Code owners of `google_generative_ai_conversation` can trigger bot actions by commenting:

- `@home-assistant close` Closes the pull request.
- `@home-assistant rename Awesome new title` Renames the pull request.
- `@home-assistant reopen` Reopen the pull request.
- `@home-assistant unassign google_generative_ai_conversation` Removes the current integration label and assignees on the pull request, 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 pull request.
- `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

</details>


author_association: CONTRIBUTOR
user: login: home-assistant[bot]
created_at: 2025-05-03T08:27:49Z
body: <!-- ReviewDrafterComment -->
Please take a look at the requested changes, and use the **Ready for review** button when you are done, thanks :+1:

[_Learn more about our pull request process._](https://developers.home-assistant.io/docs/review-process#prs-are-being-drafted-when-changes-are-needed)

author_association: CONTRIBUTOR