agent: Support GEMINI_API_KEY environment variable (#34574)

Google Gemini Docs now recommend usage of `GEMINI_API_KEY` and the
legacy `GOOGLE_AI_API_KEY` variable is no longer supported in the modern
SDKs.

Zed will now accept either.

Release Notes:

- N/A
This commit is contained in:
Peter Tripp 2025-07-16 16:55:54 -04:00 committed by GitHub
parent b4c2ae5196
commit f82ef1f76f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -237,7 +237,7 @@ You can use Gemini models with the Zed agent by choosing it via the model dropdo
The Google AI API key will be saved in your keychain.
Zed will also use the `GOOGLE_AI_API_KEY` environment variable if it's defined.
Zed will also use the `GEMINI_API_KEY` environment variable if it's defined. See [Using Gemini API keys](Using Gemini API keys) in the Gemini docs for more.
#### Custom Models {#google-ai-custom-models}