a2aproject / a2aproject/a2a-samples

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

未关闭
#334 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
1.8k
派生
751
PR 合并指标
30 天内没有已合并 PR

描述

### 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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。