-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
Describe the bug
When you get an HTTP error for calling the Google AI endpoint, you get the following error.
Ran into this error: Request failed: Request failed: error sending request for url (https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro-preview-06-05:generateContent?key=abc123def
Please retry if you think this is a transient or recoverable error.
This is bad because we're showing the API key in plain text.
To Reproduce
Steps to reproduce the behavior:
- Start a Goose session with Google AI
- Make a request
- Quickly turn off your internet access
- See error
Expected behavior
I don't want to see the API key in the output.
Please provide following information:
- OS & Arch: macOS, ARM
- Interface: UI
- Version: v1.0.31
- Provider & Model: Google - gemini-2.5-pro-preview-06-05
Additional context
It's buried in their other documentation, but you can use an HTTP header instead of including the API key in the query parameters.
To include an API key with a REST API call, use the
x-goog-api-keyHTTP header, as shown in the following example
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
