Skip to content

feat: support google model inventory refresh - #8913

Merged
kalvinnchau merged 1 commit into
mainfrom
kalvin/google-model-refresh
Apr 29, 2026
Merged

feat: support google model inventory refresh#8913
kalvinnchau merged 1 commit into
mainfrom
kalvin/google-model-refresh

Conversation

@kalvinnchau

Copy link
Copy Markdown
Collaborator

Category: fix
User Impact: Users setting up Google Gemini in goose2 now see model refresh and API key errors handled consistently with other providers.
Problem: Google Gemini credentials could be saved in goose2 without triggering the provider inventory refresh used by other model providers. Invalid Google API keys also produced a misleading missing models array error because the models response was parsed before checking the HTTP status.
Solution: Enable inventory refresh for the Google provider and include the relevant host/API key in its inventory identity. The Google model listing path now maps non-success responses before parsing the model list, so invalid keys surface the provider's actual error.

File changes

crates/goose/src/providers/google.rs
Adds Google provider support for ACP inventory refresh and identifies inventory entries by GOOGLE_HOST and GOOGLE_API_KEY. Updates model listing to handle non-success responses before parsing the models array, matching the behavior users expect from other providers.

Reproduction Steps

  1. Open goose2 provider settings and set up Google Gemini with an invalid API key.
  2. Save the credentials and wait for the model refresh result.
  3. Confirm the refresh warning shows the Google API key error instead of a missing models array message.
  4. Set up Google Gemini with a valid API key and confirm model inventory refresh completes and Gemini models are listed.

Add Google provider support for ACP inventory refresh so goose2 validates
saved Google API keys through the existing model-listing flow.

Handle non-success responses from the Google models endpoint before parsing
the response body, allowing invalid API keys to surface the provider error
instead of a missing models array error.
@kalvinnchau kalvinnchau changed the title fix google model inventory refresh feat: support google model inventory refresh Apr 29, 2026

@baxen baxen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kalvinnchau
kalvinnchau added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 0a49318 Apr 29, 2026
22 checks passed
@kalvinnchau
kalvinnchau deleted the kalvin/google-model-refresh branch April 29, 2026 18:02
lifeizhou-ap added a commit that referenced this pull request Apr 30, 2026
* main: (24 commits)
  fix: copy and content improvements in goose2 (#8886)
  feat: make ollama host configurable in goose2 (#8912)
  polish sidebar navigation and project icons (#8896)
  fix: model picker stays usable during provider loading (#8900)
  feat: update provider row after saving credentials (#8914)
  feat: support google model inventory refresh (#8913)
  chore: Added goose 2 UI refactor review skill (#8903)
  blog: goose with peekaboo (#8884)
  blog: Built-in Local Inference blogpost. (#8808)
  perf: parallelize provider resolution and eagerly init SQLite pool (#8899)
  refactor: update goose2 credential management behind provider-scoped ACP/core API (#8887)
  fix: handle acp requests concurrently (#8781)
  build: set LLAMA_STATIC_CRT for Windows CUDA (#8901)
  perf: deduplicate _goose/providers/list RPC call at startup (#8873)
  chore: add a bit more instructions in the release pr (#8890)
  chore: disable spellcheck in model search (#8889)
  add skills to the chat composer (#8881)
  mergeable configs + cleanup (#8378)
  refactor: agent provider to use explicit type states (#8879)
  [goose2] MCP Apps: hydrate and replay app payloads in Goose2 (#8632)
  ...
shafqatevo pushed a commit to shafqatevo/goose that referenced this pull request Aug 7, 2026
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.

2 participants