Repository navigation
feat(image): add google/nano-banana-2-lite and google/nano-banana-2.1 - #229
Merged
Merged
Conversation
… to blockrun_image Both gateways list them since 2026-11-16 (blockrun #1080 and the sol port): $0.05 and $0.07 catalog, 1024x1024 only, editable on /images/image2image. Every other size is a 400 before any payment exists, so one price row each is the whole surface. Unpaid 402 quotes, 2026-11-24, generate and edit alike: nano-banana-2-lite Base $0.0535 Solana $0.0525 reserve $0.054501 nano-banana-2.1 Base $0.0745 Solana $0.0735 reserve $0.075501 Added to the model enum, GENERATE_MODEL_COST, EDIT_MODELS and the tool description; verify:prices probes both (0 under-reserving). Without a cost row a model falls back to the $0.06 default, which would reserve $0.065 against nano-banana-2.1's $0.0745 charge; the new test pins that. The description grew 108 tokens: full 14,425 -> 14,533, media 7,016 -> 7,124, card 14.4K -> 14.5K (re-measured, card regenerated).
The README cost cell said $0.015–0.15. The tool's own tables top out at $0.56 (gpt-image-2.5 at 1536x1024 / 1024x1536), with nano-banana-pro 4K at $0.30, so the published ceiling was under a third of the real one. Export GENERATE_MODEL_COST and LARGE_SIZE_COST and add test/readme-image-price.test.ts, which fails unless the README row reads the min–max of those tables (now $0.015–0.56). It failed on the old README before the fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the two Nano Banana models both gateways have listed since 2026-11-16 to
blockrun_image. No version bump or CHANGELOG entry; the release goes out separately.What the gateways serve
Both models are in
GET /api/v1/modelson blockrun.ai and sol.blockrun.ai. The source is blockrunsrc/lib/models.tsandsrc/lib/image-editing.ts, and blockrun-solsrc/lib/models.ts.google/nano-banana-2-litegoogle/nano-banana-2.1Live probes (unpaid 402, 2026-11-24)
The reserve is catalog x 1.05 plus the $0.002 reserved fee, rounded up with the gateway's float drift. That puts it $0.001 above the Base charge and $0.002 above Solana, the same safe direction as
nano-banana-2. Base books reserve minus $0.001 ($0.053501 / $0.074501).Changes
src/tools/image.ts: both models added to the enum,GENERATE_MODEL_COST,EDIT_MODELSand the tool description, which gets a generate line for each and both in the edit list.scripts/verify-prices.ts: a 1024 probe for each.npm run verify:priceschecked 78 routes: 0 under-reserving, 0 ✗, exit 0. Both new rows show!for a $0.001001 over-reserve, the same as nano-banana-2.test/image-cost.test.tshas three new tests:image-promptingskill list both models.blockrun_imageprice range fixed: it said $0.015–0.15, but the tool's own tables top out at $0.56 (gpt-image-2.5 large sizes), with nano-banana-pro 4K at $0.30. It now reads $0.015–0.56, the min and max ofGENERATE_MODEL_COST+LARGE_SIZE_COST. Both tables are now exported, and the newtest/readme-image-price.test.tsfails if the README range doesn't match them. It failed on the old README before the fix.npm run measure:schema/brand:card. The description grew 108 tokens:full14,425 → 14,533,media7,016 → 7,124, card 14.4K → 14.5K. Trading saving is still 61%.Verification
npx tsc --noEmit: cleannpm test: 1518 pass, 0 failnpm run build: OKgoogle/nano-banana-2.1cost row. Two tests failed, because the model fell back to the $0.06 default and reserved $0.065 against a $0.0745 charge. Restoring the row made them pass again.🤖 Generated with Claude Code