fix(index): use GEMINI_API_KEY for google provider startup validation#63
Open
Nivesh353 wants to merge 1 commit into
Open
fix(index): use GEMINI_API_KEY for google provider startup validation#63Nivesh353 wants to merge 1 commit into
Nivesh353 wants to merge 1 commit into
Conversation
shreyas-lyzr
approved these changes
Jun 29, 2026
shreyas-lyzr
left a comment
Contributor
There was a problem hiding this comment.
The fix is correct. The rest of the codebase — line 430 in index.ts, Documentation.md (the provider table and env var reference) — all consistently use GEMINI_API_KEY for the google provider. The startup guard was the only outlier, and this one-line change brings it into alignment. No issues found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The startup validation in
index.tscheckedGOOGLE_API_KEYfor thegoogle:provider, but pi-ai'senv-api-keys.jsusesGEMINI_API_KEYfor actual API calls.
This caused two issues:
GEMINI_API_KEYgot a crash at startup:Error: GOOGLE_API_KEY environment variable is not setgoogle:provider working,with no indication that two separate keys were needed
Fix
Changed the startup env var check for the
google:provider fromGOOGLE_API_KEYtoGEMINI_API_KEY, aligning with what pi-ai usesfor authentication.
Impact
index.tsGEMINI_API_KEYfor thegoogle:provider