Skip to content

fix: use x-goog-api-key header instead of URL query parameter for Gemini (#70)#174

Open
saurabhhhcodes wants to merge 2 commits into
Ruthwik000:mainfrom
saurabhhhcodes:fix-70-gemini-api-key-header
Open

fix: use x-goog-api-key header instead of URL query parameter for Gemini (#70)#174
saurabhhhcodes wants to merge 2 commits into
Ruthwik000:mainfrom
saurabhhhcodes:fix-70-gemini-api-key-header

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

The Gemini API key was appended to the request URL as a query parameter (key=...), exposing it in network logs, browser history, and error messages. Changed to use the x-goog-api-key HTTP header which is the recommended approach.

Fixes #70

Saurabh Kumar Bajpai added 2 commits July 8, 2026 11:59
…on (Ruthwik000#67)

Anthropic's Messages API uses hyphens (claude-opus-4-5), not
dots (claude-opus-4.5). The dot-notation IDs in pricingRegistry
caused all Claude 4.5 requests to silently cost /bin/zsh.

Fixes Ruthwik000#67
…ini (Ruthwik000#70)

The Gemini API key was appended to the request URL as a query
parameter (key=...), exposing it in network logs, browser
history, and error messages. Changed to use the x-goog-api-key
HTTP header which is the recommended approach.

Fixes Ruthwik000#70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Gemini API key is appended to the request URL as a query parameter, exposing it in network logs and error messages

1 participant