8000 fix(google): correct model discovery and embedding limits by Fodesu · Pull Request #120 · felinics/twilight · GitHub
[go: up one dir, main page]

Skip to content

fix(google): correct model discovery and embedding limits - #120

Merged
Fodesu merged 1 commit into
mainfrom
fix/google-embedding-model-discovery
Oct 13, 2026
Merged

Fodesu merged 1 commit into
mainfrom
fix/google-embedding-model-discovery

Conversation

@Fodesu
@Fodesu Fodesu commented Oct 13, 2026 •
Copy link
Copy Markdown
Member

Summary

  • report Google Gemini's enforced batch embedding limit of 100 values per call, vercel report this for ref
  • follow nextPageToken when listing both generative and embedding models
  • request Google's maximum model page size and reject repeated pagination tokens instead of looping indefinitely
  • update embedding limit documentation and cover multi-page discovery

Tests

  • go test ./...
  • GOTOOLCHAIN=go1.26.1 golangci-lint run
  • go vet ./provider/google/...
  • git diff --check origin/main...HEAD

Live smoke test

Ran the PR branch's actual providers against TokenFlux's Gemini-native https://tokenflux.dev/v1beta/models endpoint using a disposable test credential:

  • generativeai.Provider.ListModels: succeeded and decoded 3 generative models
  • embedding.Provider.ListModels: request and decoding succeeded; this credential exposes no embedding models
  • the endpoint accepted the PR's pageSize=1000 request

TokenFlux returned no nextPageToken and ignores pageSize=1, so multi-page traversal remains covered by the mock-server tests rather than this live smoke test. The batch embedding limit was not exercised because the credential exposes no embedding model.

@Fodesu
Fodesu force-pushed the fix/google-embedding-model-discovery branch from 868703c to 2528eb1 Compare October 13, 2026 13:04
@Fodesu Fodesu changed the title fix(google): correct embedding discovery limits fix(google): correct model discovery and embedding limits Oct 13, 2026
@Fodesu
Fodesu merged commit e99d186 into main Oct 13, 2026
4 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.

1 participant

0