johns-harness 2026.11.9 → 2026.11.11

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 CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026.11.11
4
+
5
+ ### Gemini 4 Carbon
6
+ - Register generally available `google/gemini-4-carbon` in the single master catalog. Unified **1,048,576-token context** shared by input, thinking and output; **65,536 maximum output per streaming hop**; **March 2026 knowledge cutoff**. Native inputs include text/image/video/audio/PDF; the harness exposes text/image and text output, not image generation.
7
+ - Reuse the existing master-driven Google native adapter: `generateContentStream`, low/medium/high thinking (medium default, cannot disable), no thinking budgets, ignored sampling omitted, implicit-only caching, tools and opaque thought-signature replay. Native GET's 32,768 output limit is for non-streaming REST; the transport-specific guide documents 65,536 for streaming. No background execution or long-decode continuation is implemented or advertised.
8
+ - Standard introductory USD/MTok through **November 30, 2026**: **$2 input / $10 output (including thinking) / $0.10 cached input**. Published rates from **December 1, 2026**: **$4 / $20 / $0.20**, across the full context window. These are flat catalog snapshots, not automatic date schedules. Notes preserve Batch/Flex **1/5/0.05 -> 2/10/0.10** and Priority **3.60/18/0.18 -> 7.20/36/0.36**; native tool fees remain separate. No sibling price audit or Argon card change.
9
+ - Bare `gemini` now selects Carbon; `gemini4-argon` preserves Argon. All previous IDs, other aliases, saved-session compatibility, Sonnet native 1M, DeepSeek Flash alias and subscription-only image defaults are unchanged.
10
+
11
+ Official sources checked 2026-11-11:
12
+ - https://aistudio.google.com/docs/changelog (GA November 10)
13
+ - https://aistudio.google.com/docs/models/gemini-4-carbon
14
+ - https://aistudio.google.com/docs/whats-new-gemini-4-carbon
15
+ - https://aistudio.google.com/docs/long-decode?generate-content=true
16
+ - https://aistudio.google.com/docs/thinking?generate-content=true
17
+ - https://aistudio.google.com/docs/pricing#gemini-4-carbon
18
+ - https://deepmind.google/models/model-cards/gemini-4-carbon/
19
+
20
+ Validation: sync check **0 stale**; master checker **810 cards, 0 problems**; verifier **591 pass, 0 fail**; full suite **1,386 pass, 0 fail, 5 skip** (1,391 tests). Focused Google/image/alias suite **58/58**. One real call through the repo Google adapter returned HTTP200 and `OK`, accepting the 65,536-token stream ceiling while using only 40 input / 5 output tokens ($0.00013); no long-output generation or continuation is claimed. No paid OpenAI inference.
21
+
22
+ Rollback: `npm i -g johns-harness@2026.11.10`. John owns activation via `/update`; no global install or gateway restart is part of this release.
23
+
24
+ ## 2026.11.10
25
+
26
+ ### Replayed thinking bound to a different conversation (Family 97)
27
+ - Anthropic now binds each signed thinking block to the exact request prefix (system, tools, earlier messages). The harness rewrites that prefix between turns (compaction, memory context, announce runs, model switches), so replayed blocks came back as `400 Invalid signature in thinking block. The block is bound to a different conversation`, which ended the main session on 2026-11-09 on Fable 5.2.
28
+ - Direct api.anthropic.com adaptive-thinking requests, API key and subscription alike, now send the `thinking-binding-controls-2026-08-01` beta and `thinking.block_binding.prefix_mismatch_behavior: "drop_block"`, so the API drops stale blocks (unbilled) instead of failing. Budget-thinking models, thinking-off requests, proxies and Copilot are untouched.
29
+ - Any remaining invalid-signature 400 strips the named block and every later thinking block and retries once, before any stream event, with a logged warning. Endpoints that reject the control are retried once without it and remembered.
30
+ - `JOHNNESS_THINKING_BLOCK_BINDING=off` disables the control; the strip-and-retry stays on.
31
+ - Patcher `scripts/patch-thinking-block-binding-97.py`, verifier checks 97.1 to 97.5, focused tests on both auth paths, historical replay layers updated.
32
+
33
+ Official sources checked 2026-11-09:
34
+ - https://platform.claude.com/docs/en/build-with-claude/preserved-thinking
35
+ - https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting
36
+
37
+ Validation: verifier **591 pass, 0 fail**; full suite **1381 pass, 0 fail, 5 skip** (1386 tests).
38
+
39
+ Rollback: `npm i -g johns-harness@2026.11.9`. John owns activation via `/update`; no global install or gateway restart is part of this release.
40
+
3
41
  ## 2026.11.9
4
42
 
5
43
  ### Claude Fable 5.2
@@ -5162,7 +5162,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
5162
5162
  grok46: "xai/grok-4.6"
5163
5163
  });
5164
5164
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
5165
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5165
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5166
5166
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
5167
5167
  /* JOHNNESS_MODELS_MASTER:END */
5168
5168
  const DEFAULT_MODEL_COST = {
@@ -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-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
1855
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-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 = {
@@ -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-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5007
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-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 = {
@@ -1714,7 +1714,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
1714
1714
  grok46: "xai/grok-4.6"
1715
1715
  });
1716
1716
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
1717
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
1717
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
1718
1718
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
1719
1719
  /* JOHNNESS_MODELS_MASTER:END */
1720
1720
  const DEFAULT_MODEL_COST = {
@@ -1689,7 +1689,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
1689
1689
  grok46: "xai/grok-4.6"
1690
1690
  });
1691
1691
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
1692
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
1692
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
1693
1693
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
1694
1694
  /* JOHNNESS_MODELS_MASTER:END */
1695
1695
  const DEFAULT_MODEL_COST = {
@@ -1620,7 +1620,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
1620
1620
  grok46: "xai/grok-4.6"
1621
1621
  });
1622
1622
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
1623
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
1623
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
1624
1624
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
1625
1625
  /* JOHNNESS_MODELS_MASTER:END */
1626
1626
  const DEFAULT_MODEL_COST = {
@@ -7123,7 +7123,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
7123
7123
  grok46: "xai/grok-4.6"
7124
7124
  });
7125
7125
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
7126
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
7126
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
7127
7127
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
7128
7128
  /* JOHNNESS_MODELS_MASTER:END */
7129
7129
  const DEFAULT_MODEL_COST = {
@@ -8124,7 +8124,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
8124
8124
  grok46: "xai/grok-4.6"
8125
8125
  });
8126
8126
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
8127
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
8127
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
8128
8128
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
8129
8129
  /* JOHNNESS_MODELS_MASTER:END */
8130
8130
  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-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5235
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-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 = {
@@ -6028,7 +6028,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
6028
6028
  grok46: "xai/grok-4.6"
6029
6029
  });
6030
6030
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
6031
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
6031
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
6032
6032
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
6033
6033
  /* JOHNNESS_MODELS_MASTER:END */
6034
6034
  const DEFAULT_MODEL_COST = {
@@ -4997,7 +4997,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
4997
4997
  grok46: "xai/grok-4.6"
4998
4998
  });
4999
4999
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
5000
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5000
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5001
5001
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
5002
5002
  /* JOHNNESS_MODELS_MASTER:END */
5003
5003
  const DEFAULT_MODEL_COST = {
@@ -5001,7 +5001,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
5001
5001
  grok46: "xai/grok-4.6"
5002
5002
  });
5003
5003
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
5004
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5004
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5005
5005
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
5006
5006
  /* JOHNNESS_MODELS_MASTER:END */
5007
5007
  const DEFAULT_MODEL_COST = {
@@ -5001,7 +5001,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
5001
5001
  grok46: "xai/grok-4.6"
5002
5002
  });
5003
5003
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
5004
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5004
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
5005
5005
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
5006
5006
  /* JOHNNESS_MODELS_MASTER:END */
5007
5007
  const DEFAULT_MODEL_COST = {
@@ -4808,7 +4808,7 @@ Object.assign(DEFAULT_MODEL_ALIASES, {
4808
4808
  grok46: "xai/grok-4.6"
4809
4809
  });
4810
4810
  /* JOHNNESS_MODELS_MASTER:BEGIN aliases (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
4811
- const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
4811
+ const JOHNNESS_MASTER_ALIASES = {"deepseek":"deepseek/deepseek-flash","deepseek-pro":"deepseek/deepseek-v4-pro","gemini-lite":"google/gemini-3.5-flash-lite","muse":"meta/muse-spark-1.3","muse-spark":"meta/muse-spark-1.3","opus46":"anthropic/claude-opus-4-6","sonnet46":"anthropic/claude-sonnet-4-6","gpt-mini":"openai/gpt-5-mini","gemini":"google/gemini-4-carbon","gemini4-argon":"google/gemini-4-argon","gemini31":"google/gemini-3.1-pro-preview","gemini-flash":"google/gemini-3.8-flash","gemini-flash-lite":"google/gemini-2.5-flash-lite","flash":"google/gemini-3.8-flash","banana":"google/gemini-nano-banana-2.1","nano-banana":"google/gemini-nano-banana-2.1","nano-banana-pro":"google/gemini-3-pro-image","nano-banana-pro-preview":"google/gemini-3-pro-image-preview","nano-banana-lite":"google/gemini-3.1-flash-lite-image","grok-image":"xai/grok-imagine-image-2.0","image-sunburst25":"openai-codex/gpt-image-2.5-sunburst","image-flare25":"openai-codex/gpt-image-2.5-flare","image2":"openai-codex/gpt-image-2","sonnet5":"anthropic/claude-sonnet-5","opus5":"anthropic/claude-opus-5","fable51":"anthropic/claude-fable-5-1","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","terra56":"openai-codex/gpt-5.6-terra","image":"openai-codex/gpt-image-2.6-sunburst","image-sunburst":"openai-codex/gpt-image-2.6-sunburst","image-flare":"openai-codex/gpt-image-2.6-flare","opus":"anthropic/claude-opus-5-5","sonnet":"anthropic/claude-sonnet-5-5","fable":"anthropic/claude-fable-5-2","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-6.1-terra","grok":"xai/grok-4.7"};
4812
4812
  for (const [alias, ref] of Object.entries(JOHNNESS_MASTER_ALIASES)) DEFAULT_MODEL_ALIASES[alias] = ref;
4813
4813
  /* JOHNNESS_MODELS_MASTER:END */
4814
4814
  const DEFAULT_MODEL_COST = {
package/docs/MODELS.md CHANGED
@@ -59,6 +59,13 @@ markers. Never edit inside them. The older hand-written literals stay in place b
59
59
  automatic continuation, so do not advertise 1M decode. Its introductory Standard rates expire
60
60
  Nov 30, 2026; the Dec 1 and Batch/Flex/Priority rates are documented in `harness.notes`, not
61
61
  incorrectly folded into a single flat charge. New wire rules must have real adapter regressions.
62
+ Gemini 4 Carbon (GA 2026-11-10) reuses these rules unchanged. The official
63
+ [GenerateContent guide](https://aistudio.google.com/docs/long-decode?generate-content=true)
64
+ resolves its identical 32,768 non-streaming / 65,536 streaming distinction. Carbon's Standard
65
+ USD/MTok snapshot is 2 input / 10 output / 0.10 implicit cache read through 2026-11-30, then
66
+ published rates are 4 / 20 / 0.20 from 2026-12-01 across the full window. Costs are flat
67
+ snapshots, not automatic date schedules. Bare `gemini` selects Carbon; `gemini4-argon` keeps
68
+ Argon, and `gemini31` is unchanged.
62
69
  - `cost` is flat. When a model's official price is tiered (for example by prompt length), use the
63
70
  base tier and write the other tier in `harness.notes` and the CHANGELOG.
64
71
  - Image models (`imageGeneration: true`, `chat: false`) are reached through `image_generate`. Point a
package/docs/PATCHES.md CHANGED
@@ -3237,3 +3237,46 @@ Tests add generation override/fallback/API-mock cases. No live probes run inside
3237
3237
  Validation: 586 verifier passes; 1,363 tests pass, five existing skips, zero failures/cancellations.
3238
3238
  Real after-edit proof still reports low, qualityVerified=false, 1254x1254 versus requested
3239
3239
  max/1024x1024. This release must not be sold as a verified max-rendering fix. Rollback: 2026.11.7.
3240
+
3241
+ ## Family 97: replayed thinking bound to a different conversation (2026.11.10)
3242
+
3243
+ Anthropic binds each signed thinking block to the exact prefix it was produced under: the
3244
+ top-level system prompt, the tools list and every earlier message. The harness legitimately
3245
+ rewrites that prefix between turns (compaction, the memory context tail, announce runs, model
3246
+ switches), so a replayed block can come back as a 400: "messages.N.content.M: Invalid
3247
+ `signature` in `thinking` block. The block is bound to a different conversation." On Fable 5.2
3248
+ and Mythos 5.2 that is a hard error for every account; on Fable 5.1, Opus 5.5, Sonnet 5.5 and
3249
+ Haiku 5.5 it is a hard error for accounts created on or after 2026-08-31. It killed the main
3250
+ session four times on 2026-11-09 (16:47 to 16:49 PT) plus one subagent announce run.
3251
+
3252
+ Three generic layers in the pi-ai Anthropic adapter (`JOHNNESS_PATCH_THINKING_BLOCK_BINDING_97`):
3253
+
3254
+ 1. Direct api.anthropic.com requests with adaptive thinking (API key and subscription) send the
3255
+ `thinking-binding-controls-2026-08-01` beta and
3256
+ `thinking.block_binding.prefix_mismatch_behavior: "drop_block"`. The API drops the failing
3257
+ block and every later thinking block and answers; dropped blocks are not billed. The control
3258
+ is only valid with `thinking.type: "adaptive"`, so budget-thinking models, thinking-off
3259
+ requests, proxies and Copilot keep their exact requests.
3260
+ 2. Any request that still gets the invalid-signature 400 (other endpoints, tampered signatures,
3261
+ the control disabled) strips the named block and every later thinking/redacted_thinking
3262
+ block and retries once. The 400 arrives before any stream event, so nothing partial reached
3263
+ the caller; a second 400 surfaces unchanged. The retry logs a warning, as the docs ask.
3264
+ 3. If an endpoint rejects `block_binding` or the beta itself, the request is retried once
3265
+ without them and the endpoint is remembered per provider, baseUrl and model.
3266
+
3267
+ `JOHNNESS_THINKING_BLOCK_BINDING=off` disables layers 1 and 3; the strip-and-retry stays on.
3268
+ The one `client.messages.stream` call site routes through the recovery generator, so no
3269
+ request bypasses it. Family 90's extended-cache beta is preserved on both auth paths.
3270
+
3271
+ Docs: https://platform.claude.com/docs/en/build-with-claude/preserved-thinking (beta header
3272
+ name, allowed values `"error"` and `"drop_block"`, the adaptive-only rule, the retry guidance
3273
+ for libraries and gateways) and
3274
+ https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting, both read
3275
+ 2026-11-09. Claude Code 2.1.292 ships the same beta string.
3276
+
3277
+ Patcher: `scripts/patch-thinking-block-binding-97.py` (exact hunks in
3278
+ `patches/thinking-block-binding-97/changes.json`, `--check`, `--present-only`,
3279
+ `--dependency-only`). Verifier 97.1 to 97.5. Tests: `tests/thinking-block-binding-97.test.mjs`
3280
+ drives the real adapter over scripted SSE/400 responses on both auth paths. Historical replays
3281
+ (families 67, 82, 86 to 95) layer 97 so hash-pinned fixtures still round trip.
3282
+ Rollback: `npm i -g johns-harness@2026.11.9`.
@@ -29,7 +29,8 @@
29
29
  "opus46": "anthropic/claude-opus-4-6",
30
30
  "sonnet46": "anthropic/claude-sonnet-4-6",
31
31
  "gpt-mini": "openai/gpt-5-mini",
32
- "gemini": "google/gemini-4-argon",
32
+ "gemini": "google/gemini-4-carbon",
33
+ "gemini4-argon": "google/gemini-4-argon",
33
34
  "gemini31": "google/gemini-3.1-pro-preview",
34
35
  "gemini-flash": "google/gemini-3.8-flash",
35
36
  "gemini-flash-lite": "google/gemini-2.5-flash-lite",
@@ -258,6 +259,7 @@
258
259
  "grok-code-fast-1": {"name":"Grok Code Fast 1","api":"openai-completions","baseUrl":"https://api.individual.githubcopilot.com","headers":{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},"compat":{"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":128000,"maxTokens":64000}
259
260
  },
260
261
  "google": {
262
+ "gemini-4-carbon": {"name":"Gemini 4 Carbon","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"harness":{"xhigh":false,"thinking":"level","thinkingDefault":"medium","efforts":["low","medium","high"],"temperature":"drop","cache":"implicit-only","nativeContextWindow":1048576,"source":"https://aistudio.google.com/docs/models/gemini-4-carbon ; https://aistudio.google.com/docs/whats-new-gemini-4-carbon ; https://aistudio.google.com/docs/long-decode?generate-content=true ; https://aistudio.google.com/docs/thinking?generate-content=true ; https://aistudio.google.com/docs/pricing#gemini-4-carbon ; https://aistudio.google.com/docs/changelog ; https://deepmind.google/models/model-cards/gemini-4-carbon/","checked":"2026-11-11","notes":"GA2026-11-10; cutoff March2026. Unified1048576 context shared input/thinking/output. Native GET32768 is the non-streaming REST cap; Google GenerateContent long-decode docs specify65536 per streaming hop, so harness generateContentStream max65536. No continuation/background implementation; never advertise1M output. Native inputs text/image/video/audio/PDF, harness text/image. Thinking LOW/MEDIUM/HIGH; default MEDIUM, cannot disable thinking; no thinkingBudget. Sampling temperature/top_p/top_k ignored and omitted; explicit cachedContent unsupported (implicit-only). Standard intro USD/MTok through2026-11-30 input/output/cacheRead2/10/0.10, starting Dec1:4/20/0.20, same rates across full context window. Batch and Flex1/5/0.05 ->2/10/0.10; Priority3.60/18/0.18 ->7.20/36/0.36. Flat standard cost snapshot, not an automatic date schedule. No explicit cache storage/write charge; cacheWrite0 means unsupported, not free explicit storage. Implicit cache minimum4096 tokens; 95% read discount; cache expires after15-20min idle. Tools/function calling, structured output, streaming and thought signatures supported; native tool fees separate, not enabled by this card."}},
261
263
  "gemini-4-argon": {"name":"Gemini 4 Argon","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536,"harness":{"xhigh":false,"thinking":"level","thinkingDefault":"medium","efforts":["low","medium","high"],"temperature":"drop","cache":"implicit-only","nativeContextWindow":1048576,"source":"https://ai.google.dev/gemini-api/docs/changelog#10-13-2026 ; https://ai.google.dev/gemini-api/docs/models/gemini-4-argon ; https://ai.google.dev/gemini-api/docs/latest-model ; https://ai.google.dev/gemini-api/docs/generate-content/thinking ; https://ai.google.dev/gemini-api/docs/generate-content/long-decode ; https://ai.google.dev/gemini-api/docs/pricing#gemini-4-argon ; https://deepmind.google/models/model-cards/gemini-4-argon/","checked":"2026-10-14","notes":"GA Oct13; knowledge cutoff March2026. Unified1048576 window shared by input, thinking and output (not additive); API caps output to remaining context. Native GET32768 is direct non-streaming REST limit; official GenerateContent docs support65536 per stream (harness uses generateContentStream). Current SDK1.x has no automatic continuation: >65536 output rejected locally; no long-decode/background/Interactions support claimed. Thinking low/medium(default)/high; cannot disable thinking (/think off preserves medium). minimal/none map low, xhigh/max map high; no native xhigh. thinkingBudget unsupported; temperature/top_p/top_k ignored by API and omitted. Native inputs text/image/video/audio/PDF, text output; harness exposes text/image only. Function calling and structured outputs supported; native grounding/code execution/computer use are not exposed by this adapter. Implicit caching only, >=4096 prompt tokens,95% cache-hit discount; explicit cachedContents unsupported, cacheWrite0 N/A. Paid-only; not Free tier or Google AI Pro. Standard perMTok through Nov30 2026: input2/output10(including thoughts)/cache0.10; starting Dec1:4/20/0.20. Catalog estimates hold introductory Standard rates; update this entry at expiry. Batch and Flex1/5/0.05 ->2/10/0.10; Priority3.60/18/0.18 ->7.20/36/0.36. No long-context premium. Grounding Search/Maps each5000 free monthly requests shared across Gemini3+ then14USD/1000 queries; not included in flat token estimates."}},
262
264
  "gemini-3.5-flash-lite": {"name":"Gemini 3.5 Flash-Lite","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.3,"output":2.5,"cacheRead":0.03,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
263
265
  "gemini-1.5-flash": {"name":"Gemini 1.5 Flash","api":"google-generative-ai","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"cost":{"input":0.075,"output":0.3,"cacheRead":0.01875,"cacheWrite":0},"contextWindow":1000000,"maxTokens":8192},
@@ -13844,6 +13844,7 @@ const JOHNNESS_MODELS_MASTER = {
13844
13844
  "grok-code-fast-1":{"id":"grok-code-fast-1","name":"Grok Code Fast 1","api":"openai-completions","provider":"github-copilot","baseUrl":"https://api.individual.githubcopilot.com","headers":{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},"compat":{"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":128000,"maxTokens":64000},
13845
13845
  },
13846
13846
  "google": {
13847
+ "gemini-4-carbon":{"id":"gemini-4-carbon","name":"Gemini 4 Carbon","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
13847
13848
  "gemini-4-argon":{"id":"gemini-4-argon","name":"Gemini 4 Argon","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
13848
13849
  "gemini-3.5-flash-lite":{"id":"gemini-3.5-flash-lite","name":"Gemini 3.5 Flash-Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.3,"output":2.5,"cacheRead":0.03,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
13849
13850
  "gemini-1.5-flash":{"id":"gemini-1.5-flash","name":"Gemini 1.5 Flash","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"cost":{"input":0.075,"output":0.3,"cacheRead":0.01875,"cacheWrite":0},"contextWindow":1000000,"maxTokens":8192},
@@ -14508,6 +14509,6 @@ const JOHNNESS_MODELS_MASTER = {
14508
14509
  };
14509
14510
  for (const provider of Object.keys(MODELS)) delete MODELS[provider];
14510
14511
  Object.assign(MODELS, JOHNNESS_MODELS_MASTER);
14511
- export const JOHNNESS_MODEL_RULES = {"deepseek/deepseek-flash":{"xhigh":true},"deepseek/deepseek-v4-pro":{"xhigh":true},"meta/muse-spark-1.3":{"xhigh":true},"meta/muse-spark-1.2":{"xhigh":true},"anthropic/claude-fable-5-2":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-fable-5-1":{"xhigh":true},"anthropic/claude-sonnet-5-5":{"xhigh":true},"anthropic/claude-opus-5-5":{"xhigh":true},"anthropic/claude-haiku-5-5":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-opus-5":{"xhigh":true},"anthropic/claude-sonnet-5":{"xhigh":true},"anthropic/claude-fable-5":{"xhigh":true},"anthropic/claude-opus-4-6":{"xhigh":true},"azure-openai-responses/gpt-5.2":{"xhigh":true},"azure-openai-responses/gpt-5.2-chat-latest":{"xhigh":true},"azure-openai-responses/gpt-5.2-codex":{"xhigh":true},"azure-openai-responses/gpt-5.2-pro":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex-spark":{"xhigh":true},"github-copilot/claude-opus-4.6":{"xhigh":true},"github-copilot/gpt-5.2":{"xhigh":true},"github-copilot/gpt-5.2-codex":{"xhigh":true},"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop"},"openai/gpt-5.2":{"xhigh":true},"openai/gpt-5.2-chat-latest":{"xhigh":true},"openai/gpt-5.2-codex":{"xhigh":true},"openai/gpt-5.2-pro":{"xhigh":true},"openai/gpt-5.3-codex":{"xhigh":true},"openai/gpt-5.3-codex-spark":{"xhigh":true},"openai/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.2":{"xhigh":true},"openai-codex/gpt-5.2-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex-spark":{"xhigh":true},"openai-codex/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"opencode/claude-opus-4-6":{"xhigh":true},"opencode/gpt-5.2":{"xhigh":true},"opencode/gpt-5.2-codex":{"xhigh":true},"opencode/gpt-5.3-codex":{"xhigh":true},"openrouter/openai/gpt-5.2":{"xhigh":true},"openrouter/openai/gpt-5.2-chat":{"xhigh":true},"openrouter/openai/gpt-5.2-codex":{"xhigh":true},"openrouter/openai/gpt-5.2-pro":{"xhigh":true},"openrouter/openai/gpt-5.3-codex":{"xhigh":true},"vercel-ai-gateway/anthropic/claude-opus-4.6":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-chat":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-codex":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-pro":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.3-codex":{"xhigh":true},"xai/grok-4.7":{"xhigh":true},"xai/grok-4.6":{"xhigh":true}};
14512
+ export const JOHNNESS_MODEL_RULES = {"deepseek/deepseek-flash":{"xhigh":true},"deepseek/deepseek-v4-pro":{"xhigh":true},"meta/muse-spark-1.3":{"xhigh":true},"meta/muse-spark-1.2":{"xhigh":true},"anthropic/claude-fable-5-2":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-fable-5-1":{"xhigh":true},"anthropic/claude-sonnet-5-5":{"xhigh":true},"anthropic/claude-opus-5-5":{"xhigh":true},"anthropic/claude-haiku-5-5":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-opus-5":{"xhigh":true},"anthropic/claude-sonnet-5":{"xhigh":true},"anthropic/claude-fable-5":{"xhigh":true},"anthropic/claude-opus-4-6":{"xhigh":true},"azure-openai-responses/gpt-5.2":{"xhigh":true},"azure-openai-responses/gpt-5.2-chat-latest":{"xhigh":true},"azure-openai-responses/gpt-5.2-codex":{"xhigh":true},"azure-openai-responses/gpt-5.2-pro":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex-spark":{"xhigh":true},"github-copilot/claude-opus-4.6":{"xhigh":true},"github-copilot/gpt-5.2":{"xhigh":true},"github-copilot/gpt-5.2-codex":{"xhigh":true},"google/gemini-4-carbon":{"efforts":["low","medium","high"],"temperature":"drop"},"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop"},"openai/gpt-5.2":{"xhigh":true},"openai/gpt-5.2-chat-latest":{"xhigh":true},"openai/gpt-5.2-codex":{"xhigh":true},"openai/gpt-5.2-pro":{"xhigh":true},"openai/gpt-5.3-codex":{"xhigh":true},"openai/gpt-5.3-codex-spark":{"xhigh":true},"openai/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.2":{"xhigh":true},"openai-codex/gpt-5.2-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex-spark":{"xhigh":true},"openai-codex/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"opencode/claude-opus-4-6":{"xhigh":true},"opencode/gpt-5.2":{"xhigh":true},"opencode/gpt-5.2-codex":{"xhigh":true},"opencode/gpt-5.3-codex":{"xhigh":true},"openrouter/openai/gpt-5.2":{"xhigh":true},"openrouter/openai/gpt-5.2-chat":{"xhigh":true},"openrouter/openai/gpt-5.2-codex":{"xhigh":true},"openrouter/openai/gpt-5.2-pro":{"xhigh":true},"openrouter/openai/gpt-5.3-codex":{"xhigh":true},"vercel-ai-gateway/anthropic/claude-opus-4.6":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-chat":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-codex":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-pro":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.3-codex":{"xhigh":true},"xai/grok-4.7":{"xhigh":true},"xai/grok-4.6":{"xhigh":true}};
14512
14513
  /* JOHNNESS_MODELS_MASTER:END */
14513
14514
  //# sourceMappingURL=models.generated.js.map
@@ -39,6 +39,122 @@ buildParams = function johnnessMasterAnthropicBuildParams(model, context, isOAut
39
39
  return params;
40
40
  };
41
41
  /* JOHNNESS_MODELS_MASTER:END */
42
+ /* JOHNNESS_PATCH_THINKING_BLOCK_BINDING_97 (family 97): Anthropic binds each replayed signed thinking
43
+ * block to the exact prefix it was produced under (top-level system, tools, every earlier message).
44
+ * The harness legitimately rewrites that prefix (compaction, memory context, announce runs, model
45
+ * switches), so a replayed block can come back as a 400: "messages.i.content.j: Invalid `signature`
46
+ * in `thinking` block. The block is bound to a different conversation." Three layers, all generic:
47
+ * 1. Direct Claude API requests (API key and subscription) send the thinking-binding-controls beta and
48
+ * thinking.block_binding.prefix_mismatch_behavior "drop_block" whenever thinking is adaptive (the
49
+ * only thinking type that accepts block_binding), so the API drops stale blocks instead of failing.
50
+ * 2. Any request that still gets that 400 (other thinking modes, proxies, corrupted signatures) strips
51
+ * the named block and every later thinking/redacted_thinking block, then retries once. The 400 is
52
+ * returned before any stream event, so nothing partial ever reached the caller.
53
+ * 3. If an endpoint rejects the control itself, it is remembered per provider+baseUrl+model, the request
54
+ * is retried once without it, and later requests to that endpoint omit it.
55
+ * Docs: https://platform.claude.com/docs/en/build-with-claude/preserved-thinking and
56
+ * https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting (checked 2026-11-09).
57
+ * JOHNNESS_THINKING_BLOCK_BINDING=off disables layers 1 and 3; the strip retry always stays on. */
58
+ const JOHNNESS_THINKING_BINDING_BETA = "thinking-binding-controls-2026-08-01";
59
+ const JOHNNESS_THINKING_SIGNATURE_ERROR = /messages\.(\d+)\.content\.(\d+): Invalid `signature` in `thinking` block/;
60
+ const johnnessThinkingBindingRejected = new Set();
61
+ function johnnessThinkingBindingKey(model) {
62
+ return `${model?.provider}|${model?.baseUrl}|${model?.id}`;
63
+ }
64
+ function johnnessThinkingBindingEligible(model) {
65
+ if (typeof process !== "undefined" && /^(off|0|false|no)$/i.test(String(process.env.JOHNNESS_THINKING_BLOCK_BINDING ?? "").trim())) return false;
66
+ return model?.provider !== "github-copilot" && String(model?.baseUrl ?? "").includes("api.anthropic.com") &&
67
+ !johnnessThinkingBindingRejected.has(johnnessThinkingBindingKey(model));
68
+ }
69
+ const johnnessHistoricalThinkingBindingHeaders = withAnthropicCacheBeta;
70
+ withAnthropicCacheBeta = function johnnessThinkingBindingHeaders(headers, model, cacheRetention) {
71
+ const merged = { ...johnnessHistoricalThinkingBindingHeaders(headers, model, cacheRetention) };
72
+ // Only models that can think adaptively can carry block_binding; others keep their exact headers.
73
+ if (!model?.reasoning || !supportsAdaptiveThinking(model.id) || !johnnessThinkingBindingEligible(model)) return merged;
74
+ const keys = Object.keys(merged).filter((key) => key.toLowerCase() === "anthropic-beta");
75
+ const betas = keys.flatMap((key) => String(merged[key] ?? "").split(",").map((value) => value.trim()).filter(Boolean));
76
+ for (const key of keys) delete merged[key];
77
+ merged["anthropic-beta"] = [...new Set([...betas, JOHNNESS_THINKING_BINDING_BETA])].join(",");
78
+ return merged;
79
+ };
80
+ const johnnessHistoricalThinkingBindingBuildParams = buildParams;
81
+ buildParams = function johnnessThinkingBindingBuildParams(model, context, isOAuthToken, options) {
82
+ const params = johnnessHistoricalThinkingBindingBuildParams(model, context, isOAuthToken, options);
83
+ if (params.thinking?.type === "adaptive" && !params.thinking.block_binding && johnnessThinkingBindingEligible(model)) {
84
+ params.thinking = { ...params.thinking, block_binding: { prefix_mismatch_behavior: "drop_block" } };
85
+ }
86
+ return params;
87
+ };
88
+ function johnnessThinkingBindingErrorText(error) {
89
+ return [error?.message, error?.error?.error?.message, error?.error?.message]
90
+ .filter((value) => typeof value === "string").join("\n");
91
+ }
92
+ function johnnessStripReplayedThinking(params, messageIndex, blockIndex) {
93
+ let stripped = 0;
94
+ const messages = [];
95
+ params.messages.forEach((message, i) => {
96
+ if (i < messageIndex || !Array.isArray(message?.content)) {
97
+ messages.push(message);
98
+ return;
99
+ }
100
+ const content = message.content.filter((block, j) => {
101
+ const drop = (block?.type === "thinking" || block?.type === "redacted_thinking") && (i > messageIndex || j >= blockIndex);
102
+ if (drop) stripped++;
103
+ return !drop;
104
+ });
105
+ if (content.length > 0) messages.push(content.length === message.content.length ? message : { ...message, content });
106
+ });
107
+ return stripped > 0 ? { params: { ...params, messages }, stripped } : undefined;
108
+ }
109
+ function johnnessThinkingBindingRecovery(params, error, model, state) {
110
+ if (error?.status !== undefined && error.status !== 400) return undefined;
111
+ const text = johnnessThinkingBindingErrorText(error);
112
+ const match = text.match(JOHNNESS_THINKING_SIGNATURE_ERROR);
113
+ if (match) {
114
+ if (state.stripped) return undefined;
115
+ state.stripped = true;
116
+ const next = johnnessStripReplayedThinking(params, Number(match[1]), Number(match[2])) ?? johnnessStripReplayedThinking(params, 0, 0);
117
+ if (!next) return undefined;
118
+ console.warn(`[johnness] anthropic ${model?.id}: replayed thinking bound to a different conversation at messages.${match[1]}.content.${match[2]}; stripped ${next.stripped} thinking block(s) and retrying once (family 97)`);
119
+ return { params: next.params };
120
+ }
121
+ const rejectsField = params.thinking?.block_binding && /block_binding/.test(text) && /extra inputs|not permitted|unsupported|not supported|unknown/i.test(text);
122
+ const rejectsBeta = text.includes(JOHNNESS_THINKING_BINDING_BETA) && /anthropic-beta/.test(text) && /unexpected|invalid|unsupported|not supported|unknown/i.test(text);
123
+ if ((rejectsField || rejectsBeta) && !state.control) {
124
+ state.control = true;
125
+ johnnessThinkingBindingRejected.add(johnnessThinkingBindingKey(model));
126
+ const next = { ...params };
127
+ if (next.thinking?.block_binding) {
128
+ const { block_binding, ...thinking } = next.thinking;
129
+ next.thinking = thinking;
130
+ }
131
+ console.warn(`[johnness] anthropic ${model?.id}: endpoint rejected thinking block_binding; retrying once without it (family 97)`);
132
+ return { params: next, rebuild: true };
133
+ }
134
+ return undefined;
135
+ }
136
+ async function* johnnessThinkingBindingStream(client, params, options, model, rebuildClient) {
137
+ const state = {};
138
+ let attempt = params;
139
+ for (;;) {
140
+ let emitted = false;
141
+ try {
142
+ const stream = client.messages.stream({ ...attempt, stream: true }, { signal: options?.signal });
143
+ for await (const event of stream) {
144
+ emitted = true;
145
+ yield event;
146
+ }
147
+ return;
148
+ }
149
+ catch (error) {
150
+ if (emitted || options?.signal?.aborted) throw error;
151
+ const recovery = johnnessThinkingBindingRecovery(attempt, error, model, state);
152
+ if (!recovery) throw error;
153
+ attempt = recovery.params;
154
+ if (recovery.rebuild) client = rebuildClient();
155
+ }
156
+ }
157
+ }
42
158
  /**
43
159
  * Resolve cache retention preference.
44
160
  * JOHNNESS_PATCH_ANTHROPIC_CACHE_LONG_90: direct Anthropic defaults to 1h for API keys and subscriptions.
@@ -227,7 +343,8 @@ export const streamAnthropic = (model, context, options) => {
227
343
  const billingModel = isOAuthToken ? { ...model, cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 } } : model;
228
344
  const params = buildParams(model, context, isOAuthToken, options);
229
345
  options?.onPayload?.(params);
230
- const anthropicStream = client.messages.stream({ ...params, stream: true }, { signal: options?.signal });
346
+ // JOHNNESS_PATCH_THINKING_BLOCK_BINDING_97: one recovery for stale replayed thinking, before any event.
347
+ const anthropicStream = johnnessThinkingBindingStream(client, params, options, model, () => createClient(model, apiKey, options?.interleavedThinking ?? true, options?.headers, copilotDynamicHeaders, options?.cacheRetention).client);
231
348
  stream.push({ type: "start", partial: output });
232
349
  const blocks = output.content;
233
350
  for await (const event of anthropicStream) {
@@ -6,7 +6,7 @@ import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
6
6
  import { convertMessages, convertTools, isThinkingPart, mapStopReason, mapToolChoice, retainThoughtSignature, } from "./google-shared.js";
7
7
  import { buildBaseOptions, clampReasoning } from "./simple-options.js";
8
8
  /* JOHNNESS_MODELS_MASTER:BEGIN google rules (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
9
- const JOHNNESS_GOOGLE_RULES = Object.freeze({"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop","thinking":"level","thinkingDefault":"medium","cache":"implicit-only"}});
9
+ const JOHNNESS_GOOGLE_RULES = Object.freeze({"google/gemini-4-carbon":{"efforts":["low","medium","high"],"temperature":"drop","thinking":"level","thinkingDefault":"medium","cache":"implicit-only"},"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop","thinking":"level","thinkingDefault":"medium","cache":"implicit-only"}});
10
10
  import { johnnessNearestEffort } from "../models.js";
11
11
  const johnnessGoogleBuildParams = buildParams;
12
12
  buildParams = function(model, context, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "johns-harness",
3
- "version": "2026.11.9",
3
+ "version": "2026.11.11",
4
4
  "description": "John's Harness: a production agent harness that runs autonomous coding agents as one cooperative swarm.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -13844,6 +13844,7 @@ const JOHNNESS_MODELS_MASTER = {
13844
13844
  "grok-code-fast-1":{"id":"grok-code-fast-1","name":"Grok Code Fast 1","api":"openai-completions","provider":"github-copilot","baseUrl":"https://api.individual.githubcopilot.com","headers":{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},"compat":{"supportsStore":false,"supportsDeveloperRole":false,"supportsReasoningEffort":false},"reasoning":true,"input":["text"],"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0},"contextWindow":128000,"maxTokens":64000},
13845
13845
  },
13846
13846
  "google": {
13847
+ "gemini-4-carbon":{"id":"gemini-4-carbon","name":"Gemini 4 Carbon","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
13847
13848
  "gemini-4-argon":{"id":"gemini-4-argon","name":"Gemini 4 Argon","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":2,"output":10,"cacheRead":0.1,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
13848
13849
  "gemini-3.5-flash-lite":{"id":"gemini-3.5-flash-lite","name":"Gemini 3.5 Flash-Lite","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":true,"input":["text","image"],"cost":{"input":0.3,"output":2.5,"cacheRead":0.03,"cacheWrite":0},"contextWindow":1048576,"maxTokens":65536},
13849
13850
  "gemini-1.5-flash":{"id":"gemini-1.5-flash","name":"Gemini 1.5 Flash","api":"google-generative-ai","provider":"google","baseUrl":"https://generativelanguage.googleapis.com/v1beta","reasoning":false,"input":["text","image"],"cost":{"input":0.075,"output":0.3,"cacheRead":0.01875,"cacheWrite":0},"contextWindow":1000000,"maxTokens":8192},
@@ -14508,6 +14509,6 @@ const JOHNNESS_MODELS_MASTER = {
14508
14509
  };
14509
14510
  for (const provider of Object.keys(MODELS)) delete MODELS[provider];
14510
14511
  Object.assign(MODELS, JOHNNESS_MODELS_MASTER);
14511
- export const JOHNNESS_MODEL_RULES = {"deepseek/deepseek-flash":{"xhigh":true},"deepseek/deepseek-v4-pro":{"xhigh":true},"meta/muse-spark-1.3":{"xhigh":true},"meta/muse-spark-1.2":{"xhigh":true},"anthropic/claude-fable-5-2":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-fable-5-1":{"xhigh":true},"anthropic/claude-sonnet-5-5":{"xhigh":true},"anthropic/claude-opus-5-5":{"xhigh":true},"anthropic/claude-haiku-5-5":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-opus-5":{"xhigh":true},"anthropic/claude-sonnet-5":{"xhigh":true},"anthropic/claude-fable-5":{"xhigh":true},"anthropic/claude-opus-4-6":{"xhigh":true},"azure-openai-responses/gpt-5.2":{"xhigh":true},"azure-openai-responses/gpt-5.2-chat-latest":{"xhigh":true},"azure-openai-responses/gpt-5.2-codex":{"xhigh":true},"azure-openai-responses/gpt-5.2-pro":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex-spark":{"xhigh":true},"github-copilot/claude-opus-4.6":{"xhigh":true},"github-copilot/gpt-5.2":{"xhigh":true},"github-copilot/gpt-5.2-codex":{"xhigh":true},"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop"},"openai/gpt-5.2":{"xhigh":true},"openai/gpt-5.2-chat-latest":{"xhigh":true},"openai/gpt-5.2-codex":{"xhigh":true},"openai/gpt-5.2-pro":{"xhigh":true},"openai/gpt-5.3-codex":{"xhigh":true},"openai/gpt-5.3-codex-spark":{"xhigh":true},"openai/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.2":{"xhigh":true},"openai-codex/gpt-5.2-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex-spark":{"xhigh":true},"openai-codex/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"opencode/claude-opus-4-6":{"xhigh":true},"opencode/gpt-5.2":{"xhigh":true},"opencode/gpt-5.2-codex":{"xhigh":true},"opencode/gpt-5.3-codex":{"xhigh":true},"openrouter/openai/gpt-5.2":{"xhigh":true},"openrouter/openai/gpt-5.2-chat":{"xhigh":true},"openrouter/openai/gpt-5.2-codex":{"xhigh":true},"openrouter/openai/gpt-5.2-pro":{"xhigh":true},"openrouter/openai/gpt-5.3-codex":{"xhigh":true},"vercel-ai-gateway/anthropic/claude-opus-4.6":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-chat":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-codex":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-pro":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.3-codex":{"xhigh":true},"xai/grok-4.7":{"xhigh":true},"xai/grok-4.6":{"xhigh":true}};
14512
+ export const JOHNNESS_MODEL_RULES = {"deepseek/deepseek-flash":{"xhigh":true},"deepseek/deepseek-v4-pro":{"xhigh":true},"meta/muse-spark-1.3":{"xhigh":true},"meta/muse-spark-1.2":{"xhigh":true},"anthropic/claude-fable-5-2":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-fable-5-1":{"xhigh":true},"anthropic/claude-sonnet-5-5":{"xhigh":true},"anthropic/claude-opus-5-5":{"xhigh":true},"anthropic/claude-haiku-5-5":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"anthropic/claude-opus-5":{"xhigh":true},"anthropic/claude-sonnet-5":{"xhigh":true},"anthropic/claude-fable-5":{"xhigh":true},"anthropic/claude-opus-4-6":{"xhigh":true},"azure-openai-responses/gpt-5.2":{"xhigh":true},"azure-openai-responses/gpt-5.2-chat-latest":{"xhigh":true},"azure-openai-responses/gpt-5.2-codex":{"xhigh":true},"azure-openai-responses/gpt-5.2-pro":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex":{"xhigh":true},"azure-openai-responses/gpt-5.3-codex-spark":{"xhigh":true},"github-copilot/claude-opus-4.6":{"xhigh":true},"github-copilot/gpt-5.2":{"xhigh":true},"github-copilot/gpt-5.2-codex":{"xhigh":true},"google/gemini-4-carbon":{"efforts":["low","medium","high"],"temperature":"drop"},"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop"},"openai/gpt-5.2":{"xhigh":true},"openai/gpt-5.2-chat-latest":{"xhigh":true},"openai/gpt-5.2-codex":{"xhigh":true},"openai/gpt-5.2-pro":{"xhigh":true},"openai/gpt-5.3-codex":{"xhigh":true},"openai/gpt-5.3-codex-spark":{"xhigh":true},"openai/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.2":{"xhigh":true},"openai-codex/gpt-5.2-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex":{"xhigh":true},"openai-codex/gpt-5.3-codex-spark":{"xhigh":true},"openai-codex/gpt-6.1-sol":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-6-sol":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-luna":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6-astra":{"xhigh":true,"efforts":["low","medium","high","xhigh","max"],"temperature":"drop"},"openai-codex/gpt-5.6-sol":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-terra":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-5.6-luna":{"xhigh":true,"temperature":"drop-unless-effort-none"},"openai-codex/gpt-6.1-terra":{"xhigh":true,"efforts":["none","low","medium","high","xhigh","max"],"temperature":"drop-unless-effort-none"},"opencode/claude-opus-4-6":{"xhigh":true},"opencode/gpt-5.2":{"xhigh":true},"opencode/gpt-5.2-codex":{"xhigh":true},"opencode/gpt-5.3-codex":{"xhigh":true},"openrouter/openai/gpt-5.2":{"xhigh":true},"openrouter/openai/gpt-5.2-chat":{"xhigh":true},"openrouter/openai/gpt-5.2-codex":{"xhigh":true},"openrouter/openai/gpt-5.2-pro":{"xhigh":true},"openrouter/openai/gpt-5.3-codex":{"xhigh":true},"vercel-ai-gateway/anthropic/claude-opus-4.6":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-chat":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-codex":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.2-pro":{"xhigh":true},"vercel-ai-gateway/openai/gpt-5.3-codex":{"xhigh":true},"xai/grok-4.7":{"xhigh":true},"xai/grok-4.6":{"xhigh":true}};
14512
14513
  /* JOHNNESS_MODELS_MASTER:END */
14513
14514
  //# sourceMappingURL=models.generated.js.map
@@ -39,6 +39,122 @@ buildParams = function johnnessMasterAnthropicBuildParams(model, context, isOAut
39
39
  return params;
40
40
  };
41
41
  /* JOHNNESS_MODELS_MASTER:END */
42
+ /* JOHNNESS_PATCH_THINKING_BLOCK_BINDING_97 (family 97): Anthropic binds each replayed signed thinking
43
+ * block to the exact prefix it was produced under (top-level system, tools, every earlier message).
44
+ * The harness legitimately rewrites that prefix (compaction, memory context, announce runs, model
45
+ * switches), so a replayed block can come back as a 400: "messages.i.content.j: Invalid `signature`
46
+ * in `thinking` block. The block is bound to a different conversation." Three layers, all generic:
47
+ * 1. Direct Claude API requests (API key and subscription) send the thinking-binding-controls beta and
48
+ * thinking.block_binding.prefix_mismatch_behavior "drop_block" whenever thinking is adaptive (the
49
+ * only thinking type that accepts block_binding), so the API drops stale blocks instead of failing.
50
+ * 2. Any request that still gets that 400 (other thinking modes, proxies, corrupted signatures) strips
51
+ * the named block and every later thinking/redacted_thinking block, then retries once. The 400 is
52
+ * returned before any stream event, so nothing partial ever reached the caller.
53
+ * 3. If an endpoint rejects the control itself, it is remembered per provider+baseUrl+model, the request
54
+ * is retried once without it, and later requests to that endpoint omit it.
55
+ * Docs: https://platform.claude.com/docs/en/build-with-claude/preserved-thinking and
56
+ * https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting (checked 2026-11-09).
57
+ * JOHNNESS_THINKING_BLOCK_BINDING=off disables layers 1 and 3; the strip retry always stays on. */
58
+ const JOHNNESS_THINKING_BINDING_BETA = "thinking-binding-controls-2026-08-01";
59
+ const JOHNNESS_THINKING_SIGNATURE_ERROR = /messages\.(\d+)\.content\.(\d+): Invalid `signature` in `thinking` block/;
60
+ const johnnessThinkingBindingRejected = new Set();
61
+ function johnnessThinkingBindingKey(model) {
62
+ return `${model?.provider}|${model?.baseUrl}|${model?.id}`;
63
+ }
64
+ function johnnessThinkingBindingEligible(model) {
65
+ if (typeof process !== "undefined" && /^(off|0|false|no)$/i.test(String(process.env.JOHNNESS_THINKING_BLOCK_BINDING ?? "").trim())) return false;
66
+ return model?.provider !== "github-copilot" && String(model?.baseUrl ?? "").includes("api.anthropic.com") &&
67
+ !johnnessThinkingBindingRejected.has(johnnessThinkingBindingKey(model));
68
+ }
69
+ const johnnessHistoricalThinkingBindingHeaders = withAnthropicCacheBeta;
70
+ withAnthropicCacheBeta = function johnnessThinkingBindingHeaders(headers, model, cacheRetention) {
71
+ const merged = { ...johnnessHistoricalThinkingBindingHeaders(headers, model, cacheRetention) };
72
+ // Only models that can think adaptively can carry block_binding; others keep their exact headers.
73
+ if (!model?.reasoning || !supportsAdaptiveThinking(model.id) || !johnnessThinkingBindingEligible(model)) return merged;
74
+ const keys = Object.keys(merged).filter((key) => key.toLowerCase() === "anthropic-beta");
75
+ const betas = keys.flatMap((key) => String(merged[key] ?? "").split(",").map((value) => value.trim()).filter(Boolean));
76
+ for (const key of keys) delete merged[key];
77
+ merged["anthropic-beta"] = [...new Set([...betas, JOHNNESS_THINKING_BINDING_BETA])].join(",");
78
+ return merged;
79
+ };
80
+ const johnnessHistoricalThinkingBindingBuildParams = buildParams;
81
+ buildParams = function johnnessThinkingBindingBuildParams(model, context, isOAuthToken, options) {
82
+ const params = johnnessHistoricalThinkingBindingBuildParams(model, context, isOAuthToken, options);
83
+ if (params.thinking?.type === "adaptive" && !params.thinking.block_binding && johnnessThinkingBindingEligible(model)) {
84
+ params.thinking = { ...params.thinking, block_binding: { prefix_mismatch_behavior: "drop_block" } };
85
+ }
86
+ return params;
87
+ };
88
+ function johnnessThinkingBindingErrorText(error) {
89
+ return [error?.message, error?.error?.error?.message, error?.error?.message]
90
+ .filter((value) => typeof value === "string").join("\n");
91
+ }
92
+ function johnnessStripReplayedThinking(params, messageIndex, blockIndex) {
93
+ let stripped = 0;
94
+ const messages = [];
95
+ params.messages.forEach((message, i) => {
96
+ if (i < messageIndex || !Array.isArray(message?.content)) {
97
+ messages.push(message);
98
+ return;
99
+ }
100
+ const content = message.content.filter((block, j) => {
101
+ const drop = (block?.type === "thinking" || block?.type === "redacted_thinking") && (i > messageIndex || j >= blockIndex);
102
+ if (drop) stripped++;
103
+ return !drop;
104
+ });
105
+ if (content.length > 0) messages.push(content.length === message.content.length ? message : { ...message, content });
106
+ });
107
+ return stripped > 0 ? { params: { ...params, messages }, stripped } : undefined;
108
+ }
109
+ function johnnessThinkingBindingRecovery(params, error, model, state) {
110
+ if (error?.status !== undefined && error.status !== 400) return undefined;
111
+ const text = johnnessThinkingBindingErrorText(error);
112
+ const match = text.match(JOHNNESS_THINKING_SIGNATURE_ERROR);
113
+ if (match) {
114
+ if (state.stripped) return undefined;
115
+ state.stripped = true;
116
+ const next = johnnessStripReplayedThinking(params, Number(match[1]), Number(match[2])) ?? johnnessStripReplayedThinking(params, 0, 0);
117
+ if (!next) return undefined;
118
+ console.warn(`[johnness] anthropic ${model?.id}: replayed thinking bound to a different conversation at messages.${match[1]}.content.${match[2]}; stripped ${next.stripped} thinking block(s) and retrying once (family 97)`);
119
+ return { params: next.params };
120
+ }
121
+ const rejectsField = params.thinking?.block_binding && /block_binding/.test(text) && /extra inputs|not permitted|unsupported|not supported|unknown/i.test(text);
122
+ const rejectsBeta = text.includes(JOHNNESS_THINKING_BINDING_BETA) && /anthropic-beta/.test(text) && /unexpected|invalid|unsupported|not supported|unknown/i.test(text);
123
+ if ((rejectsField || rejectsBeta) && !state.control) {
124
+ state.control = true;
125
+ johnnessThinkingBindingRejected.add(johnnessThinkingBindingKey(model));
126
+ const next = { ...params };
127
+ if (next.thinking?.block_binding) {
128
+ const { block_binding, ...thinking } = next.thinking;
129
+ next.thinking = thinking;
130
+ }
131
+ console.warn(`[johnness] anthropic ${model?.id}: endpoint rejected thinking block_binding; retrying once without it (family 97)`);
132
+ return { params: next, rebuild: true };
133
+ }
134
+ return undefined;
135
+ }
136
+ async function* johnnessThinkingBindingStream(client, params, options, model, rebuildClient) {
137
+ const state = {};
138
+ let attempt = params;
139
+ for (;;) {
140
+ let emitted = false;
141
+ try {
142
+ const stream = client.messages.stream({ ...attempt, stream: true }, { signal: options?.signal });
143
+ for await (const event of stream) {
144
+ emitted = true;
145
+ yield event;
146
+ }
147
+ return;
148
+ }
149
+ catch (error) {
150
+ if (emitted || options?.signal?.aborted) throw error;
151
+ const recovery = johnnessThinkingBindingRecovery(attempt, error, model, state);
152
+ if (!recovery) throw error;
153
+ attempt = recovery.params;
154
+ if (recovery.rebuild) client = rebuildClient();
155
+ }
156
+ }
157
+ }
42
158
  /**
43
159
  * Resolve cache retention preference.
44
160
  * JOHNNESS_PATCH_ANTHROPIC_CACHE_LONG_90: direct Anthropic defaults to 1h for API keys and subscriptions.
@@ -227,7 +343,8 @@ export const streamAnthropic = (model, context, options) => {
227
343
  const billingModel = isOAuthToken ? { ...model, cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 } } : model;
228
344
  const params = buildParams(model, context, isOAuthToken, options);
229
345
  options?.onPayload?.(params);
230
- const anthropicStream = client.messages.stream({ ...params, stream: true }, { signal: options?.signal });
346
+ // JOHNNESS_PATCH_THINKING_BLOCK_BINDING_97: one recovery for stale replayed thinking, before any event.
347
+ const anthropicStream = johnnessThinkingBindingStream(client, params, options, model, () => createClient(model, apiKey, options?.interleavedThinking ?? true, options?.headers, copilotDynamicHeaders, options?.cacheRetention).client);
231
348
  stream.push({ type: "start", partial: output });
232
349
  const blocks = output.content;
233
350
  for await (const event of anthropicStream) {
@@ -6,7 +6,7 @@ import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
6
6
  import { convertMessages, convertTools, isThinkingPart, mapStopReason, mapToolChoice, retainThoughtSignature, } from "./google-shared.js";
7
7
  import { buildBaseOptions, clampReasoning } from "./simple-options.js";
8
8
  /* JOHNNESS_MODELS_MASTER:BEGIN google rules (generated from models/models.json by scripts/models-sync.mjs; edit the master, not this block) */
9
- const JOHNNESS_GOOGLE_RULES = Object.freeze({"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop","thinking":"level","thinkingDefault":"medium","cache":"implicit-only"}});
9
+ const JOHNNESS_GOOGLE_RULES = Object.freeze({"google/gemini-4-carbon":{"efforts":["low","medium","high"],"temperature":"drop","thinking":"level","thinkingDefault":"medium","cache":"implicit-only"},"google/gemini-4-argon":{"efforts":["low","medium","high"],"temperature":"drop","thinking":"level","thinkingDefault":"medium","cache":"implicit-only"}});
10
10
  import { johnnessNearestEffort } from "../models.js";
11
11
  const johnnessGoogleBuildParams = buildParams;
12
12
  buildParams = function(model, context, options) {