Skip to content

add google/gemini-models - #237

Open
adssib wants to merge 1 commit into
pl5-convexfrom
pl5-gemini
Open

adssib wants to merge 1 commit into
pl5-convexfrom
pl5-gemini

Conversation

@adssib

@adssib adssib commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #236

Part of #37 (I6.3, google/gemini-models)

What this changes

New source google/gemini-models (kind notices, layer ai-models): Google's Gemini API deprecations page. It's served as Markdown at https://aistudio.google.com/docs/deprecations (ai.google.dev/gemini-api/docs/deprecations redirects there; re-checked 2026-11-21, 200). There is one Markdoc table per model family, | Model | Release date | Shutdown date | Recommended replacement |, giving one model event per model with a date (54 today), with the replacement when Google names exactly one model.

  • The retire reader now reads Markdoc tables too. They're turned into pipe rows under their headings, and a table counts when it has a shutdown/retirement date, a model and a replacement column in any order. OpenAI's and Anthropic's goldens are byte-identical.
  • Google's dates are "the earliest possible dates on which a model might be retired", and the description says so (Earliest).
  • Packages: pypi:google-genai, npm:@google/genai (both checked on their registries).

Checklist

  • Metadata complete in the registration (I read the words)
  • Golden over the real page, kept whole (CC BY 4.0): testdata/golden/google-gemini-models.json
  • testdata/README.md row
  • Pinned drop test: the Gemini 4 models ("No shutdown date announced") and the managed agents' tables (real dates, but an "Agent" column) next to the two shut-down Gemini 3 previews give only those two. The same agents' table with a "Model" header would read: the drop proves something.
  • providers/google-gemini-models.md with Why this source
  • make check passes

What the client needs

Nothing new: it's a model subject, which the client's model handler already fixes (replace the model name where the provider's SDK is called).

Related PRs

🤖 Generated with Claude Code

@adssib adssib mentioned this pull request Nov 21, 2026
6 tasks done
@claude

claude Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Claude finished @adssib's task in 1m 30s —— View job


✅ Ready to merge: the metadata, provider page, golden test, drop test and quotes are all there, all checks pass, and the OpenAI and Anthropic output is unchanged. I left two small optional notes below.

Rules

Rule Status Evidence
Metadata in the registration (Rule 1) ✅ plugins/notices/notices.go: source gemini-models under the existing google provider has layer ai-models, Watches, both URLs (the ai.google.dev page and the aistudio.google.com page it redirects to), Packages pypi:google-genai and npm:@google/genai, and its Page. No hand-kept list was added.
Provider page ✅ providers/google-gemini-models.md has a full Why this source: the link, checked 2026-11-21, why this source, three alternatives (release notes, Vertex AI, models.list), and two quotes.
Golden test + quote ✅ The page is saved whole (CC BY 4.0). testdata/golden/google-gemini-models.json has 54 events, each with the Wayback source_url and an excerpt. There's a row in retire/testdata/README.md. The OpenAI and Anthropic goldens aren't touched by this diff.
Drop test ✅ TestGeminiDropsModelsWithNoDateAndAgents: Gemini 4 (no date) plus the agents' tables give only the 2 Gemini 3 events. Renaming the agents' header to Model gives 2 more, so the test does prove the drop.
Fetch only via env ✅ The reader only parses bytes. There's no net/http, and os is used only in _test.go for a t.TempDir() file.
Nothing private (Rule 2) ✅ Nothing found in the code, tests, docs, the commit message or the PR body. The leak guard is clean.

Bugs

None found. Things I checked:

  • Column order: column() now looks for the words in order, not the columns. "replacement" still wins over "substitute".
  • Header checks: model == repl is guarded, the date column can be anywhere, and len(c) <= when is checked.
  • Header row in excerpts: headerAt replaces the old walk back to the header. It's set before the rows are read, so each excerpt gets the right header.
  • Markdoc tables: empty Markdoc cells (embedding-gecko-001's release date) read as "". Linked model cells ([`genie-4`](…)) still give the name.
  • Replacement field: replacement cells with a routing note correctly leave subject.replacement empty.

Verified

  • go build ./...: OK
  • go vet ./...: OK
  • gofmt -l .: prints nothing
  • go test -race ./...: all packages pass, including plugins/notices and plugins/notices/retire
  • python3 scripts/leak_guard.py --all: "no banned terms (8 hashed terms checked)"
  • No TODO(new-plugin) or net/http in plugins/notices/
  • I couldn't run make check in this sandbox (the command needed approval), so I ran its main steps one by one as listed above. Its other targets (tidy, imports, the repo-wide nethttp and todos checks) I didn't run.

Non-blocking

  1. Description for routed models (inline). The Earliest description says requests "fail once it is". For gemini-2.5-pro, gemini-2.5-flash and gemini-embedding-2-preview, Google says requests are routed to the replacement instead. The event is still right; only that sentence is wrong for those three.

  2. Excerpts aren't verbatim. source_excerpt is the Markdoc row rebuilt as a pipe row, not the page's own text. The README row says so ("as Markdoc * cell lines"), so this is fine. Just keep it in mind if the contract ever requires quotes that match the page exactly.

  3. Fragile Markdoc parsing, fine today.

    • markdocPipes only starts a table at a bare {% table %}, so a table with attributes ({% table colWidths=… %}) would be skipped. That fails safe: fewer models, then the "far fewer models" guard trips.
    • A continuation line starting with * (e.g. *emphasis*) would read as a new cell.

    Neither happens on the page today.


func describe(p Page, r Retirement) string {
if p.Earliest {
return fmt.Sprintf("Model %q can be shut down from %s, the earliest date %s gives: %s requests naming it fail once it is.", r.Model, r.Date, p.Vendor, p.Vendor)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Non-blocking: for some rows this sentence is wrong. gemini-2.5-pro, gemini-2.5-flash and gemini-embedding-2-preview don't fail on their date. Google says requests to them "will automatically route to" the replacement and are billed at its rates. The event is still worth emitting, since behaviour and price change, and the hint already quotes the routing note. But "requests naming it fail once it is" isn't true for those three. A softer wording such as "…: Google stops serving it under that name from then" would be correct for every row.

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