Skip to content

Commit 9dd614c

Browse files
authored
fix(drift): classify Gemini Nano Banana 2.1 as an image family (#499)
Gemini Nano Banana 2.1 appeared as an unclassified family in drift-sync run 37582645525. Add its exact family to the existing image-generation exclusions, update only that membership checksum, and guard the recorded Gemini wave against accidental inclusion. Supersedes the pending proposal in #496. Close #496 after this resolution PR merges. The [official model card](https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1?hl=en) identifies an image-generation and conversational-editing successor to Gemini 3.1 Flash Image. It outputs **Image and Text**. The decision follows existing image-family policy. ## Local red-green proof Base: `7b40b2ae738c122d6da2377641779f9d1d1480ec`. Functional proof commit: `b0653218cd6c5e96a32a8637c3b58848106183ae`. Current candidate: `31cdcfc1e9092538d57baf19772f4d6fed68c358` (adds only the changelog entry; functional proof reused). Working directory: `/Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude`. Input is the isolated provider-reported candidate from [source run 37582645525](https://github.com/CopilotKit/aimock/actions/runs/37582645525), not a fabricated fixture ID. This is a local replay through the real drift-sync selector, not a fresh HTTP/full-catalog listing or generation request. The selector imports actual `unclassifiedFamiliesForSync` and asserts zero unknown candidates. The same command and input execute before and after registry changes. Native wave assertions were added before registry changes. Command (both revisions): ```sh pnpm exec tsx /Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/selector-proof.ts ``` Harness: ```ts import { readFileSync } from "node:fs"; import { strict as assert } from "node:assert"; import { unclassifiedFamiliesForSync } from "/Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude/scripts/drift-sync.ts"; const input = JSON.parse(readFileSync(new URL("./provider-listing-input.json", import.meta.url), "utf8")); const result = unclassifiedFamiliesForSync(input, "gemini"); console.log(JSON.stringify({ source: "provider-reported ID from run 37582645525; isolated candidate replay, not fresh HTTP listing", input, unclassified: result })); assert.deepEqual(result, []); console.log("PASS: recorded candidate is classified by the real drift-sync selector"); ``` Input: ```json ["gemini-nano-banana-2.1"] ``` RED exit 1 (before classification): ```text {"source":"provider-reported ID from run 37582645525; isolated candidate replay, not fresh HTTP listing","input":["gemini-nano-banana-2.1"],"unclassified":["gemini-nano-banana-2.1"]} node:internal/modules/run_main:107 triggerUncaughtException( ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: + actual - expected + [ + 'gemini-nano-banana-2.1' + ] - [] at assert (/Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/selector-proof.ts:7:8) at Object.<anonymous> (/Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/selector-proof.ts:8:85) at Module._compile (node:internal/modules/cjs/loader:1934:14) at Object.transformer (/Users/jpr5/proj/aimock/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/register-D46fvsV_.cjs:3:1104) at Module.load (node:internal/modules/cjs/loader:1656:32) at Module._load (node:internal/modules/cjs/loader:1448:12) at wrapModuleLoad (node:internal/modules/cjs/loader:261:19) at loadCJSModuleWithModuleLoad (node:internal/modules/esm/translators:376:15) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:248:9) at ModuleJob.run (node:internal/modules/esm/module_job:569:25) { generatedMessage: true, code: 'ERR_ASSERTION', actual: [ 'gemini-nano-banana-2.1' ], expected: [], operator: 'deepStrictEqual', diff: 'simple' } Node.js v26.8.1 ``` GREEN exit 0 (unchanged reproduction): ```text {"source":"provider-reported ID from run 37582645525; isolated candidate replay, not fresh HTTP listing","input":["gemini-nano-banana-2.1"],"unclassified":[]} PASS: recorded candidate is classified by the real drift-sync selector (node:15693) [DEP0205] DeprecationWarning: `module.register()` is deprecated. Use `module.registerHooks()` instead. (Use `node --trace-deprecation ...` to show where the warning was created) ``` Native wave command (both revisions): ```sh pnpm exec vitest run --config vitest.config.drift.ts src/__tests__/drift/models.drift.ts -t 'Gemini: every recorded family' --maxWorkers=1 --minWorkers=1 ``` RED exit 1: ```text RUN v3.2.4 /Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude ❯ src/__tests__/drift/models.drift.ts (25 tests | 1 failed | 24 skipped) 4ms ↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > FAIL-CLOSED: an empty live listing never proposes removal ↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > FAIL-CLOSED: a short/truncated live listing never proposes removal ↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > a healthy listing omitting a classified family flags EXACTLY that family ↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > a still-referenced deprecated family routes to human (stillReferenced: true) ↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > a healthy listing missing nothing reports zero candidates ↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > an infra error (401/402/403/429/5xx) is an honest SKIP, never a removal signal ↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > a genuine non-infra error propagates (never silently swallowed as a skip) ↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > an InfraError with a non-skip status (e.g. 404) still propagates ↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > a healthy fetch flows through to the deterministic diff ↓ C4: isFamilyStillReferenced (real source-tree ref-scan, zero-LLM) > finds a real reference (gpt-4 and gpt-4o are both referenced in src/server.ts) ↓ C4: isFamilyStillReferenced (real source-tree ref-scan, zero-LLM) > reports zero-reference for a synthetic family that appears nowhere in src/ ↓ C4: isFamilyStillReferenced (real source-tree ref-scan, zero-LLM) > does not false-positive from being a strict substring of a longer live id ↓ model-family pipeline (injected /models) > incident 2: dated snapshots of included families produce ZERO drift ↓ model-family pipeline (injected /models) > a prose provider-mode token can never enter as a candidate ↓ model-family pipeline (injected /models) > a genuinely new family IS flagged as unclassified drift ↓ preview families are excluded by rule > a brand-new -preview family auto-excludes with zero registry edits ↓ preview families are excluded by rule > matches a trailing short numeric preview build tag (-preview-NN) ↓ preview families are excluded by rule > does NOT match interior -preview-<word> suffixes (they stay enumerated) ↓ gemma families are excluded by rule > a future Gemma variant auto-excludes with zero registry edits ↓ recorded /models family waves are classified > OpenAI: every live family is classified (zero unclassified) ↓ recorded /models family waves are classified > Anthropic: every live family is classified (zero unclassified) × recorded /models family waves are classified > Gemini: every recorded family is classified (zero unclassified) 3ms → expected [ 'gemini-nano-banana-2.1' ] to deeply equal [] ↓ OpenAI Chat model-family availability > live /models contains no unclassified family ↓ Anthropic Claude model-family availability > live /models contains no unclassified family ↓ Google Gemini model-family availability > live /models contains no unclassified family ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL src/__tests__/drift/models.drift.ts > recorded /models family waves are classified > Gemini: every recorded family is classified (zero unclassified) AssertionError: expected [ 'gemini-nano-banana-2.1' ] to deeply equal [] - Expected + Received - [] + [ + "gemini-nano-banana-2.1", + ] ❯ src/__tests__/drift/models.drift.ts:464:56 462| "gemini-pro-latest", 463| ]; 464| expect(unclassifiedFamilies(geminiLive, "gemini")).toEqual([]); | ^ 465| expect(excludeFamilies.gemini.has("gemini-nano-banana-2.1")).toBe(… 466| expect(includeFamilies.gemini.has("gemini-nano-banana-2.1")).toBe(… ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ Test Files 1 failed (1) Tests 1 failed | 24 skipped (25) Start at 09:01:42 Duration 153ms (transform 41ms, setup 0ms, collect 49ms, tests 4ms, environment 0ms, prepare 31ms) ``` GREEN exit 0: ```text RUN v3.2.4 /Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude ✓ src/__tests__/drift/models.drift.ts (25 tests | 24 skipped) 1ms Test Files 1 passed (1) Tests 1 passed | 24 skipped (25) Start at 09:02:24 Duration 132ms (transform 37ms, setup 0ms, collect 45ms, tests 1ms, environment 0ms, prepare 23ms) ``` ## Targeted validation ```sh pnpm exec vitest run src/__tests__/drift/logic-pin.test.ts src/__tests__/drift/model-family.test.ts src/__tests__/drift/model-registry.test.ts src/__tests__/drift-sync-mirror-equivalence.test.ts src/__tests__/drift-sync-core.test.ts src/__tests__/drift-sync-check.test.ts src/__tests__/drift-sync-gate-determinism.test.ts --maxWorkers=1 --minWorkers=1 ``` ```text RUN v3.2.4 /Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude ✓ src/__tests__/drift-sync-core.test.ts (68 tests) 274ms ✓ src/__tests__/drift-sync-mirror-equivalence.test.ts (9 tests) 45ms ✓ src/__tests__/drift-sync-check.test.ts (39 tests) 28ms ✓ src/__tests__/drift-sync-gate-determinism.test.ts (12 tests) 20ms ✓ src/__tests__/drift/logic-pin.test.ts (33 tests) 3ms ✓ src/__tests__/drift/model-registry.test.ts (14 tests) 6ms ✓ src/__tests__/drift/model-family.test.ts (5 tests) 1ms Test Files 7 passed (7) Tests 180 passed (180) Start at 09:02:38 Duration 1.58s (transform 85ms, setup 0ms, collect 596ms, tests 377ms, environment 0ms, prepare 154ms) ``` Changed-file Prettier, ESLint and `git diff --check` pass. No FROZEN logic pins, runtime serving, voice seed, release/version or unrelated family changed. One family only; no broader cell-flip claim. Typecheck passes after an isolated frozen-lockfile dependency install. Independent Tier 1 review is clean across code correctness, test coverage, and documentation/policy evidence. Full local formatting, lint, explicit source/test/script typechecks, build, export validation, commitlint, and whitespace gates pass. The full suite passes: 294 files, 9622 tests passed, 1 existing skipped. The initial test run lacked built CLI artifacts; following repository CI order, building first and replaying the same suite passed without source changes. CI remains pending until this replacement PR is opened and checked. Changelog omission proof: `python3 /Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/changelog-proof.py` failed before the entry and passed unchanged afterward. ```text Traceback (most recent call last): File "/Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/changelog-proof.py", line 3, in <module> assert "gemini-nano-banana-2.1" in s, "Missing Gemini Nano Banana 2.1 disposition in Unreleased changelog" AssertionError: Missing Gemini Nano Banana 2.1 disposition in Unreleased changelog PASS: Unreleased documents Gemini Nano Banana exclusion and Image and Text capability ```
2 parents a890532 + 31cdcfc commit 9dd614c

5 files changed

Lines changed: 35 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
### Fixed
4444

45+
- Classify `gemini-nano-banana-2.1` under the existing image-generation drift exclusions. The model outputs Image and Text; its appearance in the provider listing no longer raises an unclassified text-family alert.
4546
- Return HTTP 202 from OpenRouter video submission on fixture replay and successful record/proxy paths, with matching journal status; polling and downloads remain HTTP 200 (#492).
4647
- Fix the competitive-matrix updater to apply detected capabilities to migration pages even when homepage cells are unchanged or no homepage row exists. Report migration outcomes and flag ambiguous or unsupported cells for manual review without changing them (#488)
4748
- Allow PUT in CORS preflight responses so browsers can call the existing `/fal/queue/requests/{requestId}` route (#480).
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Resolved model family: gemini-nano-banana-2.1
2+
3+
Provider: gemini
4+
Detected: 2026-10-07
5+
Status: RESOLVED — registry exclusion applied
6+
7+
Decision: exclude
8+
9+
Google identifies this stable model as image generation and conversational editing,
10+
succeeding Gemini 3.1 Flash Image. It outputs **Image and Text**; exclusion follows
11+
the existing image-generation family policy, not an assertion that it cannot emit
12+
text. Function calling, structured outputs, and Live API are unsupported.
13+
14+
Source: [official model card](https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1?hl=en),
15+
updated 2026-10-06, checked 2026-10-07.
16+
17+
Applied on 2026-10-07: added the exact family to `excludeFamilies.gemini` in
18+
`src/__tests__/drift/model-registry.ts`, updated only its membership checksum in
19+
`logic-pin.test.ts`, and added the provider-reported ID to the recorded Gemini
20+
wave in `models.drift.ts`. The wave asserts exclusion and absence from inclusion.
21+
22+
The source listing was reported by [drift-sync run 37582645525](https://github.com/CopilotKit/aimock/actions/runs/37582645525).
23+
A local replay of its reported candidate through the real drift-sync selector and
24+
the recorded Gemini wave both failed before classification and passed afterward.
25+
This replay does not claim a fresh live HTTP listing or generation request.

‎src/__tests__/drift/logic-pin.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ const DATA_FROZEN: Record<string, { members: () => string[]; pin: string }> = {
443443
},
444444
"excludeFamilies.gemini": {
445445
members: () => [...excludeFamilies.gemini].sort(),
446-
pin: "39f92d34b38410ac7c2c43e2800f2a1c3cd384d31f85f4ce9dea562f655eb650",
446+
pin: "f7d231750e7a9fd28339077365f1421a194f343f2598e2eb03708986b5178d98",
447447
},
448448
// The realtime canary's seed sets, previously pinned NOWHERE. An edit to
449449
// either one was invisible to every guard in the repo: adding a family to

‎src/__tests__/drift/model-registry.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,14 @@ export const excludeFamilies: Record<Provider, Set<string>> = {
396396
"text-embedding-004",
397397
"gemini-embedding",
398398
"gemini-embedding-2",
399-
// Image models (non-text)
399+
// Image-generation models (outside text-generation drift scope)
400400
"gemini-2.5-flash-image",
401401
"gemini-3-pro-image",
402402
"gemini-3.1-flash-image",
403403
"gemini-3.1-flash-lite-image",
404+
// Flash Image successor; outputs Image AND Text (provider card, 2026-10-06).
405+
// https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1
406+
"gemini-nano-banana-2.1",
404407
"imagen-4.0-fast-generate",
405408
"imagen-4.0-generate",
406409
"imagen-4.0-ultra-generate",

‎src/__tests__/drift/models.drift.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
import { describe, it, expect } from "vitest";
3838
import { InfraError, isInfraSkip } from "./providers.js";
39-
import { includeFamilies } from "./model-registry.js";
39+
import { includeFamilies, excludeFamilies } from "./model-registry.js";
4040
import { isFamilyStillReferenced } from "./deprecation-detector.js";
4141
import {
4242
unclassifiedFamilies,
@@ -435,6 +435,7 @@ describe("recorded /models family waves are classified", () => {
435435
"gemini-3.1-flash-image",
436436
"gemini-3.1-flash-image-preview", // pattern
437437
"gemini-3.1-flash-lite-image",
438+
"gemini-nano-banana-2.1", // image-generation successor, recorded 2026-10-07
438439
"gemini-3.1-flash-tts-preview", // pattern
439440
"gemini-3.8-flash-tts", // explicit exclude (non-preview -tts, 2026-09-24..30 wave)
440441
"gemini-3.8-flash-lite-tts", // explicit exclude (non-preview -tts, 2026-09-24..30 wave)
@@ -461,6 +462,8 @@ describe("recorded /models family waves are classified", () => {
461462
"gemini-pro-latest",
462463
];
463464
expect(unclassifiedFamilies(geminiLive, "gemini")).toEqual([]);
465+
expect(excludeFamilies.gemini.has("gemini-nano-banana-2.1")).toBe(true);
466+
expect(includeFamilies.gemini.has("gemini-nano-banana-2.1")).toBe(false);
464467
});
465468
});
466469

0 commit comments

Comments
 (0)