a2aproject / a2aproject/a2a-samples

LiteLLM ignores GOOGLE_GENAI_USE_VERTEXAI=FALSE environment variable and defaults to Vertex AI

Offen
#334 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
1.8k
Forks
751
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### What happened?

When GOOGLE_GENAI_USE_VERTEXAI=FALSE is set, LiteLLM should use Google AI Studio with the GOOGLE_API_KEY, not attempt Vertex AI authentication.

LiteLLM defaults to Vertex AI regardless of the GOOGLE_GENAI_USE_VERTEXAI setting, causing authentication errors:

I have fixed the issue I will be raising the PR soon

### Relevant log output

```shell
litellm.exceptions.AuthenticationError: geminiException - {
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "generativelanguage.googleapis.com"
}
}
]
}
}
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.