Status Update
Comments
va...@google.com <va...@google.com>
ja...@google.com <ja...@google.com> #2
Instead, it would appear on Android that the package org.apache.http.auth does this.
pr...@gmail.com <pr...@gmail.com> #3
log:
---
192.168.10.199 - - [20/Nov/2008:20:14:37 -0600] "GET /file.txt HTTP/1.1" 401 401 "-"
"AndroidDownloadManager"
jo...@gmail.com <jo...@gmail.com> #4
Hi there,
Giving the OP some assistance. See here regarding
My Gemini SDK for .NET supports this mode and I have to use an API key in order to leverage the Vertex AI Studio features in the Gemini API. That Vertex API key has a different length,eg. 53 instead of 39 characters, compared to the AI Studio API keys. Also, it does not start with the "AIza" prefix.
The provided HTTP response by Vertex AI is not correct, and should be more explicit towards mentioning the Vertex AI in express mode, and that the API key is eventually not valid, in case that it doesn't exist. However, the current response stipulating that absolutely no API key can be used is plain wrong.
Hence the expected response should be different and more informative.
Description
Problem you have encountered:
When testing Vertex AI Express Mode with an invalid API Key (specifically, in this case, an API Key from AI Studio), I get the following error object:
The error code 401 isn't too surprising, tho disappointing. The message about API keys not being supported by this API is, since this is the entire purpose of Express Mode.
I tested this against the Express Mode endpoint (https://aiplatform.googleapis.com/v1/publishers/google/models/gemini-1.5-pro-002:generateContent ) and my test code works correctly when it has a valid Express Mode API Key.
What you expected to happen:
An error message that indicated it was an invalid API Key.
Steps to reproduce:
Other information (workarounds you have tried, documentation consulted, etc):
Interestingly, if the API Key given is completely invalid (ie - something like an API Key of "bogus"), you get a different error message about the request containing an invalid argument.