ha-llmvision: gemini-2.5-flash-preview-05-20 model not working

Checklist

  • I’m running the newest version of LLM Vision https://github.com/valentinfrlch/ha-llmvision/releases/latest
  • I have enabled debug logging for the integration.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This is a bug and not a feature request.
  • I have searched open issues for my problem.

Describe the issue

Could someone tell me why the latest gemini-2.5 model variants are not working?

I see that gemini-2.5-flash-preview-05-20 is available but I don’t get a result when setting it.

Reproduction steps

  1. set gemini-2.5-flash-preview-05-20 as model

…

Debug logs

2025-05-27 22:04:16.273 INFO (MainThread) [custom_components.llmvision.providers] Posting to https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-05-20:generateContent?key=AIzaSyBFvetoAdFZbWdRai9ZUaHpYkmvB8LPQjM
2025-05-27 22:04:18.433 INFO (MainThread) [custom_components.llmvision.providers] Response data: {'candidates': [{'content': {'role': 'model'}, 'finishReason': 'MAX_TOKENS', 'index': 0}], 'usageMetadata': {'promptTokenCount': 1019, 'totalTokenCount': 1170, 'promptTokensDetails': [{'modality': 'TEXT', 'tokenCount': 245}, {'modality': 'IMAGE', 'tokenCount': 774}], 'thoughtsTokenCount': 151}, 'modelVersion': 'models/gemini-2.5-flash-preview-05-20', 'responseId': '4jY2aMrkBsSnnsEPqePtiAk'}
2025-05-27 22:04:18.433 ERROR (MainThread) [custom_components.llmvision.providers] Error: 'NoneType' object is not subscriptable
2025-05-27 22:10:42.201 INFO (MainThread) [custom_components.llmvision.calendar] Deleting event with UID: d84bec98-8826-4463-a20a-e813acb7938c
2025-05-27 22:10:42.204 INFO (MainThread) [custom_components.llmvision.calendar] Deleted image: /config/www/llmvision/1cf8a459-0.jpg

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 17 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Image

I have fixed the custom OpenAI compatible provider so it uses the specified model for validation. With this change I got the Gemini model to work too.

Note the endpoint is: https://generativelanguage.googleapis.com/v1beta/openai/chat/completions

I have released the next beta update, which includes this fix: https://github.com/valentinfrlch/ha-llmvision/releases/tag/v1.5.0-rc.3