Invalid request error in Google Flash

Hi all,

I’m currently using Google Flash 2.0 (Gemini 2.0 Flash) with a direct API key from Google and have configured the system to use the Google Tokenizer. The chat functionality is working perfectly; however, when I try to enable image support, I encounter the following error:

{ "error": { "message": "'$.input' is invalid. Please check the API reference: https://platform.openai.com/docs/api-reference.", "type": "invalid_request_error", "param": null, "code": null } }

Has anyone else seen this? Is this error due to Gemini 2.0 not yet supporting vision features in Discourse AI? Any insights or workarounds would be appreciated.

Thanks!

Yes I think I do :slight_smile:

You are trying to use the Open AI compatible endpoint Google provide instead of the Gemini native endpoint.

Try using:

https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash

And use the Gemini provider.

The OpenAI compatibility layer has some limitations.

Thanks Sam, that is the URL for the setting. The error message occurs when using a persona with that LLM and also set for Vision Enabled and you upload a picture. It fails after hitting upload for jpg. I try to validate as best possible because there are so many settings it’s easy to miss something.

1 Like

It is working here, something feels a bit odd.

Can you share the output of copy request and response on a gist?

Where do I see that screen?

That is the i button you have enabled at the bottom.