johns-harness 2026.9.40 → 2026.9.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/auth-profiles-5CHn7vq1.js +1 -1
- package/dist/config-koj5M_EO.js +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/image-generate.js +45 -21
- package/dist/model-selection-BGlGpPgM.js +1 -1
- package/dist/model-selection-BU6wl1le.js +1 -1
- package/dist/model-selection-L7RMwsG-.js +1 -1
- package/dist/plugin-sdk/config-4Fgm-yEH.js +1 -1
- package/dist/plugin-sdk/config-Di-lyCdh.js +1 -1
- package/dist/plugin-sdk/discord.js +1 -1
- package/dist/plugin-sdk/model-auth-CX9cPHdC.js +1 -1
- package/dist/plugin-sdk/model-auth-Ciehz0x5.js +1 -1
- package/dist/plugin-sdk/model-auth-DVyo6JSX.js +1 -1
- package/dist/plugin-sdk/model-auth-kiHYHGrs.js +1 -1
- package/dist/plugin-sdk/model-selection-Dbj4jDYM.js +1 -1
- package/docs/MODELS.md +5 -0
- package/docs/PATCHES.md +10 -0
- package/models/models.json +4 -3
- package/package.json +1 -1
- package/scripts/check-models-master.mjs +10 -1
- package/scripts/models-sync.mjs +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.9.41
|
|
4
|
+
|
|
5
|
+
- `nano-banana` and `banana` now mean Nano Banana 2.1 (`google/gemini-nano-banana-2.1`, GA 2026-10-06), in `/model` and in `image_generate`. Google's model card puts it ahead of Nano Banana Pro on every image eval (Overall Preference Elo 1050 thinking vs 935 for Pro; General Editing 1026 vs 939), and it costs about a third as much: $30/MTok image output, about $0.034 per 1K image plus thinking tokens at $7.50/MTok (about $0.045 all-in at the default thinking level in the live run), vs $0.134 for Pro. Google deprecated `gemini-3.1-flash-image` (Nano Banana 2) in its favor. Nano Banana Pro (`google/gemini-3-pro-image-preview`) stays reachable as `nano-banana-pro`. The default image chain is unchanged: `openai-codex/gpt-image-2` (subscription), then `openai/gpt-image-2`; Nano Banana is still opt-in with `model: "nano-banana"`.
|
|
6
|
+
- `image_generate` additions for Nano Banana: `imageSize` (`1K` default, `2K`, `4K`; `generationConfig.imageConfig.imageSize`), up to 14 reference images per call with a Google model (the OpenAI path stays at 4), and the 2.1 panoramic aspect ratios `1:4`, `4:1`, `1:8`, `8:1`.
|
|
7
|
+
- The image tool's alias table is now generated from `models/models.json` (`JOHNNESS_MODELS_MASTER:BEGIN image aliases` in `dist/image-generate.js`): every shipped alias whose target is an image generation model also resolves in `image_generate`, so moving `nano-banana` is one edit to the master. `models-sync` covers 38 files; `check-models-master.mjs` and verifier 83.7-83.8 check the tool against the master.
|
|
8
|
+
- Live through the shipped tool (2026-10-11): a `model: "nano-banana"` 16:9 generation returned HTTP 200 and a 1376x768 JPEG from `gemini-nano-banana-2.1` (1,120 image tokens), and an edit of that image returned HTTP 200 with the composition kept and the requested on-screen text rendered.
|
|
9
|
+
- Roll back with `npm i -g johns-harness@2026.9.40`.
|
|
10
|
+
|
|
3
11
|
## 2026.9.40
|
|
4
12
|
|
|
5
13
|
- Claude Haiku 5.5 (`anthropic/claude-haiku-5-5`, GA 2026-10-07) is first-class. Card (docs.claude.com/docs/en/models/haiku-5-5/overview, pricing, effort and thinking pages, release notes, and `GET /v1/models/claude-haiku-5-5`, checked 2026-10-08): 1M context (the harness uses the full native window), 128K max output, text + image input, adaptive thinking on by default (default effort `medium`, thinking display omitted), effort `low` through `max`, knowledge cutoff Jun 2026, newer tokenizer (about 30% more tokens than Haiku 4.5). Manual thinking (`thinking.type: "enabled"` / `budget_tokens`) and any non-default `temperature`/`top_p`/`top_k` return 400.
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ Expired ChatGPT credentials trigger an owner notice with the `/login` recovery c
|
|
|
55
55
|
|
|
56
56
|
<!-- JOHNNESS_PATCH_DEFAULTS_61 -->
|
|
57
57
|
### Batteries included
|
|
58
|
-
The harness ships the current model catalog and the short aliases `opus`, `sonnet`, `fable`, `astra`, `sol`, `luna`, `terra`, `gpt`, `grok`, `flash`, `banana`, `image`, `deepseek`, `deepseek-pro`, `muse`, and `gemini-lite`, so `/model opus` works on a fresh install with no `models.providers` block. Channels you configure load without a `plugins.allow` list; only an explicit `enabled: false` or `plugins.deny` turns one off. Updating the harness updates the catalog and aliases for every agent. Any `openai-codex/<model>` primary that hits its ChatGPT usage limit fails over to `openai/<model>` on the API key first, then to your configured fallbacks, with no config (the sibling is skipped when no OpenAI API key is present). Image generation and editing use GPT Image 2 through the `image_generate` tool: `openai-codex/gpt-image-2` on the ChatGPT subscription first, `openai/gpt-image-2` on the API key second (`agents.defaults.imageGenerationModel`). Nano Banana
|
|
58
|
+
The harness ships the current model catalog and the short aliases `opus`, `sonnet`, `fable`, `astra`, `sol`, `luna`, `terra`, `gpt`, `grok`, `flash`, `banana`, `image`, `deepseek`, `deepseek-pro`, `muse`, and `gemini-lite`, so `/model opus` works on a fresh install with no `models.providers` block. Channels you configure load without a `plugins.allow` list; only an explicit `enabled: false` or `plugins.deny` turns one off. Updating the harness updates the catalog and aliases for every agent. Any `openai-codex/<model>` primary that hits its ChatGPT usage limit fails over to `openai/<model>` on the API key first, then to your configured fallbacks, with no config (the sibling is skipped when no OpenAI API key is present). Image generation and editing use GPT Image 2 through the `image_generate` tool: `openai-codex/gpt-image-2` on the ChatGPT subscription first, `openai/gpt-image-2` on the API key second (`agents.defaults.imageGenerationModel`). Nano Banana 2.1 (`google/gemini-nano-banana-2.1`) ships as a selectable image model, reachable with `model: "nano-banana"` (or `banana`) plus its own `aspectRatio` and `imageSize` (1K/2K/4K) options and up to 14 reference images; Nano Banana Pro (`google/gemini-3-pro-image-preview`) stays available as `nano-banana-pro`. The default stays GPT Image 2 because the subscription path costs nothing.
|
|
59
59
|
|
|
60
60
|
**The alias contract.** Every shipped alias points at the newest model in its line, so an install or an `/update` moves every agent forward with zero per-instance config. Your own `agents.defaults.models[*].alias` entries are still consulted first and still win. Every catalog bump must move the matching alias; the verifier fails the release if it does not. `/model deepseek` always selects the newest DeepSeek model (currently V4.1 Flash); `deepseek-pro` the newest Pro.
|
|
61
61
|
|
|
@@ -5157,7 +5157,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
5157
5157
|
grok46: "xai/grok-4.6"
|
|
5158
5158
|
});
|
|
5159
5159
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
5160
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
5160
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
5161
5161
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5162
5162
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5163
5163
|
const DEFAULT_MODEL_COST = {
|
package/dist/config-koj5M_EO.js
CHANGED
|
@@ -1852,7 +1852,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1852
1852
|
grok46: "xai/grok-4.6"
|
|
1853
1853
|
});
|
|
1854
1854
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1855
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
1855
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
1856
1856
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1857
1857
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1858
1858
|
const DEFAULT_MODEL_COST = {
|
package/dist/daemon-cli.js
CHANGED
|
@@ -5004,7 +5004,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
5004
5004
|
grok46: "xai/grok-4.6"
|
|
5005
5005
|
});
|
|
5006
5006
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
5007
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
5007
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
5008
5008
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5009
5009
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5010
5010
|
const DEFAULT_MODEL_COST = {
|
package/dist/image-generate.js
CHANGED
|
@@ -24,24 +24,42 @@ const SIZES = new Set(["1024x1024", "1536x1024", "1024x1536", "auto"]);
|
|
|
24
24
|
const DEFAULT_MAX_INPUT_BYTES = 20 * 1024 * 1024;
|
|
25
25
|
const JWT_CLAIM_PATH = "https://api.openai.com/auth";
|
|
26
26
|
|
|
27
|
-
// JOHNNESS_PATCH_NANO_BANANA_63:
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
27
|
+
// JOHNNESS_PATCH_NANO_BANANA_63: Gemini image models (Nano Banana) are selectable, not a
|
|
28
|
+
// default. The default chain stays subscription first (openai-codex/gpt-image-2, then
|
|
29
|
+
// openai/gpt-image-2); Gemini is API-key billed, so it is reached only through the tool's
|
|
30
|
+
// `model` param or agents.defaults.imageGenerationModel.
|
|
31
|
+
// Since 2026.9.41 `nano-banana`/`banana` mean Nano Banana 2.1 (google/gemini-nano-banana-2.1,
|
|
32
|
+
// GA 2026-10-06, ahead of Pro on Google's evals); Nano Banana Pro stays reachable as
|
|
33
|
+
// `nano-banana-pro`.
|
|
31
34
|
export const GOOGLE_BASE = "https://generativelanguage.googleapis.com/v1beta";
|
|
32
|
-
export const NANO_BANANA_MODEL_ID = "gemini-
|
|
35
|
+
export const NANO_BANANA_MODEL_ID = "gemini-nano-banana-2.1";
|
|
33
36
|
export const NANO_BANANA_REF = `google/${NANO_BANANA_MODEL_ID}`;
|
|
34
|
-
|
|
35
|
-
export const
|
|
36
|
-
/**
|
|
37
|
-
|
|
37
|
+
export const NANO_BANANA_PRO_MODEL_ID = "gemini-3-pro-image-preview";
|
|
38
|
+
export const NANO_BANANA_PRO_REF = `google/${NANO_BANANA_PRO_MODEL_ID}`;
|
|
39
|
+
/** Aspect ratios the Gemini image models accept. 1:4, 4:1, 1:8 and 8:1 are Nano Banana 2.1 only.
|
|
40
|
+
* Ignored by the OpenAI providers, which use `size`. */
|
|
41
|
+
export const ASPECT_RATIOS = Object.freeze(["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9", "1:4", "4:1", "1:8", "8:1"]);
|
|
42
|
+
/** Gemini output resolutions (generationConfig.imageConfig.imageSize). Ignored by the OpenAI providers. */
|
|
43
|
+
export const IMAGE_SIZES = Object.freeze(["1K", "2K", "4K"]);
|
|
44
|
+
/** Input images per call: the OpenAI Images edits limit, and Nano Banana's reference-image limit. */
|
|
45
|
+
export const MAX_INPUT_IMAGES = 4;
|
|
46
|
+
export const MAX_GOOGLE_INPUT_IMAGES = 14;
|
|
47
|
+
// Bare names the `model` param accepts, resolved to catalog refs before provider routing. The
|
|
48
|
+
// hand-written entries are the fallback; the generated block below copies every image alias from
|
|
49
|
+
// models/models.json over them, so moving `nano-banana` is one edit to the master.
|
|
50
|
+
const IMAGE_MODEL_ALIAS_TABLE = {
|
|
38
51
|
"nano-banana": NANO_BANANA_REF,
|
|
39
52
|
banana: NANO_BANANA_REF,
|
|
40
|
-
"nano-banana-pro":
|
|
41
|
-
"gemini-
|
|
53
|
+
"nano-banana-pro": NANO_BANANA_PRO_REF,
|
|
54
|
+
"gemini-nano-banana-2.1": NANO_BANANA_REF,
|
|
55
|
+
"gemini-3-pro-image-preview": NANO_BANANA_PRO_REF,
|
|
42
56
|
image: "openai-codex/gpt-image-2",
|
|
43
57
|
"gpt-image-2": "openai-codex/gpt-image-2",
|
|
44
|
-
}
|
|
58
|
+
};
|
|
59
|
+
/* JOHNNESS_MODELS_MASTER:BEGIN image aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
60
|
+
for (const [alias, ref] of Object.entries({"banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2"})) IMAGE_MODEL_ALIAS_TABLE[alias] = ref;
|
|
61
|
+
/* JOHNNESS_MODELS_MASTER:END */
|
|
62
|
+
export const IMAGE_MODEL_ALIASES = Object.freeze(IMAGE_MODEL_ALIAS_TABLE);
|
|
45
63
|
|
|
46
64
|
/** Resolve an alias or a provider/model ref to a full provider/model ref. */
|
|
47
65
|
export function resolveImageModelRef(raw) {
|
|
@@ -164,10 +182,14 @@ export function validateParams(args) {
|
|
|
164
182
|
const record = args && typeof args === "object" ? args : {};
|
|
165
183
|
const prompt = typeof record.prompt === "string" ? record.prompt.trim() : "";
|
|
166
184
|
if (!prompt) throw new Error("prompt required");
|
|
185
|
+
// JOHNNESS_PATCH_NANO_BANANA_63: aliases resolve to catalog refs; aspectRatio/imageSize are Gemini only.
|
|
186
|
+
const model = typeof record.model === "string" && record.model.trim() ? resolveImageModelRef(record.model) : void 0;
|
|
167
187
|
const inputs = [];
|
|
168
188
|
if (typeof record.image === "string" && record.image.trim()) inputs.push(record.image.trim());
|
|
169
189
|
if (Array.isArray(record.images)) for (const v of record.images) if (typeof v === "string" && v.trim()) inputs.push(v.trim());
|
|
170
|
-
|
|
190
|
+
// Nano Banana takes up to 14 reference images; the OpenAI edits endpoint (and the default chain) 4.
|
|
191
|
+
const maxInputs = model?.startsWith("google/") ? MAX_GOOGLE_INPUT_IMAGES : MAX_INPUT_IMAGES;
|
|
192
|
+
if (inputs.length > maxInputs) throw new Error(`at most ${maxInputs} input images`);
|
|
171
193
|
const mask = typeof record.mask === "string" && record.mask.trim() ? record.mask.trim() : void 0;
|
|
172
194
|
if (mask && inputs.length === 0) throw new Error("mask requires an input image");
|
|
173
195
|
const size = typeof record.size === "string" && record.size.trim() ? record.size.trim() : "auto";
|
|
@@ -175,17 +197,17 @@ export function validateParams(args) {
|
|
|
175
197
|
const countRaw = typeof record.count === "number" ? Math.floor(record.count) : 1;
|
|
176
198
|
if (!Number.isFinite(countRaw) || countRaw < 1 || countRaw > 4) throw new Error("count must be 1..4");
|
|
177
199
|
const quality = typeof record.quality === "string" && ["low", "medium", "high", "auto"].includes(record.quality) ? record.quality : void 0;
|
|
178
|
-
// JOHNNESS_PATCH_NANO_BANANA_63: aliases resolve to catalog refs; aspectRatio is Gemini only.
|
|
179
|
-
const model = typeof record.model === "string" && record.model.trim() ? resolveImageModelRef(record.model) : void 0;
|
|
180
200
|
const aspectRatio = typeof record.aspectRatio === "string" && record.aspectRatio.trim() ? record.aspectRatio.trim() : void 0;
|
|
181
201
|
if (aspectRatio && !ASPECT_RATIOS.includes(aspectRatio)) throw new Error(`aspectRatio must be one of ${ASPECT_RATIOS.join(", ")}`);
|
|
182
|
-
|
|
202
|
+
const imageSize = typeof record.imageSize === "string" && record.imageSize.trim() ? record.imageSize.trim().toUpperCase() : void 0;
|
|
203
|
+
if (imageSize && !IMAGE_SIZES.includes(imageSize)) throw new Error(`imageSize must be one of ${IMAGE_SIZES.join(", ")}`);
|
|
204
|
+
return { prompt, inputs, mask, size, count: countRaw, quality, aspectRatio, imageSize, output: typeof record.output === "string" ? record.output : void 0, model };
|
|
183
205
|
}
|
|
184
206
|
|
|
185
207
|
/**
|
|
186
208
|
* JOHNNESS_PATCH_NANO_BANANA_63: Gemini generateContent branch.
|
|
187
209
|
* Generations send the prompt alone; edits send the prompt plus one inlineData part per input
|
|
188
|
-
* image. `aspectRatio`
|
|
210
|
+
* image. `aspectRatio` and `imageSize` ride generationConfig.imageConfig. Failure classification is shared with
|
|
189
211
|
* the OpenAI branches (isUnsupportedStatus) so fallback chaining behaves identically.
|
|
190
212
|
*/
|
|
191
213
|
async function callGoogleProvider({ candidate, apiKey, params, images, fetchImpl, userAgent }) {
|
|
@@ -195,6 +217,7 @@ async function callGoogleProvider({ candidate, apiKey, params, images, fetchImpl
|
|
|
195
217
|
for (const img of images) parts.push({ inlineData: { mimeType: img.mimeType, data: Buffer.from(img.buffer).toString("base64") } });
|
|
196
218
|
const generationConfig = { responseModalities: ["IMAGE"] };
|
|
197
219
|
if (params.aspectRatio) generationConfig.imageConfig = { aspectRatio: params.aspectRatio };
|
|
220
|
+
if (params.imageSize) generationConfig.imageConfig = { ...generationConfig.imageConfig, imageSize: params.imageSize };
|
|
198
221
|
const res = await fetchImpl(url, { method: "POST", headers, body: JSON.stringify({ contents: [{ role: "user", parts }], generationConfig }) });
|
|
199
222
|
const text = await res.text();
|
|
200
223
|
if (!res.ok) {
|
|
@@ -313,18 +336,19 @@ export function createImageGenerateTool(options, deps) {
|
|
|
313
336
|
return {
|
|
314
337
|
label: "Image Generate",
|
|
315
338
|
name: "image_generate",
|
|
316
|
-
description: "Generate or edit images with GPT Image 2 (default openai-codex/gpt-image-2, then openai/gpt-image-2) or Nano Banana Pro (model: nano-banana). Give a prompt; add image (or images, up to 4) to edit, and an optional mask PNG. Writes
|
|
339
|
+
description: "Generate or edit images with GPT Image 2 (default openai-codex/gpt-image-2, then openai/gpt-image-2), Nano Banana 2.1 (model: nano-banana) or Nano Banana Pro (model: nano-banana-pro). Give a prompt; add image (or images, up to 4, or up to 14 with Nano Banana) to edit, and an optional mask PNG. Writes image files under the workspace media/generated folder and returns their paths; send them with the message tool.",
|
|
317
340
|
parameters: Type.Object({
|
|
318
341
|
prompt: Type.String({ description: "What to draw or how to change the input image." }),
|
|
319
342
|
image: Type.Optional(Type.String({ description: "Input image path to edit (workspace or allowed local root)." })),
|
|
320
|
-
images: Type.Optional(Type.Array(Type.String(), { description: "Multiple input images to edit together (max 4)." })),
|
|
343
|
+
images: Type.Optional(Type.Array(Type.String(), { description: "Multiple input images to edit together (max 4; up to 14 reference images with a Nano Banana model)." })),
|
|
321
344
|
mask: Type.Optional(Type.String({ description: "PNG mask path; transparent areas are edited." })),
|
|
322
345
|
size: Type.Optional(Type.String({ description: "1024x1024, 1536x1024, 1024x1536, or auto (default)." })),
|
|
323
346
|
count: Type.Optional(Type.Number({ description: "Number of images, 1..4 (default 1)." })),
|
|
324
347
|
quality: Type.Optional(Type.String({ description: "low, medium, high, or auto." })),
|
|
325
348
|
output: Type.Optional(Type.String({ description: "Output path inside the workspace (default media/generated/gpt-image-<timestamp>.png)." })),
|
|
326
|
-
model: Type.Optional(Type.String({ description: "Override provider/model, for example openai/gpt-image-2, or an alias: nano-banana (Nano Banana
|
|
327
|
-
aspectRatio: Type.Optional(Type.String({ description: "Nano Banana
|
|
349
|
+
model: Type.Optional(Type.String({ description: "Override provider/model, for example openai/gpt-image-2, or an alias: nano-banana or banana (Nano Banana 2.1), nano-banana-pro (Nano Banana Pro), image (GPT Image 2)." })),
|
|
350
|
+
aspectRatio: Type.Optional(Type.String({ description: "Nano Banana only: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, or 21:9; Nano Banana 2.1 also takes 1:4, 4:1, 1:8 and 8:1. Ignored by the GPT Image 2 providers." })),
|
|
351
|
+
imageSize: Type.Optional(Type.String({ description: "Nano Banana only: output resolution 1K (default), 2K, or 4K. Ignored by the GPT Image 2 providers, which use size." })),
|
|
328
352
|
}),
|
|
329
353
|
execute: async (_toolCallId, args) => {
|
|
330
354
|
const params = validateParams(args);
|
|
@@ -1709,7 +1709,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1709
1709
|
grok46: "xai/grok-4.6"
|
|
1710
1710
|
});
|
|
1711
1711
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1712
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
1712
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
1713
1713
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1714
1714
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1715
1715
|
const DEFAULT_MODEL_COST = {
|
|
@@ -1684,7 +1684,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1684
1684
|
grok46: "xai/grok-4.6"
|
|
1685
1685
|
});
|
|
1686
1686
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1687
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
1687
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
1688
1688
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1689
1689
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1690
1690
|
const DEFAULT_MODEL_COST = {
|
|
@@ -1615,7 +1615,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
1615
1615
|
grok46: "xai/grok-4.6"
|
|
1616
1616
|
});
|
|
1617
1617
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
1618
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
1618
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
1619
1619
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
1620
1620
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
1621
1621
|
const DEFAULT_MODEL_COST = {
|
|
@@ -7102,7 +7102,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
7102
7102
|
grok46: "xai/grok-4.6"
|
|
7103
7103
|
});
|
|
7104
7104
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
7105
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
7105
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
7106
7106
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
7107
7107
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
7108
7108
|
const DEFAULT_MODEL_COST = {
|
|
@@ -8103,7 +8103,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
8103
8103
|
grok46: "xai/grok-4.6"
|
|
8104
8104
|
});
|
|
8105
8105
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
8106
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
8106
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
8107
8107
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
8108
8108
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
8109
8109
|
const DEFAULT_MODEL_COST = {
|
|
@@ -5232,7 +5232,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
5232
5232
|
grok46: "xai/grok-4.6"
|
|
5233
5233
|
});
|
|
5234
5234
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
5235
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
5235
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
5236
5236
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5237
5237
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5238
5238
|
const DEFAULT_MODEL_COST = {
|
|
@@ -6023,7 +6023,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
6023
6023
|
grok46: "xai/grok-4.6"
|
|
6024
6024
|
});
|
|
6025
6025
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
6026
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
6026
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
6027
6027
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
6028
6028
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
6029
6029
|
const DEFAULT_MODEL_COST = {
|
|
@@ -4992,7 +4992,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
4992
4992
|
grok46: "xai/grok-4.6"
|
|
4993
4993
|
});
|
|
4994
4994
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
4995
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
4995
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
4996
4996
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
4997
4997
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
4998
4998
|
const DEFAULT_MODEL_COST = {
|
|
@@ -4996,7 +4996,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
4996
4996
|
grok46: "xai/grok-4.6"
|
|
4997
4997
|
});
|
|
4998
4998
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
4999
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
4999
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
5000
5000
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5001
5001
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5002
5002
|
const DEFAULT_MODEL_COST = {
|
|
@@ -4996,7 +4996,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
4996
4996
|
grok46: "xai/grok-4.6"
|
|
4997
4997
|
});
|
|
4998
4998
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
4999
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
4999
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
5000
5000
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
5001
5001
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
5002
5002
|
const DEFAULT_MODEL_COST = {
|
|
@@ -4805,7 +4805,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
|
|
|
4805
4805
|
grok46: "xai/grok-4.6"
|
|
4806
4806
|
});
|
|
4807
4807
|
/* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
4808
|
-
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-
|
|
4808
|
+
const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image-preview","image":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","haiku45":"anthropic/claude-haiku-4-5","sol6":"openai-codex/gpt-6-sol","sol56":"openai-codex/gpt-5.6-sol","luna56":"openai-codex/gpt-5.6-luna","grok46":"xai/grok-4.6","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-1","haiku":"anthropic/claude-haiku-5-5","gpt":"openai-codex/gpt-6.1-sol","sol":"openai-codex/gpt-6.1-sol","luna":"openai-codex/gpt-6-luna","astra":"openai-codex/gpt-6-astra","terra":"openai-codex/gpt-5.6-terra","grok":"xai/grok-4.7"};
|
|
4809
4809
|
for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
|
|
4810
4810
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
4811
4811
|
const DEFAULT_MODEL_COST = {
|
package/docs/MODELS.md
CHANGED
|
@@ -17,6 +17,7 @@ versioned alias (`aliases`). `scripts/models-sync.mjs` generates every copy in t
|
|
|
17
17
|
| Anthropic adaptive thinking, effort, thinking-off and temperature rules (`anthropic rules` block) | `providers/anthropic.js` (vendor + installed) |
|
|
18
18
|
| `DEFAULT_MODEL_ALIASES` (the shipped alias table) | 14 bundles (`model-selection-*`, `config-*`, `model-auth-*`, `auth-profiles-*`, `daemon-cli`, `discord`) |
|
|
19
19
|
| `XHIGH_MODEL_REFS` (`/think xhigh` gate) | 12 `thinking-*` copies plus the Telegram and Mattermost bundles |
|
|
20
|
+
| Image aliases (every alias whose target has `imageGeneration: true`: `nano-banana`, `banana`, `nano-banana-pro`, `image`) | `dist/image-generate.js` (the `image_generate` tool's `model` param) |
|
|
20
21
|
|
|
21
22
|
Generated code sits between `/* JOHNNESS_MODELS_MASTER:BEGIN ... */` and `/* JOHNNESS_MODELS_MASTER:END */`
|
|
22
23
|
markers. Never edit inside them. The older hand-written literals stay in place byte for byte
|
|
@@ -44,6 +45,10 @@ markers. Never edit inside them. The older hand-written literals stay in place b
|
|
|
44
45
|
setting them (Claude Haiku 5.5, 2026-10-08, was the first user).
|
|
45
46
|
- `cost` is flat. When a model's official price is tiered (for example by prompt length), use the
|
|
46
47
|
base tier and write the other tier in `harness.notes` and the CHANGELOG.
|
|
48
|
+
- Image models (`imageGeneration: true`, `chat: false`) are reached through `image_generate`. Point a
|
|
49
|
+
plain alias in `aliases` at one (`nano-banana` -> Nano Banana 2.1 since 2026.9.41) and the sync
|
|
50
|
+
copies it into the tool's alias table; when an alias moves, keep the old model on a versioned
|
|
51
|
+
alias (`nano-banana-pro`).
|
|
47
52
|
- Shorthands move by themselves: a `latest` rule points its alias at the highest version in the
|
|
48
53
|
line. If a shorthand moved, add a versioned alias for the model it left (for example `sol6`),
|
|
49
54
|
or the sync refuses to run.
|
package/docs/PATCHES.md
CHANGED
|
@@ -2888,3 +2888,13 @@ John's rule: model updates are one change to one master file. `models/models.jso
|
|
|
2888
2888
|
- **Aliases.** `sol` and `gpt` -> `openai-codex/gpt-6.1-sol`; new `sol6` -> `openai-codex/gpt-6-sol`; `sol56`, `luna`, `luna56`, `astra` unchanged. `gpt-6.1-luna` is not on the API (`model_not_found` on 2026-09-29), so `luna` stays on GPT-6 Luna.
|
|
2889
2889
|
- Verifier 83.1-83.6 check the tree against the master; `tests/models-master.test.mjs` does the same from the master (no per-model strings).
|
|
2890
2890
|
- Roll back with `npm i -g johns-harness@2026.9.37`.
|
|
2891
|
+
|
|
2892
|
+
### Nano Banana 2.1 as `nano-banana` (2026.9.41)
|
|
2893
|
+
|
|
2894
|
+
John's call (2026-10-11): Nano Banana 2.1 is better than Pro, so the shorthand should point at it. Sources checked 2026-10-11: <https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1>, the image generation guide, `/pricing`, `/changelog` (GA 2026-10-06; `gemini-3.1-flash-image` deprecated, migrate to `gemini-nano-banana-2.1`), `/deprecations` and the DeepMind model card <https://deepmind.google/models/model-cards/nano-banana-2-1/> (Overall Preference Elo 1050 thinking / 1015 no thinking vs 935 for Gemini 3 Pro Image; Pro trails on every listed T2I and editing eval). `GET /v1beta/models/gemini-nano-banana-2.1` still reports 65,536 / 65,536 tokens (the model page says 131,072 / 32,768); the card limits stay on the API values from 2026.9.39.
|
|
2895
|
+
|
|
2896
|
+
- **Aliases** (master `aliases`): `nano-banana`, `banana` -> `google/gemini-nano-banana-2.1`; new `nano-banana-pro` -> `google/gemini-3-pro-image-preview`. `image` unchanged.
|
|
2897
|
+
- **image_generate**: `NANO_BANANA_MODEL_ID` is now `gemini-nano-banana-2.1`; `NANO_BANANA_PRO_MODEL_ID`/`NANO_BANANA_PRO_REF` name Pro. The hand-written alias table is followed by a generated `image aliases` block (models-sync target 38) that copies every shipped alias whose target has `imageGeneration: true`. New `imageSize` param (`1K`/`2K`/`4K` on `generationConfig.imageConfig.imageSize`), up to 14 input images when the model is a Google one (4 otherwise), and aspect ratios `1:4`, `4:1`, `1:8`, `8:1`. Default chain unchanged (GPT Image 2, subscription first); Google stays opt-in.
|
|
2898
|
+
- **Checks**: `check-models-master.mjs` loads the tool and compares its aliases with the master; verifier 83.7 (generated block present) and 83.8 (resolution, default chain, imageSize, 14 refs). `tests/nano-banana-catalog.test.mjs` covers the new defaults, Pro routing, imageSize, 14 references, panoramic ratios and master/tool agreement; its alias loader now reads through the generated master block.
|
|
2899
|
+
- **Live (2026-10-11)**, real Gemini API through the repo's `image_generate`: generation (`model: "nano-banana"`, 16:9) HTTP 200, 1376x768 JPEG, 1,120 image tokens + 1,294 thought tokens; edit of that image HTTP 200, composition kept, requested on-screen text legible.
|
|
2900
|
+
- Roll back with `npm i -g johns-harness@2026.9.40`.
|
package/models/models.json
CHANGED
|
@@ -26,8 +26,9 @@
|
|
|
26
26
|
"gemini-flash": "google/gemini-3.8-flash",
|
|
27
27
|
"gemini-flash-lite": "google/gemini-2.5-flash-lite",
|
|
28
28
|
"flash": "google/gemini-3.8-flash",
|
|
29
|
-
"banana": "google/gemini-
|
|
30
|
-
"nano-banana": "google/gemini-
|
|
29
|
+
"banana": "google/gemini-nano-banana-2.1",
|
|
30
|
+
"nano-banana": "google/gemini-nano-banana-2.1",
|
|
31
|
+
"nano-banana-pro": "google/gemini-3-pro-image-preview",
|
|
31
32
|
"image": "openai-codex/gpt-image-2",
|
|
32
33
|
"sonnet5": "anthropic/claude-sonnet-5",
|
|
33
34
|
"opus5": "anthropic/claude-opus-5",
|
|
@@ -258,7 +259,7 @@
|
|
|
258
259
|
"gemini-2.5-pro-preview-05-06": {"name":"Gemini 2.5 Pro Preview 05-06","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1.25,"output":10,"cacheRead":0.31,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
|
|
259
260
|
"gemini-2.5-pro-preview-06-05": {"name":"Gemini 2.5 Pro Preview 06-05","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":1.25,"output":10,"cacheRead":0.31,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
|
|
260
261
|
"gemini-3-pro-image-preview": {"name":"Nano Banana Pro","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":2,"output":120,"cacheRead":0.2,"cacheWrite":0},"contextWindow":32768,"maxTokens":8192},
|
|
261
|
-
"gemini-nano-banana-2.1": {"name":"Nano Banana 2.1","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":1.5,"output":30,"cacheRead":0,"cacheWrite":0},"contextWindow":65536,"maxTokens":65536,"harness":{"source":"generativelanguage.googleapis.com/v1beta/models/gemini-nano-banana-2.1 (inputTokenLimit 65536, outputTokenLimit 65536; models list agrees) and ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1 + /pricing. Official limits conflict: the model
|
|
262
|
+
"gemini-nano-banana-2.1": {"name":"Nano Banana 2.1","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":1.5,"output":30,"cacheRead":0,"cacheWrite":0},"contextWindow":65536,"maxTokens":65536,"harness":{"source":"generativelanguage.googleapis.com/v1beta/models/gemini-nano-banana-2.1 (inputTokenLimit 65536, outputTokenLimit 65536; models list agrees, rechecked 2026-10-11) and ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1 + /pricing + /changelog (GA 2026-10-06; gemini-3.1-flash-image deprecated in its favor) + deepmind.google/models/model-cards/nano-banana-2-1 (Overall Preference Elo 1050 thinking vs Nano Banana Pro 935). Official limits conflict: the model page says 131,072 input / 32,768 output; the harness uses the API endpoint values.","checked":"2026-10-11","notes":"GA 2026-10-06. Image generation and conversational image editing, the update to Nano Banana 2 (gemini-3.1-flash-image). Image-only like Nano Banana Pro (function calling and structured outputs unsupported); the nano-banana/banana aliases since 2026.9.41 (image_generate model nano-banana), Pro stays on nano-banana-pro. Up to 14 reference images; aspect ratios add 1:4, 4:1, 1:8, 8:1. $1.50/MTok input, $30/MTok image output ($7.50 text/thinking output), about $0.034 per 1K image; caching unsupported. Thinking minimal/medium(default)/high; 1K/2K/4K output."}},
|
|
262
263
|
"gemini-3.8-flash": {"name":"Gemini 3.8 Flash","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.75,"output":3.75,"cacheRead":0.075,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
|
|
263
264
|
"gemini-3-flash-preview": {"name":"Gemini 3 Flash Preview","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.5,"output":3,"cacheRead":0.05,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
|
|
264
265
|
"gemini-3-pro-preview": {"name":"Gemini 3 Pro Preview","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":0},"contextWindow":1000000,"maxTokens":64000},
|
package/package.json
CHANGED
|
@@ -45,9 +45,18 @@ for (const rel of sync.XHIGH12) {
|
|
|
45
45
|
const line = src.slice(at).split("\n")[1];
|
|
46
46
|
if (JSON.stringify(new Function(`const XHIGH_MODEL_REFS = []; ${line} return XHIGH_MODEL_REFS;`)()) !== refs) problems.push(`${rel}: XHIGH_MODEL_REFS differ from models/models.json`);
|
|
47
47
|
}
|
|
48
|
+
// image_generate's `model` param resolves the same image aliases /model does (2026.9.41).
|
|
49
|
+
const imageTool = path.join(root, sync.IMAGE_TOOL);
|
|
50
|
+
if (!fs.existsSync(imageTool)) problems.push(`missing ${sync.IMAGE_TOOL}`);
|
|
51
|
+
else {
|
|
52
|
+
const { IMAGE_MODEL_ALIASES } = await import(pathToFileURL(imageTool).href);
|
|
53
|
+
for (const [alias, ref] of Object.entries(sync.imageAliasesOf(master))) {
|
|
54
|
+
if (IMAGE_MODEL_ALIASES?.[alias] !== ref) problems.push(`${sync.IMAGE_TOOL}: image alias ${alias} is ${IMAGE_MODEL_ALIASES?.[alias] ?? "(missing)"}, master says ${ref}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
48
57
|
if (problems.length) {
|
|
49
58
|
for (const line of problems.slice(0, 20)) console.error(`FAIL ${line}`);
|
|
50
59
|
console.error(`models master check: ${problems.length} problem(s)`);
|
|
51
60
|
process.exit(1);
|
|
52
61
|
}
|
|
53
|
-
console.log(`models master check: ${models / 2} models x 2 catalogs, ${sync.ALIAS14.length} alias copies, ${sync.XHIGH12.length} xhigh copies match models/models.json`);
|
|
62
|
+
console.log(`models master check: ${models / 2} models x 2 catalogs, ${sync.ALIAS14.length} alias copies, ${sync.XHIGH12.length} xhigh copies and the image_generate aliases match models/models.json`);
|
package/scripts/models-sync.mjs
CHANGED
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
// every other model keeps the historical adapter gates.
|
|
21
21
|
// - 14 DEFAULT_MODEL_ALIASES copies: one generated Object.assign block (the full shipped table).
|
|
22
22
|
// - 12 XHIGH_MODEL_REFS copies: the command-level /think xhigh gate, rebuilt from the master.
|
|
23
|
+
// - dist/image-generate.js: every shipped alias that names an image generation model (banana,
|
|
24
|
+
// nano-banana, nano-banana-pro, image) also resolves in the image_generate `model` param
|
|
25
|
+
// (since 2026.9.41, when nano-banana moved to Nano Banana 2.1).
|
|
23
26
|
// Older hand-written literals stay byte-for-byte in place (older exact-replay families hash them);
|
|
24
27
|
// the generated blocks run last and win. Never hand-edit a generated block: edit the master, run
|
|
25
28
|
// `node scripts/models-sync.mjs`, then `node scripts/models-sync.mjs --check`.
|
|
@@ -51,6 +54,7 @@ export const ALIAS14 = [
|
|
|
51
54
|
"dist/plugin-sdk/model-auth-DVyo6JSX.js", "dist/plugin-sdk/model-auth-kiHYHGrs.js",
|
|
52
55
|
"dist/plugin-sdk/model-selection-Dbj4jDYM.js",
|
|
53
56
|
];
|
|
57
|
+
export const IMAGE_TOOL = "dist/image-generate.js";
|
|
54
58
|
export const XHIGH12 = [
|
|
55
59
|
"dist/thinking-B5B36ffe.js", "dist/thinking-BYwvlJ3S.js", "dist/thinking-CAzdgmNV.js", "dist/thinking-DykY2Fzj.js",
|
|
56
60
|
"dist/plugin-sdk/thinking-B-rIrY_n.js", "dist/plugin-sdk/thinking-CopbP_Cn.js", "dist/plugin-sdk/thinking-WQ4Zq8Nl.js",
|
|
@@ -223,6 +227,16 @@ export function anthropicRulesOf(master) {
|
|
|
223
227
|
}
|
|
224
228
|
return rules;
|
|
225
229
|
}
|
|
230
|
+
// Shipped aliases whose target is an image generation model: the image_generate tool's `model`
|
|
231
|
+
// param accepts them too, so `/model nano-banana` and `image_generate model: nano-banana` agree.
|
|
232
|
+
export function imageAliasesOf(master) {
|
|
233
|
+
const out = {};
|
|
234
|
+
for (const [alias, ref] of Object.entries(resolvedAliases(master))) {
|
|
235
|
+
const slash = ref.indexOf("/");
|
|
236
|
+
if (master.providers[ref.slice(0, slash)]?.[ref.slice(slash + 1)]?.imageGeneration === true) out[alias] = ref;
|
|
237
|
+
}
|
|
238
|
+
return out;
|
|
239
|
+
}
|
|
226
240
|
export function xhighRefsOf(master) {
|
|
227
241
|
const refs = [];
|
|
228
242
|
for (const [provider, models] of Object.entries(master.providers)) for (const [id, entry] of Object.entries(models)) if (entry.harness?.xhigh === true) refs.push(`${provider}/${id}`);
|
|
@@ -332,6 +346,9 @@ function aliasBlock(master) {
|
|
|
332
346
|
return HEAD("aliases") + `const JOHNNESS_MASTER_ALIASES = ${JSON.stringify(resolvedAliases(master))};\n`
|
|
333
347
|
+ "for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;\n" + TAIL();
|
|
334
348
|
}
|
|
349
|
+
function imageAliasBlock(master) {
|
|
350
|
+
return HEAD("image aliases") + `for (const [alias, ref] of Object.entries(${JSON.stringify(imageAliasesOf(master))})) IMAGE_MODEL_ALIAS_TABLE[alias] = ref;\n` + TAIL();
|
|
351
|
+
}
|
|
335
352
|
function xhighRefsBlock(master) {
|
|
336
353
|
// Single-quoted on purpose: older verifier checks count the historical double-quoted literals.
|
|
337
354
|
const refs = xhighRefsOf(master);
|
|
@@ -384,6 +401,7 @@ export function targets(master) {
|
|
|
384
401
|
}
|
|
385
402
|
for (const rel of ALIAS14) out.push({ rel, edits: [insertBefore("const DEFAULT_MODEL_COST = {", aliasBlock(master))] });
|
|
386
403
|
for (const rel of XHIGH12) out.push({ rel, edits: [afterArray("const XHIGH_MODEL_REFS = [", xhighRefsBlock(master))] });
|
|
404
|
+
out.push({ rel: IMAGE_TOOL, edits: [insertBefore("export const IMAGE_MODEL_ALIASES = Object.freeze(IMAGE_MODEL_ALIAS_TABLE);\n", imageAliasBlock(master))] });
|
|
387
405
|
return out;
|
|
388
406
|
}
|
|
389
407
|
|