Skip to content

Paginate Google model refresh - #77

Merged
thossullivan merged 1 commit into
mainfrom
agent/google-models-pagination
Aug 18, 2026
Merged

Paginate Google model refresh#77
thossullivan merged 1 commit into
mainfrom
agent/google-models-pagination

Conversation

@thossullivan

Copy link
Copy Markdown
Owner

What changed

  • follows Google models.list nextPageToken values until the terminal page
  • requests up to 1,000 models per page while preserving existing query parameters
  • resets stale initial page tokens and forwards opaque tokens safely
  • de-duplicates model IDs in deterministic first-seen order
  • fails closed on malformed or failed later pages, token cycles, and more than 20 pages
  • keeps the existing parseGoogleModels string-array API and adds no dependencies

Why

The keyed Google refresh previously fetched only one response. Google defaults models.list to 50 records per page, so valid current models after page one could be silently omitted.

Validation

  • node refresh/test/run.mjs
  • npm test
  • node --check refresh/providers.mjs
  • node --check refresh/test/run.mjs
  • git diff --check

Closes #76

@thossullivan
thossullivan marked this pull request as ready for review August 18, 2026 03:03
@thossullivan
thossullivan merged commit 868a1fc into main Aug 18, 2026
6 checks passed
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.

Paginate Google Models API refresh

1 participant