johns-harness 2026.9.41 → 2026.10.14
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 +25 -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 +78 -28
- 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 +27 -1
- package/docs/PATCHES.md +14 -0
- package/models/models.json +23 -4
- package/node_modules/@mariozechner/pi-ai/dist/models.generated.js +9 -1
- package/node_modules/@mariozechner/pi-ai/dist/providers/google.js +45 -0
- package/package.json +1 -1
- package/scripts/models-sync.mjs +109 -3
- package/vendor/patched-deps/@mariozechner/pi-ai/dist/models.generated.js +9 -1
- package/vendor/patched-deps/@mariozechner/pi-ai/dist/providers/google.js +45 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.10.14
|
|
4
|
+
|
|
5
|
+
- **New stable chat model:** `google/gemini-4-argon` (GA October 13, cutoff March 2026). Text/image input in the harness and text output; the native API also accepts audio/video/PDF. A unified **1,048,576-token** window includes input, thinking and output; output uses only the remaining space. Function calling is verified through the real adapter.
|
|
6
|
+
- **Correct ordinary streaming transport:** **65,536 max output tokens** per stream, including thoughts. Google's native model GET reports 32,768 for direct non-streaming REST; the official GenerateContent long-decode guide distinguishes that from 64K streaming/SDK calls. The pinned SDK lacks automatic continuation. This release rejects requests above the single-stream cap and does **not** claim 1M long decode, background execution or the Interactions API.
|
|
7
|
+
- **Master-driven Google wire rules:** `harness.thinking: "level"`, `thinkingDefault`, accepted `efforts`, sampling and cache rules generate into the real Google adapter. Low/medium/high map to `thinkingConfig.thinkingLevel`; minimal/none map low, xhigh/max map high (no native xhigh). Default and `/think off` preserve medium because Argon cannot disable thinking. No legacy `thinkingBudget`; ignored temperature/top_p/top_k are omitted. Explicit cachedContent is refused; implicit caching starts at 4,096 prompt tokens with a 95% cache-hit discount. All older models retain their historical adapter behavior.
|
|
8
|
+
- **Aliases:** `gemini` → `google/gemini-4-argon`; new `gemini31` preserves `google/gemini-3.1-pro-preview`. No other alias, model ID, image default, auth setting, Sonnet 1M choice or Opus cap changes.
|
|
9
|
+
- **Pricing (USD/MTok, input/output including thoughts/cache read):** Standard introductory **$2/$10/$0.10 through November 30, 2026**, then **$4/$20/$0.20 starting December 1**. Batch and Flex $1/$5/$0.05 → $2/$10/$0.10; Priority $3.60/$18/$0.18 → $7.20/$36/$0.36. Paid only, no Free tier/Google AI Pro access or long-context premium. Catalog cost estimates use introductory Standard rates, not tiered inference/grounding charges; update the entry at expiry. Implicit caching only, no explicit storage price. Grounding Search/Maps each offer 5,000 shared monthly free requests across Gemini 3+ then $14/1,000 queries; the ordinary adapter does not expose those native tools.
|
|
10
|
+
- **Live proof:** two HTTP 200 `streamGenerateContent` turns through the actual harness adapter: medium-default function call with thought signature, then low-effort signed tool-result replay and `ARGON_OK` completion. Both accepted maxOutputTokens 65,536 and omitted sampling parameters. Regression tests exercise actual SDK HTTP/SSE and historical models.
|
|
11
|
+
- Official sources checked October 14: [release](https://ai.google.dev/gemini-api/docs/changelog#10-13-2026), [model](https://ai.google.dev/gemini-api/docs/models/gemini-4-argon), [migration](https://ai.google.dev/gemini-api/docs/latest-model), [GenerateContent thinking](https://ai.google.dev/gemini-api/docs/generate-content/thinking), [GenerateContent long decode](https://ai.google.dev/gemini-api/docs/generate-content/long-decode), [pricing](https://ai.google.dev/gemini-api/docs/pricing#gemini-4-argon), [model card](https://deepmind.google/models/model-cards/gemini-4-argon/).
|
|
12
|
+
- **Rollback:** `npm i -g johns-harness@2026.10.12` (previous confirmed registry release).
|
|
13
|
+
|
|
14
|
+
## 2026.10.12
|
|
15
|
+
|
|
16
|
+
Five image models that were already callable but missing from the catalog (sources checked 2026-10-12). All are image-only (`chat: false`) and reached through `image_generate`; no chat model, chat alias or chat default changed.
|
|
17
|
+
|
|
18
|
+
- **GPT Image 2.5 Sunburst** (`gpt-image-2.5-sunburst`) and **GPT Image 2.5 Flare** (`gpt-image-2.5-flare`), released 2026-09-08, on `openai-codex` (ChatGPT subscription, $0) and `openai` (API key). Shared official rate card: text input $5, cached text $1.25, image input $8, cached image $2, image output $30 per MTok (Batch image output $15); text output not billed; per-image cost depends on size and quality. Token limits and knowledge cutoff are not published (card limits N/A). Quality adds `xhigh` and `max`; custom sizes such as `1536x864` (multiples of 16, ratio 1:3 to 3:1, longest edge 3840, 655,360 to 8,294,400 pixels; above 2560x1440 experimental). <https://developers.openai.com/api/docs/models/gpt-image-2.5-sunburst>, <https://developers.openai.com/api/docs/models/gpt-image-2.5-flare>, <https://developers.openai.com/api/docs/guides/image-generation>
|
|
19
|
+
- **xAI Grok Imagine Image 2.0** (`xai/grok-imagine-image-2.0`) with a new native xAI transport: JSON generation and editing on `api.x.ai/v1/images/*` (not OpenAI multipart), up to 5 source images, quality `low`/`medium`/`auto`, resolution `1K`/`2K`, xAI's aspect ratios, no masks, 64,000 character prompt limit. Billed per image: $0.01 per input image; output 1K low $0.04, 2K low $0.06, 1K medium $0.06, 2K medium $0.08 (auto = low for generation, medium for edits). <https://docs.x.ai/developers/models/grok-imagine-image-2.0>, <https://docs.x.ai/developers/model-capabilities/images/generation>, <https://docs.x.ai/developers/model-capabilities/images/editing>, <https://docs.x.ai/developers/rest-api-reference/inference/images>
|
|
20
|
+
- **Nano Banana Pro GA** (`google/gemini-3-pro-image`, GA 2026-05-28): $2/MTok input, $12 text/thinking and $120 image output ($0.134 per 1K/2K image, $0.24 per 4K), 1K/2K/4K, 131,072/32,768 tokens (API value; the model page says 65,536/32,768). <https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image>, <https://ai.google.dev/gemini-api/docs/pricing#gemini-3-pro-image>
|
|
21
|
+
- **Nano Banana 2 Lite** (`google/gemini-3.1-flash-lite-image`, GA 2026-06-30): $0.25/MTok input, $1.50 text and $30 image output ($0.0336 per 1K image), 1K only, 65,536/65,536 tokens (API value; the page says 65,536/4,096). A sibling, not a successor: `nano-banana` stays on 2.1. <https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite-image>, <https://ai.google.dev/gemini-api/docs/pricing#gemini-3.1-flash-lite-image>
|
|
22
|
+
- **Aliases**: `image` (and new `image-sunburst`) -> `openai-codex/gpt-image-2.5-sunburst`; `image-flare` -> `openai-codex/gpt-image-2.5-flare`; `image2` keeps `openai-codex/gpt-image-2`; `nano-banana-pro` -> GA `google/gemini-3-pro-image`, the preview stays on `nano-banana-pro-preview`; new `nano-banana-lite` and `grok-image`. `nano-banana`/`banana` unchanged (Nano Banana 2.1).
|
|
23
|
+
- **Default image chain is subscription only**: `openai-codex/gpt-image-2.5-sunburst`, then `openai-codex/gpt-image-2`. The implicit `openai/gpt-image-2` API-key fallback is removed, so a default call never bills an API key; an explicit `model` or `agents.defaults.imageGenerationModel` still reaches any provider.
|
|
24
|
+
- `image_generate` validates quality, size, aspect ratio, resolution, input count, masks and prompt length per model from `models/models.json` (`harness.image`), re-validates each fallback candidate (skipping one that can't honour the request instead of sending it a bad one), refuses unknown providers instead of sending them to api.openai.com, and types images by their bytes (xAI rejects a JPEG labeled PNG).
|
|
25
|
+
- Live (2026-10-12) through the repo's `image_generate`: subscription Sunburst `xhigh` and Flare `max` HTTP 200 with the API-key provider blocked; Nano Banana Pro GA and Lite generation HTTP 200; xAI generation HTTP 200 and edit HTTP 200. No paid OpenAI API call was made.
|
|
26
|
+
- Roll back with `npm i -g johns-harness@2026.9.41`.
|
|
27
|
+
|
|
3
28
|
## 2026.9.41
|
|
4
29
|
|
|
5
30
|
- `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"`.
|
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
|
|
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 go through the `image_generate` tool. The default chain is subscription only: GPT Image 2.5 Sunburst (`openai-codex/gpt-image-2.5-sunburst`, alias `image`) on the ChatGPT subscription, then GPT Image 2 on the subscription (`image2`); API-key image models are never an implicit fallback, only an explicit `model` or `agents.defaults.imageGenerationModel`. Also selectable: GPT Image 2.5 Flare (`image-flare`), Nano Banana 2.1 (`google/gemini-nano-banana-2.1`, `nano-banana`/`banana`, `aspectRatio`, `imageSize` 1K/2K/4K, up to 14 reference images), Nano Banana Pro GA (`google/gemini-3-pro-image`, `nano-banana-pro`; the preview stays on `nano-banana-pro-preview`), Nano Banana 2 Lite (`nano-banana-lite`, 1K only) and xAI Grok Imagine Image 2.0 (`grok-image`, native xAI JSON generation and editing). GPT Image 2.5 adds `quality` `xhigh`/`max` and custom sizes; per-model rules come from `models/models.json`.
|
|
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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// JOHNNESS_PATCH_GPT_IMAGE_62
|
|
3
3
|
// First-class `image_generate` agent tool: OpenAI Images API (generations when no input
|
|
4
4
|
// image, edits when one is given) with the model from `agents.defaults.imageGenerationModel`.
|
|
5
|
-
// Default
|
|
6
|
-
//
|
|
5
|
+
// Default: subscription Sunburst, older subscription fallback. Paid API providers are explicit only.
|
|
6
|
+
// Models, aliases, image-specific wire rules and defaults come from models/models.json.
|
|
7
7
|
// A provider that rejects the request as unsupported (404/405/501, 429 usage limit, or no
|
|
8
8
|
// credentials) yields to the next entry; the result names the provider that served it.
|
|
9
9
|
// Output is written as PNG under <workspace>/media/generated and the path is returned so the
|
|
@@ -13,20 +13,25 @@ import fs from "node:fs/promises";
|
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
import { Type } from "@sinclair/typebox";
|
|
15
15
|
|
|
16
|
+
/* JOHNNESS_MODELS_MASTER:BEGIN image runtime (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
|
|
17
|
+
export const IMAGE_MODEL_RULES = Object.freeze({"google/gemini-3-pro-image":{"transport":"google","imageSizes":["1K","2K","4K"],"aspectRatios":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"maxImages":14,"mask":false},"google/gemini-3.1-flash-lite-image":{"transport":"google","imageSizes":["1K"],"aspectRatios":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"maxImages":14,"mask":false},"openai/gpt-image-2.5-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai/gpt-image-2.5-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai-codex/gpt-image-2.5-sunburst":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"openai-codex/gpt-image-2.5-flare":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true},"xai/grok-imagine-image-2.0":{"transport":"xai","qualities":["low","medium","auto"],"imageSizes":["1K","2K"],"aspectRatios":["auto","1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2","19.5:9","9:19.5","20:9","9:20","21:9","5:2"],"maxImages":5,"maxPromptLength":64000,"mask":false}});
|
|
18
|
+
export const IMAGE_GENERATION_DEFAULT = Object.freeze({"primary":"openai-codex/gpt-image-2.5-sunburst","fallbacks":["openai-codex/gpt-image-2"]});
|
|
19
|
+
/* JOHNNESS_MODELS_MASTER:END */
|
|
16
20
|
export const DEFAULT_IMAGE_GENERATION_MODEL = Object.freeze({
|
|
17
|
-
primary:
|
|
18
|
-
fallbacks: Object.freeze([
|
|
21
|
+
primary: IMAGE_GENERATION_DEFAULT.primary,
|
|
22
|
+
fallbacks: Object.freeze([...IMAGE_GENERATION_DEFAULT.fallbacks]),
|
|
19
23
|
});
|
|
20
24
|
export const IMAGE_GENERATION_MODEL_ID = "gpt-image-2";
|
|
21
25
|
const OPENAI_BASE = "https://api.openai.com/v1";
|
|
26
|
+
export const XAI_BASE = "https://api.x.ai/v1";
|
|
22
27
|
const CODEX_BASE = "https://chatgpt.com/backend-api/codex";
|
|
23
28
|
const SIZES = new Set(["1024x1024", "1536x1024", "1024x1536", "auto"]);
|
|
24
29
|
const DEFAULT_MAX_INPUT_BYTES = 20 * 1024 * 1024;
|
|
25
30
|
const JWT_CLAIM_PATH = "https://api.openai.com/auth";
|
|
26
31
|
|
|
27
32
|
// JOHNNESS_PATCH_NANO_BANANA_63: Gemini image models (Nano Banana) are selectable, not a
|
|
28
|
-
// default. The default chain stays subscription
|
|
29
|
-
//
|
|
33
|
+
// default. The default chain stays subscription-only; Gemini is API-key billed,
|
|
34
|
+
// so it is reached only through the tool's
|
|
30
35
|
// `model` param or agents.defaults.imageGenerationModel.
|
|
31
36
|
// Since 2026.9.41 `nano-banana`/`banana` mean Nano Banana 2.1 (google/gemini-nano-banana-2.1,
|
|
32
37
|
// GA 2026-10-06, ahead of Pro on Google's evals); Nano Banana Pro stays reachable as
|
|
@@ -34,7 +39,7 @@ const JWT_CLAIM_PATH = "https://api.openai.com/auth";
|
|
|
34
39
|
export const GOOGLE_BASE = "https://generativelanguage.googleapis.com/v1beta";
|
|
35
40
|
export const NANO_BANANA_MODEL_ID = "gemini-nano-banana-2.1";
|
|
36
41
|
export const NANO_BANANA_REF = `google/${NANO_BANANA_MODEL_ID}`;
|
|
37
|
-
export const NANO_BANANA_PRO_MODEL_ID = "gemini-3-pro-image
|
|
42
|
+
export const NANO_BANANA_PRO_MODEL_ID = "gemini-3-pro-image";
|
|
38
43
|
export const NANO_BANANA_PRO_REF = `google/${NANO_BANANA_PRO_MODEL_ID}`;
|
|
39
44
|
/** Aspect ratios the Gemini image models accept. 1:4, 4:1, 1:8 and 8:1 are Nano Banana 2.1 only.
|
|
40
45
|
* Ignored by the OpenAI providers, which use `size`. */
|
|
@@ -52,12 +57,13 @@ const IMAGE_MODEL_ALIAS_TABLE = {
|
|
|
52
57
|
banana: NANO_BANANA_REF,
|
|
53
58
|
"nano-banana-pro": NANO_BANANA_PRO_REF,
|
|
54
59
|
"gemini-nano-banana-2.1": NANO_BANANA_REF,
|
|
55
|
-
"gemini-3-pro-image
|
|
60
|
+
"gemini-3-pro-image": NANO_BANANA_PRO_REF,
|
|
61
|
+
"gemini-3-pro-image-preview": "google/gemini-3-pro-image-preview",
|
|
56
62
|
image: "openai-codex/gpt-image-2",
|
|
57
63
|
"gpt-image-2": "openai-codex/gpt-image-2",
|
|
58
64
|
};
|
|
59
65
|
/* 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;
|
|
66
|
+
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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2"})) IMAGE_MODEL_ALIAS_TABLE[alias] = ref;
|
|
61
67
|
/* JOHNNESS_MODELS_MASTER:END */
|
|
62
68
|
export const IMAGE_MODEL_ALIASES = Object.freeze(IMAGE_MODEL_ALIAS_TABLE);
|
|
63
69
|
|
|
@@ -121,7 +127,8 @@ export function buildProviderRequest({ provider, apiKey, edit, userAgent = "john
|
|
|
121
127
|
headers: { Authorization: `Bearer ${apiKey}`, "chatgpt-account-id": accountId, originator: "pi", "User-Agent": userAgent },
|
|
122
128
|
};
|
|
123
129
|
}
|
|
124
|
-
|
|
130
|
+
if (!["openai", "xai"].includes(provider)) throw new Error(`Unsupported image provider ${provider}`);
|
|
131
|
+
return { url: `${provider === "xai" ? XAI_BASE : OPENAI_BASE}/images/${edit ? "edits" : "generations"}`, headers: { Authorization: `Bearer ${apiKey}` } };
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
export class ProviderUnsupported extends Error {
|
|
@@ -178,29 +185,55 @@ export function extensionForMimeType(mimeType) {
|
|
|
178
185
|
return "png";
|
|
179
186
|
}
|
|
180
187
|
|
|
188
|
+
export function imageRulesFor(ref) { return IMAGE_MODEL_RULES[ref] ?? {}; }
|
|
189
|
+
|
|
190
|
+
/** Image MIME type from the magic bytes (PNG, JPEG, WebP, GIF); `fallback` when unrecognised.
|
|
191
|
+
* xAI rejects a data URI whose declared type disagrees with its bytes ("Invalid base64-encoded image"),
|
|
192
|
+
* and xAI/Gemini return JPEG, so neither the request nor the written extension trusts a label alone. */
|
|
193
|
+
export function sniffImageMimeType(buffer, fallback = "image/png") {
|
|
194
|
+
const b = buffer ? Buffer.from(buffer) : Buffer.alloc(0);
|
|
195
|
+
if (b.length >= 8 && b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4e && b[3] === 0x47) return "image/png";
|
|
196
|
+
if (b.length >= 3 && b[0] === 0xff && b[1] === 0xd8 && b[2] === 0xff) return "image/jpeg";
|
|
197
|
+
if (b.length >= 12 && b.toString("ascii", 0, 4) === "RIFF" && b.toString("ascii", 8, 12) === "WEBP") return "image/webp";
|
|
198
|
+
if (b.length >= 6 && b.toString("ascii", 0, 4) === "GIF8") return "image/gif";
|
|
199
|
+
return fallback;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function validCustomSize(size) {
|
|
203
|
+
const match = /^(\d+)x(\d+)$/.exec(size);
|
|
204
|
+
if (!match) return false;
|
|
205
|
+
const [width, height] = match.slice(1).map(Number);
|
|
206
|
+
return width > 0 && height > 0 && width % 16 === 0 && height % 16 === 0 && Math.max(width, height) <= 3840 && Math.max(width, height) / Math.min(width, height) <= 3 && width * height >= 655360 && width * height <= 8294400;
|
|
207
|
+
}
|
|
208
|
+
|
|
181
209
|
export function validateParams(args) {
|
|
182
210
|
const record = args && typeof args === "object" ? args : {};
|
|
183
211
|
const prompt = typeof record.prompt === "string" ? record.prompt.trim() : "";
|
|
184
212
|
if (!prompt) throw new Error("prompt required");
|
|
185
|
-
// JOHNNESS_PATCH_NANO_BANANA_63: aliases resolve to catalog refs; aspectRatio/imageSize are Gemini only.
|
|
186
213
|
const model = typeof record.model === "string" && record.model.trim() ? resolveImageModelRef(record.model) : void 0;
|
|
214
|
+
const rules = imageRulesFor(model ?? DEFAULT_IMAGE_GENERATION_MODEL.primary);
|
|
187
215
|
const inputs = [];
|
|
188
216
|
if (typeof record.image === "string" && record.image.trim()) inputs.push(record.image.trim());
|
|
189
217
|
if (Array.isArray(record.images)) for (const v of record.images) if (typeof v === "string" && v.trim()) inputs.push(v.trim());
|
|
190
|
-
|
|
191
|
-
const maxInputs = model?.startsWith("google/") ? MAX_GOOGLE_INPUT_IMAGES : MAX_INPUT_IMAGES;
|
|
218
|
+
const maxInputs = rules.maxImages ?? (model?.startsWith("google/") ? MAX_GOOGLE_INPUT_IMAGES : MAX_INPUT_IMAGES);
|
|
192
219
|
if (inputs.length > maxInputs) throw new Error(`at most ${maxInputs} input images`);
|
|
193
220
|
const mask = typeof record.mask === "string" && record.mask.trim() ? record.mask.trim() : void 0;
|
|
194
221
|
if (mask && inputs.length === 0) throw new Error("mask requires an input image");
|
|
222
|
+
if (mask && rules.mask === false) throw new Error(`${model} does not support masks`);
|
|
195
223
|
const size = typeof record.size === "string" && record.size.trim() ? record.size.trim() : "auto";
|
|
196
|
-
if (!SIZES.has(size)) throw new Error(`size must be one of ${[...SIZES].join(", ")}`);
|
|
224
|
+
if (!SIZES.has(size) && !(rules.customSizes && validCustomSize(size))) throw new Error(`size must be one of ${[...SIZES].join(", ")}, or a supported custom size for GPT Image 2.5 (multiples of16, edges<=3840, ratio<=3, pixels655360..8294400)`);
|
|
197
225
|
const countRaw = typeof record.count === "number" ? Math.floor(record.count) : 1;
|
|
198
226
|
if (!Number.isFinite(countRaw) || countRaw < 1 || countRaw > 4) throw new Error("count must be 1..4");
|
|
199
|
-
const
|
|
227
|
+
const qualities = rules.qualities ?? ["low", "medium", "high", "auto"];
|
|
228
|
+
if (record.quality !== undefined && !qualities.includes(record.quality)) throw new Error(`quality for ${model ?? DEFAULT_IMAGE_GENERATION_MODEL.primary} must be ${qualities.join("|")}`);
|
|
229
|
+
const quality = typeof record.quality === "string" ? record.quality : void 0;
|
|
200
230
|
const aspectRatio = typeof record.aspectRatio === "string" && record.aspectRatio.trim() ? record.aspectRatio.trim() : void 0;
|
|
201
|
-
|
|
231
|
+
const ratios = rules.aspectRatios ?? ASPECT_RATIOS;
|
|
232
|
+
if (aspectRatio && !ratios.includes(aspectRatio)) throw new Error(`aspectRatio must be one of ${ratios.join(", ")}`);
|
|
202
233
|
const imageSize = typeof record.imageSize === "string" && record.imageSize.trim() ? record.imageSize.trim().toUpperCase() : void 0;
|
|
203
|
-
|
|
234
|
+
const resolutions = rules.imageSizes ?? IMAGE_SIZES;
|
|
235
|
+
if (imageSize && !resolutions.includes(imageSize)) throw new Error(`imageSize must be one of ${resolutions.join(", ")}`);
|
|
236
|
+
if (rules.maxPromptLength && [...prompt].length > rules.maxPromptLength) throw new Error(`prompt exceeds ${rules.maxPromptLength} characters`);
|
|
204
237
|
return { prompt, inputs, mask, size, count: countRaw, quality, aspectRatio, imageSize, output: typeof record.output === "string" ? record.output : void 0, model };
|
|
205
238
|
}
|
|
206
239
|
|
|
@@ -251,7 +284,12 @@ async function callProvider({ candidate, apiKey, params, images, mask, fetchImpl
|
|
|
251
284
|
const edit = images.length > 0;
|
|
252
285
|
const { url, headers } = buildProviderRequest({ provider: candidate.provider, apiKey, edit, userAgent, model: candidate.model });
|
|
253
286
|
let body;
|
|
254
|
-
if (
|
|
287
|
+
if (candidate.provider === "xai") {
|
|
288
|
+
if (mask) throw new Error("xAI image editing does not support masks");
|
|
289
|
+
headers["content-type"] = "application/json";
|
|
290
|
+
const sources = images.map(img => ({ url: `data:${sniffImageMimeType(img.buffer, img.mimeType)};base64,${Buffer.from(img.buffer).toString("base64")}`, type: "image_url" }));
|
|
291
|
+
body = JSON.stringify({ model: candidate.model, prompt: params.prompt, n: params.count, response_format: "b64_json", quality: params.quality ?? "auto", resolution: (params.imageSize ?? "1K").toLowerCase(), ...(params.aspectRatio ? { aspect_ratio: params.aspectRatio } : {}), ...(sources.length === 1 ? { image: sources[0] } : sources.length > 1 ? { images: sources } : {}) });
|
|
292
|
+
} else if (edit) {
|
|
255
293
|
body = new FormData();
|
|
256
294
|
body.set("model", candidate.model);
|
|
257
295
|
body.set("prompt", params.prompt);
|
|
@@ -287,7 +325,7 @@ async function callProvider({ candidate, apiKey, params, images, mask, fetchImpl
|
|
|
287
325
|
}
|
|
288
326
|
}
|
|
289
327
|
if (buffers.length === 0) throw new Error(`${candidate.provider}: response carried no image data`);
|
|
290
|
-
return { buffers, usage: json?.usage ?? null, mode: edit ? "edit" : "generate", mimeType: "image/png" };
|
|
328
|
+
return { buffers, usage: json?.usage ?? null, mode: edit ? "edit" : "generate", mimeType: sniffImageMimeType(buffers[0], typeof data[0]?.mime_type === "string" ? data[0].mime_type : "image/png") };
|
|
291
329
|
}
|
|
292
330
|
|
|
293
331
|
/**
|
|
@@ -307,8 +345,17 @@ export async function generateWithFallback({ cfg, params, images, mask, resolveA
|
|
|
307
345
|
attempts.push({ provider: candidate.provider, skipped: `auth: ${redact(error?.message ?? error)}` });
|
|
308
346
|
continue;
|
|
309
347
|
}
|
|
348
|
+
// Each candidate's master rules (qualities, sizes, ratios, masks, input count) apply to its own
|
|
349
|
+
// request; a fallback that cannot honour the parameters is skipped, never sent a bad request.
|
|
350
|
+
let perCandidate;
|
|
351
|
+
try {
|
|
352
|
+
perCandidate = validateParams({ ...params, model: candidate.ref, images: images.map((_, i) => `input-${i}`), mask: mask ? "mask" : undefined });
|
|
353
|
+
} catch (error) {
|
|
354
|
+
attempts.push({ provider: candidate.provider, skipped: `params: ${redact(error?.message ?? error)}` });
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
310
357
|
try {
|
|
311
|
-
const result = await callProvider({ candidate, apiKey, params, images, mask, fetchImpl, userAgent });
|
|
358
|
+
const result = await callProvider({ candidate, apiKey, params: perCandidate, images, mask, fetchImpl, userAgent });
|
|
312
359
|
return { provider: candidate.provider, model: candidate.model, ...result, attempts };
|
|
313
360
|
} catch (error) {
|
|
314
361
|
if (error instanceof ProviderUnsupported) {
|
|
@@ -336,22 +383,25 @@ export function createImageGenerateTool(options, deps) {
|
|
|
336
383
|
return {
|
|
337
384
|
label: "Image Generate",
|
|
338
385
|
name: "image_generate",
|
|
339
|
-
description: "Generate or edit images with GPT Image 2 (default
|
|
386
|
+
description: "Generate or edit images with GPT Image 2.5 (subscription Sunburst default, GPT Image 2 subscription fallback), xAI Grok Imagine 2.0 (grok-image), Nano Banana 2.1 (nano-banana), Nano Banana Pro (nano-banana-pro) or Lite (nano-banana-lite). Give a prompt; add image (or images, up to 4, up to5 with xAI, or up to14 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.",
|
|
340
387
|
parameters: Type.Object({
|
|
341
388
|
prompt: Type.String({ description: "What to draw or how to change the input image." }),
|
|
342
389
|
image: Type.Optional(Type.String({ description: "Input image path to edit (workspace or allowed local root)." })),
|
|
343
|
-
images: Type.Optional(Type.Array(Type.String(), { description: "Multiple input images to edit together (
|
|
390
|
+
images: Type.Optional(Type.Array(Type.String(), { description: "Multiple input images to edit together (OpenAI4, xAI5, Google14)." })),
|
|
344
391
|
mask: Type.Optional(Type.String({ description: "PNG mask path; transparent areas are edited." })),
|
|
345
|
-
size: Type.Optional(Type.String({ description: "1024x1024, 1536x1024, 1024x1536, or
|
|
392
|
+
size: Type.Optional(Type.String({ description: "1024x1024, 1536x1024, 1024x1536, auto, or GPT Image2.5 custom size: multiples of16, ratio<=3, edges<=3840, pixels655360..8294400." })),
|
|
346
393
|
count: Type.Optional(Type.Number({ description: "Number of images, 1..4 (default 1)." })),
|
|
347
|
-
quality: Type.Optional(Type.String({ description: "low, medium, high,
|
|
394
|
+
quality: Type.Optional(Type.String({ description: "GPT Image2.5: low, medium, high, xhigh, max, auto. Older GPT Image: low/medium/high/auto. xAI: low/medium/auto." })),
|
|
348
395
|
output: Type.Optional(Type.String({ description: "Output path inside the workspace (default media/generated/gpt-image-<timestamp>.png)." })),
|
|
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 (
|
|
350
|
-
aspectRatio: Type.Optional(Type.String({ description: "
|
|
351
|
-
imageSize: Type.Optional(Type.String({ description: "
|
|
396
|
+
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 (GA Pro), nano-banana-pro-preview, nano-banana-lite, grok-image, image/image-sunburst (subscription Sunburst), image-flare, image2 (older subscription)." })),
|
|
397
|
+
aspectRatio: Type.Optional(Type.String({ description: "Google/xAI: 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." })),
|
|
398
|
+
imageSize: Type.Optional(Type.String({ description: "Google/xAI output resolution:1K (default),2K,4K. Lite only1K; xAI1K/2K. Ignored by the GPT Image 2 providers, which use size." })),
|
|
352
399
|
}),
|
|
353
400
|
execute: async (_toolCallId, args) => {
|
|
354
|
-
const
|
|
401
|
+
const explicit = args?.model;
|
|
402
|
+
const selected = explicit ?? listImageGenerationCandidates(options?.config)[0]?.ref;
|
|
403
|
+
const params = validateParams({ ...args, model: selected });
|
|
404
|
+
if (!explicit) params.model = undefined;
|
|
355
405
|
const maxBytes = deps.maxInputBytes ?? DEFAULT_MAX_INPUT_BYTES;
|
|
356
406
|
const load = async (ref) => {
|
|
357
407
|
const raw = ref.startsWith("@") ? ref.slice(1).trim() : ref;
|
|
@@ -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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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-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"};
|
|
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-4-argon","gemini31":"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","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image":"openai-codex/gpt-image-2.5-sunburst","image-sunburst":"openai-codex/gpt-image-2.5-sunburst","image-flare":"openai-codex/gpt-image-2.5-flare","image2":"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 = {
|