johns-harness 2026.9.41 → 2026.10.12
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 +14 -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 +14 -1
- package/docs/PATCHES.md +14 -0
- package/models/models.json +16 -2
- package/node_modules/@mariozechner/pi-ai/dist/models.generated.js +7 -0
- package/package.json +1 -1
- package/scripts/models-sync.mjs +35 -2
- package/vendor/patched-deps/@mariozechner/pi-ai/dist/models.generated.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.10.12
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
- **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>
|
|
8
|
+
- **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>
|
|
9
|
+
- **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>
|
|
10
|
+
- **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>
|
|
11
|
+
- **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).
|
|
12
|
+
- **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.
|
|
13
|
+
- `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).
|
|
14
|
+
- 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.
|
|
15
|
+
- Roll back with `npm i -g johns-harness@2026.9.41`.
|
|
16
|
+
|
|
3
17
|
## 2026.9.41
|
|
4
18
|
|
|
5
19
|
- `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-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-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-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-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-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-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-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-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-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-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-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-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-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-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 = {
|
package/docs/MODELS.md
CHANGED
|
@@ -17,7 +17,8 @@ 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-
|
|
20
|
+
| Image aliases (every alias whose target has `imageGeneration: true`: `image`, `image2`, `image-flare`, `nano-banana`, `nano-banana-pro`, `nano-banana-lite`, `grok-image`, ...) | `dist/image-generate.js` (the `image_generate` tool's `model` param) |
|
|
21
|
+
| Image wire rules (`harness.image`: transport, qualities, sizes, ratios, max inputs, prompt length, mask) and the default chain (`imageGenerationDefault`) | `dist/image-generate.js` (`image runtime` block: `IMAGE_MODEL_RULES`, `IMAGE_GENERATION_DEFAULT`) |
|
|
21
22
|
|
|
22
23
|
Generated code sits between `/* JOHNNESS_MODELS_MASTER:BEGIN ... */` and `/* JOHNNESS_MODELS_MASTER:END */`
|
|
23
24
|
markers. Never edit inside them. The older hand-written literals stay in place byte for byte
|
|
@@ -49,6 +50,18 @@ markers. Never edit inside them. The older hand-written literals stay in place b
|
|
|
49
50
|
plain alias in `aliases` at one (`nano-banana` -> Nano Banana 2.1 since 2026.9.41) and the sync
|
|
50
51
|
copies it into the tool's alias table; when an alias moves, keep the old model on a versioned
|
|
51
52
|
alias (`nano-banana-pro`).
|
|
53
|
+
- Image wire rules live on the entry as `harness.image` (since 2026.10.12): `transport`
|
|
54
|
+
(`openai` for openai/openai-codex, `google`, `xai`; must match the serving provider), and optional
|
|
55
|
+
`qualities`, `imageSizes`, `aspectRatios`, `maxImages`, `maxPromptLength` (characters), `mask`,
|
|
56
|
+
`customSizes`. `image_generate` validates every request, and every fallback candidate, against
|
|
57
|
+
them. A provider with no transport in `dist/image-generate.js` cannot be registered: build the
|
|
58
|
+
transport there first (xAI got its native JSON branch in 2026.10.12).
|
|
59
|
+
- `imageGenerationDefault` is the default `image_generate` chain. Keep it subscription only
|
|
60
|
+
(`openai-codex/...`): John's API keys are billed, so a paid model is reached only when named.
|
|
61
|
+
- Image-only cards whose token limits are not published use `contextWindow`/`maxTokens: null`
|
|
62
|
+
(N/A), with the reason in `harness.notes` and the source in `harness.source`; the validator
|
|
63
|
+
refuses null on anything else. The generated catalog omits the keys (shipped code reads them
|
|
64
|
+
as optional numbers). Never invent a token window from a character or pixel limit.
|
|
52
65
|
- Shorthands move by themselves: a `latest` rule points its alias at the highest version in the
|
|
53
66
|
line. If a shorthand moved, add a versioned alias for the model it left (for example `sol6`),
|
|
54
67
|
or the sync refuses to run.
|
package/docs/PATCHES.md
CHANGED
|
@@ -2898,3 +2898,17 @@ John's call (2026-10-11): Nano Banana 2.1 is better than Pro, so the shorthand s
|
|
|
2898
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
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
2900
|
- Roll back with `npm i -g johns-harness@2026.9.40`.
|
|
2901
|
+
|
|
2902
|
+
## 84 - image models from the master (2026-10-12, 2026.10.12)
|
|
2903
|
+
|
|
2904
|
+
The 2026-10-12 detection (`/tmp/detect-20261012/REPORT.md`) found five callable image models missing from the master. All five are integrated through `models/models.json` + `models-sync.mjs` only; `dist/image-generate.js` (the family 62/63 custom entrypoint, copied whole by both patchers) carries the transport. Sources checked 2026-10-12.
|
|
2905
|
+
|
|
2906
|
+
- **GPT Image 2.5 Sunburst / Flare** (`gpt-image-2.5-sunburst`, `gpt-image-2.5-flare`, released 2026-09-08) on `openai` and `openai-codex`. <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>. Shared rate card: text input $5, cached text $1.25, image input $8, cached image $2, image output $30 per MTok (Batch image output $15). Token limits and cutoff unpublished (null/N/A). Quality low/medium/high/xhigh/max/auto; custom sizes (multiples of 16, ratio 1:3..3:1, edge <= 3840, 655,360..8,294,400 px). Codex subscription: live 200 for Sunburst xhigh and Flare max with every non-subscription endpoint and the API-key provider blocked.
|
|
2907
|
+
- **xAI Grok Imagine Image 2.0** (`xai/grok-imagine-image-2.0`, api `xai-images`). <https://docs.x.ai/developers/models/grok-imagine-image-2.0>, `/model-capabilities/images/generation`, `/editing`, `/multi-image-editing`, `/rest-api-reference/inference/images`. Per image: $0.01 per input image; output 1K low $0.04, 2K low $0.06, 1K medium $0.06, 2K medium $0.08 (card also lists 1.5K). New native transport: `https://api.x.ai/v1/images/{generations,edits}`, JSON body only (`response_format: b64_json`, `quality`, lowercase `resolution`, `aspect_ratio`, `image` / `images` data URIs typed by magic bytes); masks rejected; 64,000 character prompt limit kept as `maxPromptLength`, not a token window. Live: generation 200 and edit 200 (the first edit 400 "Invalid base64-encoded image" was a JPEG labeled PNG; fixed by sniffing).
|
|
2908
|
+
- **Nano Banana Pro GA** (`google/gemini-3-pro-image`, GA 2026-05-28) and **Nano Banana 2 Lite** (`google/gemini-3.1-flash-lite-image`, GA 2026-06-30). Pro: $2 in, $12 text/thinking out, $120 image out per MTok ($0.134 per 1K/2K, $0.24 per 4K); API-native 131,072/32,768 over the page's 65,536/32,768. Lite: $0.25 in, $1.50 text out, $30 image out ($0.0336 per 1K), 1K only; API 65,536/65,536 over the page's 65,536/4,096. Both live 200.
|
|
2909
|
+
- **Aliases**: `image`, `image-sunburst` -> `openai-codex/gpt-image-2.5-sunburst`; `image-flare` -> `openai-codex/gpt-image-2.5-flare`; `image2` -> `openai-codex/gpt-image-2`; `nano-banana-pro` -> GA; `nano-banana-pro-preview` -> preview; `nano-banana-lite`; `grok-image`. `nano-banana`/`banana` unchanged (2.1). No chat alias or default changed.
|
|
2910
|
+
- **Default chain**: master `imageGenerationDefault` = Sunburst then GPT Image 2, both `openai-codex`. The old implicit `openai/gpt-image-2` paid fallback is gone; explicit config keeps working.
|
|
2911
|
+
- **Master layer**: `harness.image` per-model rules and `imageGenerationDefault` generate the `image runtime` block (target 38 now has two blocks); validator rules for transport/provider match, rule shapes, default chain and documented-null limits; catalog omits null limits.
|
|
2912
|
+
- **Tool**: per-model quality/size/ratio/mask/input/prompt validation (the default primary's rules when no model is given); each fallback candidate re-validated and skipped with `params:` if it cannot honour the request; unknown providers fail closed instead of going to api.openai.com; response MIME from magic bytes.
|
|
2913
|
+
- **Checks**: verifier 62.19/63.10/83.8 now assert the master-driven chain, 84.1-84.4 new; `tests/image-models-84.test.mjs` (21 tests).
|
|
2914
|
+
- Roll back with `npm i -g johns-harness@2026.9.41`.
|
package/models/models.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "Master model file for John's Harness (family 83). Every shipped catalog entry, wire rule and alias lives here; scripts/models-sync.mjs generates every copy in the tree from it. See docs/MODELS.md.",
|
|
3
3
|
"fields": "providers.<provider>.<id>: the pi-ai catalog card (name, api, baseUrl, reasoning, input, cost per MTok, contextWindow = the window the harness uses, maxTokens). harness.xhigh: /think xhigh and wire xhigh allowed. harness.efforts: reasoning efforts the API accepts (others map to the nearest accepted). harness.temperature: drop | drop-unless-effort-none. Anthropic (anthropic-messages) only: harness.thinking adaptive (adaptive thinking + output_config.effort instead of budget_tokens), harness.thinkingOff disabled (thinking.type disabled when /think is off), harness.efforts low..max, harness.temperature drop (also top_p/top_k). harness.nativeContextWindow/source/checked/notes: documentation only. cost is flat; tiered official prices keep the base tier here and the rest in harness.notes.",
|
|
4
|
+
"imageGenerationDefault": {"primary":"openai-codex/gpt-image-2.5-sunburst","fallbacks":["openai-codex/gpt-image-2"]},
|
|
4
5
|
"latest": {
|
|
5
6
|
"opus": {"provider":"anthropic","match":"^claude-opus-(\\d+)(?:-(\\d{1,2}))?$"},
|
|
6
7
|
"sonnet": {"provider":"anthropic","match":"^claude-sonnet-(\\d+)(?:-(\\d{1,2}))?$"},
|
|
@@ -28,8 +29,14 @@
|
|
|
28
29
|
"flash": "google/gemini-3.8-flash",
|
|
29
30
|
"banana": "google/gemini-nano-banana-2.1",
|
|
30
31
|
"nano-banana": "google/gemini-nano-banana-2.1",
|
|
31
|
-
"nano-banana-pro": "google/gemini-3-pro-image
|
|
32
|
-
"
|
|
32
|
+
"nano-banana-pro": "google/gemini-3-pro-image",
|
|
33
|
+
"nano-banana-pro-preview": "google/gemini-3-pro-image-preview",
|
|
34
|
+
"nano-banana-lite": "google/gemini-3.1-flash-lite-image",
|
|
35
|
+
"grok-image": "xai/grok-imagine-image-2.0",
|
|
36
|
+
"image": "openai-codex/gpt-image-2.5-sunburst",
|
|
37
|
+
"image-sunburst": "openai-codex/gpt-image-2.5-sunburst",
|
|
38
|
+
"image-flare": "openai-codex/gpt-image-2.5-flare",
|
|
39
|
+
"image2": "openai-codex/gpt-image-2",
|
|
33
40
|
"sonnet5": "anthropic/claude-sonnet-5",
|
|
34
41
|
"opus5": "anthropic/claude-opus-5",
|
|
35
42
|
"haiku45": "anthropic/claude-haiku-4-5",
|
|
@@ -259,6 +266,8 @@
|
|
|
259
266
|
"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},
|
|
260
267
|
"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},
|
|
261
268
|
"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},
|
|
269
|
+
"gemini-3-pro-image": {"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,"cacheWrite":0},"contextWindow":131072,"maxTokens":32768,"harness":{"source":"https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image ; https://ai.google.dev/gemini-api/docs/pricing#gemini-3-pro-image ; authenticated model GET 200 (131072/32768).","checked":"2026-10-12","notes":"GA 2026-05-28. API-native limits 131072/32768 chosen over model page 65536/32768. Cutoff Jan2025. Tools/function calling/structured output unsupported; image tool only, not chat. Input $2/MTok text/image (560 input tokens/image); output text/thinking $12/MTok vs image $120/MTok ($0.1344 per1K/2K; $0.24 per4K) plus inputs/thinking. Batch 50% off, priority $3.60/$21.60 text/$216 image. Cache unsupported; numeric cache zeros mean N/A. No 200K tier reachable under native131K. Up to14 references; 1K/2K/4K.","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}}},
|
|
270
|
+
"gemini-3.1-flash-lite-image": {"name":"Nano Banana 2 Lite","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":0.25,"output":30,"cacheRead":0,"cacheWrite":0},"contextWindow":65536,"maxTokens":65536,"harness":{"source":"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 ; authenticated model GET 200 (65536/65536).","checked":"2026-10-12","notes":"GA 2026-06-30. API-native limits65536/65536 chosen over model page65536/4096. Cutoff Jan2025. Sibling efficiency model, NOT successor to Nano Banana2.1; banana aliases unchanged. Only1K images, up to14 references, text/image input. Input $0.25/MTok; text/thinking output $1.50/MTok, image output $30/MTok ($0.0336 per1120-token1K) plus inputs/thinking. Batch $0.125/$0.75/$15 (50% off; image $0.0168). Paid tier only. Cache unsupported; cache zeros N/A. Function calling/structured outputs unsupported; image tool only, not chat.","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}}},
|
|
262
271
|
"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."}},
|
|
263
272
|
"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},
|
|
264
273
|
"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},
|
|
@@ -416,6 +425,8 @@
|
|
|
416
425
|
"gpt-6-sol": {"name":"GPT-6 Sol","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
417
426
|
"gpt-6-luna": {"name":"GPT-6 Luna","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":0.1,"output":0.5,"cacheRead":0.01,"cacheWrite":0.125},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
418
427
|
"gpt-image-2": {"name":"GPT Image 2","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":40,"cacheRead":1.25,"cacheWrite":0},"contextWindow":32000,"maxTokens":4096},
|
|
428
|
+
"gpt-image-2.5-sunburst": {"name":"GPT Image 2.5 Sunburst","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":30,"cacheRead":1.25,"cacheWrite":0},"contextWindow":null,"maxTokens":null,"harness":{"source":"https://developers.openai.com/api/docs/models/gpt-image-2.5-sunburst ; https://developers.openai.com/api/docs/guides/image-generation ; Models API GET 200; Codex image generations LIVE 200 with xhigh quality (no API fallback).","checked":"2026-10-12","notes":"Released 2026-09-08. Dedicated images generations/edits only, not chat; context/output token ceilings and knowledge cutoff not published (null = N/A). Official rates shared by both 2.5 models: 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. cost.input/cacheRead = text rates, cost.output = image output; image-input rates live here. No cache-write price published. Metadata and wire mocks checked; paid API inference intentionally NOT run. Quality low/medium/high/xhigh/max/auto; custom sizes multiples of 16, 1:3..3:1, edges <=3840, pixels 655360..8294400; >2560x1440 experimental. Per-image price varies with dimensions/quality; see official card. Transport preserves old multipart edits and mask.","image":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true}}},
|
|
429
|
+
"gpt-image-2.5-flare": {"name":"GPT Image 2.5 Flare","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":30,"cacheRead":1.25,"cacheWrite":0},"contextWindow":null,"maxTokens":null,"harness":{"source":"https://developers.openai.com/api/docs/models/gpt-image-2.5-flare ; https://developers.openai.com/api/docs/guides/image-generation ; Models API GET 200; Codex image generations LIVE 200 with max quality (no API fallback).","checked":"2026-10-12","notes":"Released 2026-09-08. Dedicated images generations/edits only, not chat; context/output token ceilings and knowledge cutoff not published (null = N/A). Official rates shared by both 2.5 models: 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. cost.input/cacheRead = text rates, cost.output = image output; image-input rates live here. No cache-write price published. Same per-token price as Sunburst; token use per image differs by model/quality. Metadata and wire mocks checked; paid API inference intentionally NOT run. Quality low/medium/high/xhigh/max/auto; custom sizes multiples of 16, 1:3..3:1, edges <=3840, pixels 655360..8294400; >2560x1440 experimental. Per-image price varies with dimensions/quality; see official card. Transport preserves old multipart edits and mask.","image":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true}}},
|
|
419
430
|
"gpt-5.6-sol": {"name":"GPT-5.6 Sol","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":4,"output":20,"cacheRead":0.4,"cacheWrite":5},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
420
431
|
"gpt-5.6-terra": {"name":"GPT-5.6 Terra","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
421
432
|
"gpt-5.6-luna": {"name":"GPT-5.6 Luna","api":"openai-responses","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":0.2,"output":1.2,"cacheRead":0.02,"cacheWrite":0.25},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
@@ -441,6 +452,8 @@
|
|
|
441
452
|
"gpt-6-sol": {"name":"GPT-6 Sol (Codex)","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
442
453
|
"gpt-6-luna": {"name":"GPT-6 Luna (Codex)","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
443
454
|
"gpt-image-2": {"name":"GPT Image 2 (Codex)","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":32000,"maxTokens":4096},
|
|
455
|
+
"gpt-image-2.5-sunburst": {"name":"GPT Image 2.5 Sunburst (Codex)","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":null,"maxTokens":null,"harness":{"source":"https://developers.openai.com/api/docs/models/gpt-image-2.5-sunburst ; https://developers.openai.com/api/docs/guides/image-generation ; Models API GET 200; Codex image generations LIVE 200 with xhigh quality (no API fallback).","checked":"2026-10-12","notes":"Released 2026-09-08. Dedicated images generations/edits only, not chat; context/output token ceilings and knowledge cutoff not published (null = N/A). ChatGPT/Codex subscription usage, no per-token API bill. Quality low/medium/high/xhigh/max/auto; custom sizes multiples of 16, 1:3..3:1, edges <=3840, pixels 655360..8294400; >2560x1440 experimental. Per-image price varies with dimensions/quality; see official card. Transport preserves old multipart edits and mask.","image":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true}}},
|
|
456
|
+
"gpt-image-2.5-flare": {"name":"GPT Image 2.5 Flare (Codex)","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":null,"maxTokens":null,"harness":{"source":"https://developers.openai.com/api/docs/models/gpt-image-2.5-flare ; https://developers.openai.com/api/docs/guides/image-generation ; Models API GET 200; Codex image generations LIVE 200 with max quality (no API fallback).","checked":"2026-10-12","notes":"Released 2026-09-08. Dedicated images generations/edits only, not chat; context/output token ceilings and knowledge cutoff not published (null = N/A). ChatGPT/Codex subscription usage, no per-token API bill. Quality low/medium/high/xhigh/max/auto; custom sizes multiples of 16, 1:3..3:1, edges <=3840, pixels 655360..8294400; >2560x1440 experimental. Per-image price varies with dimensions/quality; see official card. Transport preserves old multipart edits and mask.","image":{"transport":"openai","qualities":["low","medium","high","xhigh","max","auto"],"customSizes":true,"maxImages":4,"mask":true}}},
|
|
444
457
|
"gpt-6-astra": {"name":"GPT-6 Astra","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop","nativeContextWindow":1050000}},
|
|
445
458
|
"gpt-5.5": {"name":"GPT-5.5 (Codex)","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
446
459
|
"gpt-5.6-sol": {"name":"GPT-5.6 Sol (Codex)","api":"openai-codex-responses","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000,"harness":{"xhigh":true,"temperature":"drop-unless-effort-none","nativeContextWindow":1050000}},
|
|
@@ -853,6 +866,7 @@
|
|
|
853
866
|
"zai/glm-5": {"name":"GLM-5","api":"anthropic-messages","baseUrl":"https://ai-gateway.vercel.sh","reasoning":true,"input":["text"],"cost":{"input":1,"output":3.1999999999999997,"cacheRead":0.19999999999999998,"cacheWrite":0},"contextWindow":202800,"maxTokens":131072}
|
|
854
867
|
},
|
|
855
868
|
"xai": {
|
|
869
|
+
"grok-imagine-image-2.0": {"name":"Grok Imagine Image 2.0","api":"xai-images","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":null,"maxTokens":null,"harness":{"source":"https://docs.x.ai/developers/models/grok-imagine-image-2.0 ; https://docs.x.ai/developers/model-capabilities/images/generation ; /images/editing ; /rest-api-reference/inference/images ; authenticated /v1/image-generation-models GET 200.","checked":"2026-10-12","notes":"Native image JSON transport (not OpenAI multipart). Input text/image; image-only output; no chat/token context/token output/cutoff published (null=N/A). Per-image billing, numeric token costs0 are NOT free: $0.01/input image;1K low $0.04,1.5K low $0.05,2K low $0.06;1K medium $0.06,1.5K medium $0.07,2K medium $0.08. Auto generation=low; auto edit=medium, billed served quality. Card lists1.5K pricing but generation guide documents1k/2k only: harness exposes1K/2K. Batch API supported (card lists batch pricing N/A); no cache/priority image tier. Up to5 sources (url/data URI); response_format b64_json; masks unsupported. Team metadata max_prompt_length64000 characters,6RPS.","image":{"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}}},
|
|
856
870
|
"grok-2": {"name":"Grok 2","api":"openai-completions","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
|
857
871
|
"grok-2-1212": {"name":"Grok 2 (1212)","api":"openai-completions","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
|
858
872
|
"grok-2-latest": {"name":"Grok 2 Latest","api":"openai-completions","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
|
@@ -13860,6 +13860,8 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
13860
13860
|
"gemini-2.5-pro-preview-05-06":{"id":"gemini-2.5-pro-preview-05-06","name":"Gemini 2.5 Pro Preview 05-06","api":"google-generative-ai","provider":"google","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},
|
|
13861
13861
|
"gemini-2.5-pro-preview-06-05":{"id":"gemini-2.5-pro-preview-06-05","name":"Gemini 2.5 Pro Preview 06-05","api":"google-generative-ai","provider":"google","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},
|
|
13862
13862
|
"gemini-3-pro-image-preview":{"id":"gemini-3-pro-image-preview","name":"Nano Banana Pro","api":"google-generative-ai","provider":"google","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},
|
|
13863
|
+
"gemini-3-pro-image":{"id":"gemini-3-pro-image","name":"Nano Banana Pro","api":"google-generative-ai","provider":"google","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,"cacheWrite":0},"contextWindow":131072,"maxTokens":32768},
|
|
13864
|
+
"gemini-3.1-flash-lite-image":{"id":"gemini-3.1-flash-lite-image","name":"Nano Banana 2 Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0.25,"output":30,"cacheRead":0,"cacheWrite":0},"contextWindow":65536,"maxTokens":65536},
|
|
13863
13865
|
"gemini-nano-banana-2.1":{"id":"gemini-nano-banana-2.1","name":"Nano Banana 2.1","api":"google-generative-ai","provider":"google","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},
|
|
13864
13866
|
"gemini-3.8-flash":{"id":"gemini-3.8-flash","name":"Gemini 3.8 Flash","api":"google-generative-ai","provider":"google","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},
|
|
13865
13867
|
"gemini-3-flash-preview":{"id":"gemini-3-flash-preview","name":"Gemini 3 Flash Preview","api":"google-generative-ai","provider":"google","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},
|
|
@@ -14017,6 +14019,8 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
14017
14019
|
"gpt-6-sol":{"id":"gpt-6-sol","name":"GPT-6 Sol","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":272000,"maxTokens":128000},
|
|
14018
14020
|
"gpt-6-luna":{"id":"gpt-6-luna","name":"GPT-6 Luna","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":0.1,"output":0.5,"cacheRead":0.01,"cacheWrite":0.125},"contextWindow":272000,"maxTokens":128000},
|
|
14019
14021
|
"gpt-image-2":{"id":"gpt-image-2","name":"GPT Image 2","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":40,"cacheRead":1.25,"cacheWrite":0},"contextWindow":32000,"maxTokens":4096},
|
|
14022
|
+
"gpt-image-2.5-sunburst":{"id":"gpt-image-2.5-sunburst","name":"GPT Image 2.5 Sunburst","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":30,"cacheRead":1.25,"cacheWrite":0}},
|
|
14023
|
+
"gpt-image-2.5-flare":{"id":"gpt-image-2.5-flare","name":"GPT Image 2.5 Flare","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":30,"cacheRead":1.25,"cacheWrite":0}},
|
|
14020
14024
|
"gpt-5.6-sol":{"id":"gpt-5.6-sol","name":"GPT-5.6 Sol","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":4,"output":20,"cacheRead":0.4,"cacheWrite":5},"contextWindow":272000,"maxTokens":128000},
|
|
14021
14025
|
"gpt-5.6-terra":{"id":"gpt-5.6-terra","name":"GPT-5.6 Terra","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":272000,"maxTokens":128000},
|
|
14022
14026
|
"gpt-5.6-luna":{"id":"gpt-5.6-luna","name":"GPT-5.6 Luna","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":0.2,"output":1.2,"cacheRead":0.02,"cacheWrite":0.25},"contextWindow":272000,"maxTokens":128000},
|
|
@@ -14042,6 +14046,8 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
14042
14046
|
"gpt-6-sol":{"id":"gpt-6-sol","name":"GPT-6 Sol (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14043
14047
|
"gpt-6-luna":{"id":"gpt-6-luna","name":"GPT-6 Luna (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14044
14048
|
"gpt-image-2":{"id":"gpt-image-2","name":"GPT Image 2 (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":32000,"maxTokens":4096},
|
|
14049
|
+
"gpt-image-2.5-sunburst":{"id":"gpt-image-2.5-sunburst","name":"GPT Image 2.5 Sunburst (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}},
|
|
14050
|
+
"gpt-image-2.5-flare":{"id":"gpt-image-2.5-flare","name":"GPT Image 2.5 Flare (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}},
|
|
14045
14051
|
"gpt-6-astra":{"id":"gpt-6-astra","name":"GPT-6 Astra","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14046
14052
|
"gpt-5.5":{"id":"gpt-5.5","name":"GPT-5.5 (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14047
14053
|
"gpt-5.6-sol":{"id":"gpt-5.6-sol","name":"GPT-5.6 Sol (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
@@ -14454,6 +14460,7 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
14454
14460
|
"zai/glm-5":{"id":"zai/glm-5","name":"GLM-5","api":"anthropic-messages","provider":"vercel-ai-gateway","baseUrl":"https://ai-gateway.vercel.sh","reasoning":true,"input":["text"],"cost":{"input":1,"output":3.1999999999999997,"cacheRead":0.19999999999999998,"cacheWrite":0},"contextWindow":202800,"maxTokens":131072},
|
|
14455
14461
|
},
|
|
14456
14462
|
"xai": {
|
|
14463
|
+
"grok-imagine-image-2.0":{"id":"grok-imagine-image-2.0","name":"Grok Imagine Image 2.0","api":"xai-images","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}},
|
|
14457
14464
|
"grok-2":{"id":"grok-2","name":"Grok 2","api":"openai-completions","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
|
14458
14465
|
"grok-2-1212":{"id":"grok-2-1212","name":"Grok 2 (1212)","api":"openai-completions","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
|
14459
14466
|
"grok-2-latest":{"id":"grok-2-latest","name":"Grok 2 Latest","api":"openai-completions","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
package/package.json
CHANGED
package/scripts/models-sync.mjs
CHANGED
|
@@ -79,6 +79,10 @@ export function stripGenerated(text) {
|
|
|
79
79
|
function orderedModel(provider, id, entry) {
|
|
80
80
|
const { harness: _harness, ...card } = entry;
|
|
81
81
|
const { name, api, ...rest } = card;
|
|
82
|
+
// null contextWindow/maxTokens = N/A (unpublished) for image-only cards. Shipped code treats these as
|
|
83
|
+
// optional numbers (pi-coding-agent models.json schema, `<= 0` guards, `?? default`), so the generated
|
|
84
|
+
// catalog omits the key rather than shipping null.
|
|
85
|
+
for (const key of ["contextWindow", "maxTokens"]) if (rest[key] === null) delete rest[key];
|
|
82
86
|
return { id, name, api, provider, ...rest };
|
|
83
87
|
}
|
|
84
88
|
|
|
@@ -94,13 +98,26 @@ export function validateMaster(master) {
|
|
|
94
98
|
if (typeof entry.baseUrl !== "string") problems.push(`${ref}: baseUrl must be a string (upstream Azure entries use "")`);
|
|
95
99
|
if (typeof entry.reasoning !== "boolean") problems.push(`${ref}: reasoning must be true/false`);
|
|
96
100
|
if (!Array.isArray(entry.input) || entry.input.length === 0) problems.push(`${ref}: input modalities missing`);
|
|
97
|
-
|
|
101
|
+
// null = not published (N/A). Only image-only cards may say so, and their notes must say why.
|
|
102
|
+
for (const key of ["contextWindow", "maxTokens"]) {
|
|
103
|
+
if (entry[key] === null && entry.imageGeneration === true && entry.chat === false) {
|
|
104
|
+
if (!/N\/A/.test(entry.harness?.notes ?? "") || typeof entry.harness?.source !== "string") problems.push(`${ref}: ${key} null needs harness.source and harness.notes stating the limit is N/A (unpublished)`);
|
|
105
|
+
} else if (!Number.isInteger(entry[key]) || entry[key] <= 0) problems.push(`${ref}: ${key} must be a positive integer (or null/N/A for image-only models)`);
|
|
106
|
+
}
|
|
98
107
|
const cost = entry.cost;
|
|
99
108
|
// Upstream pi-ai marks router-priced entries (openrouter/auto) with a negative sentinel cost.
|
|
100
109
|
if (!cost || ["input", "output", "cacheRead", "cacheWrite"].some((k) => typeof cost[k] !== "number" || !Number.isFinite(cost[k]))) problems.push(`${ref}: cost needs numeric input/output/cacheRead/cacheWrite`);
|
|
101
110
|
if ("id" in entry || "provider" in entry) problems.push(`${ref}: id/provider come from the keys; remove them from the entry`);
|
|
102
111
|
const h = entry.harness;
|
|
103
112
|
if (h !== undefined) {
|
|
113
|
+
if (h?.image !== undefined) {
|
|
114
|
+
const r = h.image;
|
|
115
|
+
if (entry.imageGeneration !== true || entry.chat !== false || !r || !["openai", "google", "xai"].includes(r.transport)) problems.push(`${ref}: harness.image needs an image-only card and a supported transport`);
|
|
116
|
+
if ((r?.transport === "google" && provider !== "google") || (r?.transport === "xai" && provider !== "xai") || (r?.transport === "openai" && !["openai", "openai-codex"].includes(provider))) problems.push(`${ref}: image transport does not match serving provider`);
|
|
117
|
+
for (const key of ["qualities", "imageSizes", "aspectRatios"]) if (r?.[key] !== undefined && (!Array.isArray(r[key]) || !r[key].length || r[key].some(v => typeof v !== "string" || !v))) problems.push(`${ref}: harness.image.${key} needs a nonempty string array`);
|
|
118
|
+
for (const key of ["maxImages", "maxPromptLength"]) if (r?.[key] !== undefined && (!Number.isInteger(r[key]) || r[key] <= 0)) problems.push(`${ref}: harness.image.${key} needs a positive integer`);
|
|
119
|
+
for (const key of ["mask", "customSizes"]) if (r?.[key] !== undefined && typeof r[key] !== "boolean") problems.push(`${ref}: harness.image.${key} must be boolean`);
|
|
120
|
+
}
|
|
104
121
|
if (typeof h !== "object" || h === null) { problems.push(`${ref}: harness must be an object`); continue; }
|
|
105
122
|
if (h.xhigh !== undefined && typeof h.xhigh !== "boolean") problems.push(`${ref}: harness.xhigh must be true/false`);
|
|
106
123
|
if (h.efforts !== undefined && (!Array.isArray(h.efforts) || h.efforts.length === 0 || h.efforts.some((e) => !EFFORTS.includes(e)))) problems.push(`${ref}: harness.efforts must list ${EFFORTS.join("|")}`);
|
|
@@ -137,6 +154,14 @@ export function validateMaster(master) {
|
|
|
137
154
|
for (const [alias, rule] of Object.entries(master.latest ?? {})) {
|
|
138
155
|
try { resolveLatest(master, alias, rule); } catch (error) { problems.push(error.message); }
|
|
139
156
|
}
|
|
157
|
+
const d = master.imageGenerationDefault;
|
|
158
|
+
if (d !== undefined) {
|
|
159
|
+
if (!d || typeof d.primary !== "string" || !Array.isArray(d.fallbacks)) problems.push("imageGenerationDefault needs primary and fallbacks");
|
|
160
|
+
else for (const ref of [d.primary, ...d.fallbacks]) {
|
|
161
|
+
const slash = typeof ref === "string" ? ref.indexOf("/") : -1;
|
|
162
|
+
if (slash < 1 || master.providers[ref.slice(0, slash)]?.[ref.slice(slash + 1)]?.imageGeneration !== true) problems.push(`imageGenerationDefault ${ref} is not an image model`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
140
165
|
for (const ref of master.xhighExtraRefs ?? []) if (refs.has(ref)) problems.push(`xhighExtraRefs ${ref} is in the catalog; set harness.xhigh on the entry instead`);
|
|
141
166
|
return problems;
|
|
142
167
|
}
|
|
@@ -237,6 +262,14 @@ export function imageAliasesOf(master) {
|
|
|
237
262
|
}
|
|
238
263
|
return out;
|
|
239
264
|
}
|
|
265
|
+
export function imageRulesOf(master) {
|
|
266
|
+
const out = {};
|
|
267
|
+
for (const [provider, entries] of Object.entries(master.providers)) for (const [id, entry] of Object.entries(entries)) if (entry.harness?.image) out[`${provider}/${id}`] = entry.harness.image;
|
|
268
|
+
return out;
|
|
269
|
+
}
|
|
270
|
+
function imageRuntimeBlock(master) {
|
|
271
|
+
return HEAD("image runtime") + `export const IMAGE_MODEL_RULES = Object.freeze(${JSON.stringify(imageRulesOf(master))});\nexport const IMAGE_GENERATION_DEFAULT = Object.freeze(${JSON.stringify(master.imageGenerationDefault)});\n` + TAIL();
|
|
272
|
+
}
|
|
240
273
|
export function xhighRefsOf(master) {
|
|
241
274
|
const refs = [];
|
|
242
275
|
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}`);
|
|
@@ -401,7 +434,7 @@ export function targets(master) {
|
|
|
401
434
|
}
|
|
402
435
|
for (const rel of ALIAS14) out.push({ rel, edits: [insertBefore("const DEFAULT_MODEL_COST = {", aliasBlock(master))] });
|
|
403
436
|
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))] });
|
|
437
|
+
out.push({ rel: IMAGE_TOOL, edits: [insertBefore("export const IMAGE_MODEL_ALIASES = Object.freeze(IMAGE_MODEL_ALIAS_TABLE);\n", imageAliasBlock(master)), insertBefore("export const DEFAULT_IMAGE_GENERATION_MODEL = Object.freeze({\n", imageRuntimeBlock(master))] });
|
|
405
438
|
return out;
|
|
406
439
|
}
|
|
407
440
|
|
|
@@ -13860,6 +13860,8 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
13860
13860
|
"gemini-2.5-pro-preview-05-06":{"id":"gemini-2.5-pro-preview-05-06","name":"Gemini 2.5 Pro Preview 05-06","api":"google-generative-ai","provider":"google","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},
|
|
13861
13861
|
"gemini-2.5-pro-preview-06-05":{"id":"gemini-2.5-pro-preview-06-05","name":"Gemini 2.5 Pro Preview 06-05","api":"google-generative-ai","provider":"google","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},
|
|
13862
13862
|
"gemini-3-pro-image-preview":{"id":"gemini-3-pro-image-preview","name":"Nano Banana Pro","api":"google-generative-ai","provider":"google","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},
|
|
13863
|
+
"gemini-3-pro-image":{"id":"gemini-3-pro-image","name":"Nano Banana Pro","api":"google-generative-ai","provider":"google","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,"cacheWrite":0},"contextWindow":131072,"maxTokens":32768},
|
|
13864
|
+
"gemini-3.1-flash-lite-image":{"id":"gemini-3.1-flash-lite-image","name":"Nano Banana 2 Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0.25,"output":30,"cacheRead":0,"cacheWrite":0},"contextWindow":65536,"maxTokens":65536},
|
|
13863
13865
|
"gemini-nano-banana-2.1":{"id":"gemini-nano-banana-2.1","name":"Nano Banana 2.1","api":"google-generative-ai","provider":"google","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},
|
|
13864
13866
|
"gemini-3.8-flash":{"id":"gemini-3.8-flash","name":"Gemini 3.8 Flash","api":"google-generative-ai","provider":"google","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},
|
|
13865
13867
|
"gemini-3-flash-preview":{"id":"gemini-3-flash-preview","name":"Gemini 3 Flash Preview","api":"google-generative-ai","provider":"google","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},
|
|
@@ -14017,6 +14019,8 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
14017
14019
|
"gpt-6-sol":{"id":"gpt-6-sol","name":"GPT-6 Sol","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":272000,"maxTokens":128000},
|
|
14018
14020
|
"gpt-6-luna":{"id":"gpt-6-luna","name":"GPT-6 Luna","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":0.1,"output":0.5,"cacheRead":0.01,"cacheWrite":0.125},"contextWindow":272000,"maxTokens":128000},
|
|
14019
14021
|
"gpt-image-2":{"id":"gpt-image-2","name":"GPT Image 2","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":40,"cacheRead":1.25,"cacheWrite":0},"contextWindow":32000,"maxTokens":4096},
|
|
14022
|
+
"gpt-image-2.5-sunburst":{"id":"gpt-image-2.5-sunburst","name":"GPT Image 2.5 Sunburst","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":30,"cacheRead":1.25,"cacheWrite":0}},
|
|
14023
|
+
"gpt-image-2.5-flare":{"id":"gpt-image-2.5-flare","name":"GPT Image 2.5 Flare","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":5,"output":30,"cacheRead":1.25,"cacheWrite":0}},
|
|
14020
14024
|
"gpt-5.6-sol":{"id":"gpt-5.6-sol","name":"GPT-5.6 Sol","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":4,"output":20,"cacheRead":0.4,"cacheWrite":5},"contextWindow":272000,"maxTokens":128000},
|
|
14021
14025
|
"gpt-5.6-terra":{"id":"gpt-5.6-terra","name":"GPT-5.6 Terra","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":12,"cacheRead":0.2,"cacheWrite":2.5},"contextWindow":272000,"maxTokens":128000},
|
|
14022
14026
|
"gpt-5.6-luna":{"id":"gpt-5.6-luna","name":"GPT-5.6 Luna","api":"openai-responses","provider":"openai","baseUrl":"https://api.openai.com/v1","reasoning":true,"input":["text","image"],"cost":{"input":0.2,"output":1.2,"cacheRead":0.02,"cacheWrite":0.25},"contextWindow":272000,"maxTokens":128000},
|
|
@@ -14042,6 +14046,8 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
14042
14046
|
"gpt-6-sol":{"id":"gpt-6-sol","name":"GPT-6 Sol (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14043
14047
|
"gpt-6-luna":{"id":"gpt-6-luna","name":"GPT-6 Luna (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14044
14048
|
"gpt-image-2":{"id":"gpt-image-2","name":"GPT Image 2 (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":32000,"maxTokens":4096},
|
|
14049
|
+
"gpt-image-2.5-sunburst":{"id":"gpt-image-2.5-sunburst","name":"GPT Image 2.5 Sunburst (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}},
|
|
14050
|
+
"gpt-image-2.5-flare":{"id":"gpt-image-2.5-flare","name":"GPT Image 2.5 Flare (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}},
|
|
14045
14051
|
"gpt-6-astra":{"id":"gpt-6-astra","name":"GPT-6 Astra","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14046
14052
|
"gpt-5.5":{"id":"gpt-5.5","name":"GPT-5.5 (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
14047
14053
|
"gpt-5.6-sol":{"id":"gpt-5.6-sol","name":"GPT-5.6 Sol (Codex)","api":"openai-codex-responses","provider":"openai-codex","baseUrl":"https://chatgpt.com/backend-api","reasoning":true,"input":["text","image"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":272000,"maxTokens":128000},
|
|
@@ -14454,6 +14460,7 @@ const JOHNNESS_MODELS_MASTER = {
|
|
|
14454
14460
|
"zai/glm-5":{"id":"zai/glm-5","name":"GLM-5","api":"anthropic-messages","provider":"vercel-ai-gateway","baseUrl":"https://ai-gateway.vercel.sh","reasoning":true,"input":["text"],"cost":{"input":1,"output":3.1999999999999997,"cacheRead":0.19999999999999998,"cacheWrite":0},"contextWindow":202800,"maxTokens":131072},
|
|
14455
14461
|
},
|
|
14456
14462
|
"xai": {
|
|
14463
|
+
"grok-imagine-image-2.0":{"id":"grok-imagine-image-2.0","name":"Grok Imagine Image 2.0","api":"xai-images","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text","image"],"output":["image"],"imageGeneration":true,"imageEditing":true,"chat":false,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0}},
|
|
14457
14464
|
"grok-2":{"id":"grok-2","name":"Grok 2","api":"openai-completions","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
|
14458
14465
|
"grok-2-1212":{"id":"grok-2-1212","name":"Grok 2 (1212)","api":"openai-completions","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|
|
14459
14466
|
"grok-2-latest":{"id":"grok-2-latest","name":"Grok 2 Latest","api":"openai-completions","provider":"xai","baseUrl":"https://api.x.ai/v1","reasoning":false,"input":["text"],"cost":{"input":2,"output":10,"cacheRead":2,"cacheWrite":0},"contextWindow":131072,"maxTokens":8192},
|