@linxiraos/pi-catalog 1.1.26 → 1.1.27

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +13 -2
  2. package/dist/types/compat/auth-ids.d.ts +2 -2
  3. package/dist/types/compat/collapse.d.ts +7 -0
  4. package/dist/types/compat/image-tokenization.d.ts +52 -0
  5. package/dist/types/compat/provider-ids.d.ts +1 -1
  6. package/dist/types/hosts.d.ts +4 -0
  7. package/dist/types/model-cache.d.ts +6 -0
  8. package/dist/types/provider-models/special.d.ts +6 -0
  9. package/dist/types/types.d.ts +29 -4
  10. package/dist/types/wire/gemini-headers.d.ts +6 -3
  11. package/package.json +4 -4
  12. package/src/compat/auth-ids.ts +2 -0
  13. package/src/compat/axes.ts +6 -2
  14. package/src/compat/collapse.d.ts +7 -0
  15. package/src/compat/collapse.ts +11 -0
  16. package/src/compat/image-tokenization.ts +166 -0
  17. package/src/compat/provider-ids.d.ts +1 -1
  18. package/src/compat/provider-ids.ts +1 -0
  19. package/src/compat/resolve.ts +20 -23
  20. package/src/compat/rules/README.md +1 -1
  21. package/src/compat/rules/auth/_order.kdl +1 -1
  22. package/src/compat/rules/auth/snowflake.kdl +11 -0
  23. package/src/compat/rules/classes/anthropic.kdl +102 -7
  24. package/src/compat/rules/classes/deepseek.kdl +5 -3
  25. package/src/compat/rules/classes/gemini.kdl +12 -0
  26. package/src/compat/rules/classes/glm.kdl +1 -1
  27. package/src/compat/rules/classes/kimi.kdl +7 -0
  28. package/src/compat/rules/classes/meta.kdl +4 -4
  29. package/src/compat/rules/classes/openai.kdl +109 -1
  30. package/src/compat/rules/providers/amazon-bedrock.kdl +0 -7
  31. package/src/compat/rules/providers/cursor.kdl +6 -8
  32. package/src/compat/rules/providers/google-antigravity.kdl +8 -1
  33. package/src/compat/rules/providers/image-tokenization.kdl +42 -0
  34. package/src/compat/rules/providers/meta.kdl +3 -3
  35. package/src/compat/rules/providers/muse-code.kdl +7 -0
  36. package/src/compat/rules/providers/ollama.kdl +3 -0
  37. package/src/compat/rules/providers/openai-codex.kdl +1 -0
  38. package/src/compat/rules/providers/opencode-go.kdl +11 -0
  39. package/src/compat/rules/providers/snowflake.kdl +135 -0
  40. package/src/compat/rules/providers/tool-result-images.kdl +16 -0
  41. package/src/compat/rules/runtime/behavior.kdl +1 -1
  42. package/src/compat/rules/taxonomy/_collapse.kdl +34 -2
  43. package/src/compat/rules/taxonomy/deepseek.kdl +4 -0
  44. package/src/compat/rules/taxonomy/kimi.kdl +5 -0
  45. package/src/compat/rules.json +1 -1
  46. package/src/discovery/cursor.ts +26 -3
  47. package/src/hosts.d.ts +4 -0
  48. package/src/hosts.ts +2 -0
  49. package/src/model-cache.d.ts +6 -0
  50. package/src/model-cache.ts +10 -0
  51. package/src/models.json +1 -1
  52. package/src/provider-models/cache-provider-id.ts +10 -4
  53. package/src/provider-models/cline-pass.ts +33 -0
  54. package/src/provider-models/google.ts +2 -0
  55. package/src/provider-models/openai-compat.ts +70 -15
  56. package/src/provider-models/special.d.ts +6 -0
  57. package/src/provider-models/special.ts +11 -4
  58. package/src/types.d.ts +29 -4
  59. package/src/types.ts +34 -3
  60. package/src/wire/gemini-headers.d.ts +6 -3
  61. package/src/wire/gemini-headers.ts +39 -21
@@ -179,7 +179,7 @@ function overlayEffortMapAxis(
179
179
  }
180
180
 
181
181
  function effortList(value: unknown): readonly Effort[] | undefined {
182
- if (!Array.isArray(value) || value.length === 0) return undefined;
182
+ if (!Array.isArray(value)) return undefined;
183
183
  const out: Effort[] = [];
184
184
  for (const entry of value) {
185
185
  const effort = THINKING_EFFORTS.find(candidate => candidate === entry);
@@ -505,7 +505,7 @@ function detectOpenAICompat(
505
505
  // API-conditional: this completions-only Copilot exclusion cannot be a
506
506
  // provider rule without changing Copilot Responses rows.
507
507
  supportsReasoningParams: provider !== "github-copilot",
508
- supportsSamplingParams: !(facts.is("openai") && (facts.family("o-series") || facts.revGte("5"))),
508
+ supportsSamplingParams: true,
509
509
  supportsPenaltyAndStopParams: !(isGrok && reasoningCapable),
510
510
  reasoningEffortMap: {},
511
511
  supportsUsageInStreaming: !isCerebrasHost,
@@ -598,26 +598,12 @@ function detectOpenAICompat(
598
598
  };
599
599
  }
600
600
 
601
- const DSML_HEALING_PROVIDERS: Record<string, true> = {
602
- ollama: true,
603
- "ollama-cloud": true,
604
- nvidia: true,
605
- deepseek: true,
606
- fireworks: true,
607
- nanogpt: true,
608
- "opencode-go": true,
609
- openrouter: true,
610
- // Transparent gateways / user-configured hosts forward the upstream model's
611
- // native chat template unchanged, so a deepseek-classed model behind them
612
- // still emits DSML tool-call envelopes and needs the DSML healer.
613
- litellm: true,
614
- nous: true,
615
- };
616
-
617
601
  /**
618
602
  * Default leaked-markup healer. Kimi/DeepSeek dedicated grammars are keyed on
619
603
  * identity class; official OpenAI heals nothing; everything else defaults to
620
- * the generic `thinking` healer.
604
+ * the generic `thinking` healer. DSML is DeepSeek's own tool-call grammar, so
605
+ * every host serving a DeepSeek model gets it — gateways, local backends, and
606
+ * custom providers alike.
621
607
  */
622
608
  function detectStreamMarkupHealing(
623
609
  provider: string,
@@ -628,7 +614,7 @@ function detectStreamMarkupHealing(
628
614
  // Kimi ids keep the generic healer, matching the census.
629
615
  const isKimiK2 = facts.is("kimi") && facts.identity.family?.startsWith("k2") === true;
630
616
  if (provider === "kimi-code" || provider === "moonshot" || isKimiK2) return "kimi";
631
- if (facts.is("deepseek") && DSML_HEALING_PROVIDERS[provider] === true) return "dsml";
617
+ if (facts.is("deepseek")) return "dsml";
632
618
  if (isOfficialOpenAIEndpoint(provider, baseUrl)) return undefined;
633
619
  return "thinking";
634
620
  }
@@ -749,8 +735,15 @@ function resolveOpenAIResponsesPolicy(
749
735
  supportsPromptCacheBreakpoints,
750
736
  promptCacheBreakpointTtl: supportsPromptCacheBreakpoints ? "30m" : undefined,
751
737
  strictResponsesPairing: isAzure || provider === "github-copilot",
752
- supportsImageDetailOriginal: !isXaiHost && !modelMatchesHost(hostModel, "githubCopilot"),
738
+ // Azure's provider id alone only implies support while its endpoint is
739
+ // resolved at runtime; an explicit non-Azure baseUrl is a proxy, like Codex.
740
+ supportsImageDetailOriginal:
741
+ isOpenAIUrl ||
742
+ hostMatchesUrl(baseUrl, "azureOpenAI") ||
743
+ (isAzure && !baseUrl) ||
744
+ hostMatchesUrl(baseUrl, "openaiCodex"),
753
745
  supportsReasoningSummary: !isXaiHost,
746
+ statefulResponses: undefined,
754
747
  supportsAllTurnsReasoningContext: false,
755
748
  supportsConfigurationUpdate: false,
756
749
  supportsSteering: false,
@@ -759,7 +752,7 @@ function resolveOpenAIResponsesPolicy(
759
752
  thinkingLoopGuard: undefined,
760
753
  reasoningEffortMap: {},
761
754
  supportsReasoningParams: true,
762
- supportsSamplingParams: !(facts.is("openai") && (facts.family("o-series") || facts.revGte("5"))),
755
+ supportsSamplingParams: true,
763
756
  supportsPenaltyAndStopParams: !isXaiHost,
764
757
  thinkingFormat,
765
758
  reasoningDisableMode: resolveReasoningDisableMode(thinkingFormat),
@@ -798,6 +791,7 @@ function resolveOpenAIResponsesPolicy(
798
791
  PROXY_OPENAI_COMPAT_PROVIDERS[backendProvider] !== true &&
799
792
  (LOCAL_OPENAI_COMPAT_PROVIDERS[backendProvider] === true || hasLocalLoopbackBaseUrl(baseUrl)),
800
793
  supportsObfuscationOptOut: isOpenAIUrl || provider === "openai",
794
+ storeResponses: false,
801
795
  officialEndpoint: isOfficialOpenAIEndpoint(provider, baseUrl),
802
796
  harmonyLeakMitigation: false,
803
797
  rejectRootObjectUnion: false,
@@ -859,6 +853,7 @@ function pickResponsesOnly(compat: ResolvedOpenAIResponsesCompat): ResponsesOnly
859
853
  strictResponsesPairing: compat.strictResponsesPairing,
860
854
  supportsImageDetailOriginal: compat.supportsImageDetailOriginal,
861
855
  supportsObfuscationOptOut: compat.supportsObfuscationOptOut,
856
+ storeResponses: compat.storeResponses,
862
857
  supportsAllTurnsReasoningContext: compat.supportsAllTurnsReasoningContext,
863
858
  supportsConfigurationUpdate: compat.supportsConfigurationUpdate,
864
859
  supportsSteering: compat.supportsSteering,
@@ -867,6 +862,7 @@ function pickResponsesOnly(compat: ResolvedOpenAIResponsesCompat): ResponsesOnly
867
862
  cacheControlFormat: compat.cacheControlFormat,
868
863
  requiresReasoningOffJuiceInstruction: compat.requiresReasoningOffJuiceInstruction,
869
864
  supportsReasoningSummary: compat.supportsReasoningSummary,
865
+ statefulResponses: compat.statefulResponses,
870
866
  isVercelGatewayHost: compat.isVercelGatewayHost,
871
867
  } satisfies ResponsesOnlyCompat;
872
868
  }
@@ -906,7 +902,7 @@ function resolveAnthropicPolicy(
906
902
  supportsThinkingBindingControls: false,
907
903
  supportsBetweenToolsThinking: false,
908
904
  supportsForcedToolChoice: !requiresThinkingEnabled && !facts.family("fable", "mythos"),
909
- supportsSamplingParams: !facts.anthropicAdaptiveGenAtLeast("4.7"),
905
+ supportsSamplingParams: true,
910
906
  requiresToolResultId: false,
911
907
  requiresThinkingEnabled,
912
908
  replayUnsignedThinking:
@@ -1162,6 +1158,7 @@ function resolveThinkingPolicy<TApi extends Api>(
1162
1158
  if (compat !== undefined && "trustExplicitThinkingOnly" in compat && compat.trustExplicitThinkingOnly === true) {
1163
1159
  return undefined;
1164
1160
  }
1161
+ if (rule.efforts?.length === 0) return undefined;
1165
1162
  const config: ThinkingConfig = {
1166
1163
  mode: rule.mode ?? defaultThinkingMode(spec, facts),
1167
1164
  efforts: rule.efforts ?? fallbackEfforts(spec, compat),
@@ -209,7 +209,7 @@ The directive vocabulary is closed and lives in **`src/compat/axes.ts`** — one
209
209
  The three value shapes are:
210
210
 
211
211
  - **Scalar**: exactly one KDL boolean, integer, float, or string argument and no children. `#null` is rejected.
212
- - **Array**: one or more scalar arguments and no children; it resolves to a JSON array. Axes marked `emptyArray` in `axes.ts` also accept a bare directive, which assigns an explicit empty list (`region-upstreams-eu` with no arguments: the region never serves the model).
212
+ - **Array**: one or more scalar arguments and no children; it resolves to a JSON array. Axes marked `emptyArray` in `axes.ts` also accept a bare directive, which assigns an explicit empty list (`region-upstreams-eu` with no arguments: the region never serves the model). Bare `thinking-efforts` keeps a reasoning-capable deployment without selectable effort tiers off the effort dial.
213
213
  - **Object**: no arguments and a child block, including an empty block. Child names are kebab-case: an axis-directive spelling compiles to its resolved axis key (`template-reasoning-effort` → `qwenTemplateReasoningEffort`), anything else converts mechanically (`input-threshold` → `inputThreshold`); camelCase names are a compile error. `extra-body` payloads (top-level or nested) are the exception — their child names are literal wire JSON keys copied verbatim (`enable_thinking`). Each child is either one scalar or another object; arrays are not representable inside an object payload.
214
214
 
215
215
  A rule cannot assign the same resolved axis twice in one block.
@@ -8,6 +8,6 @@ login-order "openai-codex" "anthropic" "zai" "zai-coding-plan" "kimi-code" "open
8
8
  "xiaomi-token-plan-ams" "xiaomi-token-plan-cn" "firepass" "cline-pass" "factory-droid" "commandcode" "charm-hyper" "deepseek" "stepfun" "muse-code" "meta" "moonshot" \
9
9
  "cerebras" "baseten" "helmcode" "fireworks" "together" "nvidia" "novita" "deepinfra" "huggingface" "perplexity" \
10
10
  "qianfan" "venice" "siliconflow" "siliconflow-cn" "synthetic" "nanogpt" "wafer-serverless" "coreweave" \
11
- "vercel-ai-gateway" "cloudflare-ai-gateway" "litellm" "kilo" "zenmux" "opencode-zen" "opencode-go" \
11
+ "vercel-ai-gateway" "cloudflare-ai-gateway" "snowflake" "litellm" "kilo" "zenmux" "opencode-zen" "opencode-go" \
12
12
  "yolo-auto" "tavily" "kagi" "exa" "parallel" "typesafe" "ollama" "ollama-cloud" "lm-studio" "llama.cpp" "vllm" \
13
13
  "gmi-cloud" "stencil" "singularityapi-dev" "singularityapi-tech"
@@ -0,0 +1,11 @@
1
+ // Snowflake Cortex REST API. Login runs Snowflake OAuth for local applications
2
+ // (built-in SNOWFLAKE$LOCAL_APPLICATION client, PKCE, loopback); the account
3
+ // host is prompted first, so the flow is a custom hook.
4
+ auth "snowflake" {
5
+ name "Snowflake Cortex"
6
+ login "custom" hook="snowflake"
7
+ refresh hook="snowflake"
8
+ api-key-format "structured"
9
+ callback-port 54551
10
+ paste-code #true
11
+ }
@@ -1,5 +1,70 @@
1
1
  // Model-lineage compat for "anthropic"; regenerated from the frozen census using class taxonomy selectors.
2
2
 
3
+ // Images bill ⌈w/28⌉·⌈h/28⌉ visual tokens on every host. Claude 4.7+ and
4
+ // Fable/Mythos read up to 2576px and 4,784 tokens; older lines fit 1568px and
5
+ // cap at 1,568 tokens, downscaling past it.
6
+ // https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size
7
+ // The class default is the high-res tier, so ids without a revision
8
+ // (`claude-opus-latest`, `~anthropic/claude-sonnet-latest`) and future lines
9
+ // are never undercounted; only Opus/Sonnet/Haiku revisions known to predate
10
+ // 4.7 take the standard tier. Separator-collapsed revisions parse as two
11
+ // digits (`claude-opus-45` is Opus 4.5 → 45), so 10–46 is standard too.
12
+ class "anthropic" {
13
+ image-tokenization {
14
+ regime "anthropic-patch"
15
+ max-edge 2576
16
+ max-tokens 4784
17
+ }
18
+ family "opus" {
19
+ revision "<4.7" {
20
+ image-tokenization {
21
+ regime "anthropic-patch"
22
+ max-edge 1568
23
+ max-tokens 1568
24
+ }
25
+ }
26
+ revision ">=10 <47" {
27
+ image-tokenization {
28
+ regime "anthropic-patch"
29
+ max-edge 1568
30
+ max-tokens 1568
31
+ }
32
+ }
33
+ }
34
+ family "sonnet" {
35
+ revision "<4.7" {
36
+ image-tokenization {
37
+ regime "anthropic-patch"
38
+ max-edge 1568
39
+ max-tokens 1568
40
+ }
41
+ }
42
+ revision ">=10 <47" {
43
+ image-tokenization {
44
+ regime "anthropic-patch"
45
+ max-edge 1568
46
+ max-tokens 1568
47
+ }
48
+ }
49
+ }
50
+ family "haiku" {
51
+ revision "<4.7" {
52
+ image-tokenization {
53
+ regime "anthropic-patch"
54
+ max-edge 1568
55
+ max-tokens 1568
56
+ }
57
+ }
58
+ revision ">=10 <47" {
59
+ image-tokenization {
60
+ regime "anthropic-patch"
61
+ max-edge 1568
62
+ max-tokens 1568
63
+ }
64
+ }
65
+ }
66
+ }
67
+
3
68
  class "anthropic" {
4
69
  family "fable" {
5
70
  revision ">=5.1" {
@@ -7,6 +72,30 @@ class "anthropic" {
7
72
  thinking-prefix-binding #true
8
73
  }
9
74
  }
75
+ // Adaptive Claude (Opus 4.7+, Sonnet/Fable/Mythos 5+) rejects explicit
76
+ // sampling params (`temperature`, `top_p`, `top_k`) with a 400 on every
77
+ // serving host. The `<10` bound keeps whole-number revisions such as
78
+ // `claude-opus-45` (Opus 4.5) out of the range.
79
+ family "opus" {
80
+ revision ">=4.7 <10" {
81
+ supports-sampling-params #false
82
+ }
83
+ }
84
+ family "sonnet" {
85
+ revision ">=5 <10" {
86
+ supports-sampling-params #false
87
+ }
88
+ }
89
+ family "fable" {
90
+ revision ">=5 <10" {
91
+ supports-sampling-params #false
92
+ }
93
+ }
94
+ family "mythos" {
95
+ revision ">=5 <10" {
96
+ supports-sampling-params #false
97
+ }
98
+ }
10
99
  // On-demand compaction (compact-2026-09-04) works on the Claude API, Vertex,
11
100
  // and Amazon Bedrock's `/anthropic` routes, not Bedrock Converse.
12
101
  // Foundry / Claude Platform on AWS are first-party Anthropic routes whose
@@ -145,13 +234,19 @@ class "anthropic" {
145
234
  revision ">=5" {
146
235
  supports-per-message-effort #true
147
236
  }
237
+ // Opus 5.5 is prefix-bound like Sonnet 5.5; without `drop_block` a
238
+ // changed system prompt or tool set fails the replay with a 400.
239
+ // Bounded for the same reason as the forced-tool-choice rule above.
240
+ revision ">=5.5 <6" {
241
+ supports-thinking-binding-controls #true
242
+ }
148
243
  }
149
244
  }
150
245
  on "aimlapi" "gitlab-duo" "kilo" "nanogpt" "venice" {
151
246
  thinking-efforts "minimal" "low" "medium" "high" "xhigh"
152
247
  }
153
248
  on "amazon-bedrock" "anthropic" "cloudflare-ai-gateway" "github-copilot" "gitlab-duo" \
154
- "google-antigravity" "google-vertex" "opencode-zen" "vercel-ai-gateway" "zenmux" {
249
+ "google-antigravity" "google-vertex" "opencode-zen" "snowflake" "vercel-ai-gateway" "zenmux" {
155
250
  family "sonnet" {
156
251
  revision ">=3.7 <4.6" {
157
252
  thinking-mode "budget"
@@ -159,13 +254,13 @@ class "anthropic" {
159
254
  }
160
255
  }
161
256
  on "amazon-bedrock" "anthropic" "cloudflare-ai-gateway" "github-copilot" "gitlab-duo" \
162
- "google-vertex" "opencode-zen" "vercel-ai-gateway" {
257
+ "google-vertex" "opencode-zen" "snowflake" "vercel-ai-gateway" {
163
258
  family "haiku" {
164
259
  thinking-mode "budget"
165
260
  }
166
261
  }
167
262
  on "amazon-bedrock" "anthropic" "cloudflare-ai-gateway" "github-copilot" "gitlab-duo" \
168
- "google-vertex" "opencode-zen" "vercel-ai-gateway" "zenmux" {
263
+ "google-vertex" "opencode-zen" "snowflake" "vercel-ai-gateway" "zenmux" {
169
264
  family "opus" {
170
265
  revision ">=4.5 <4.6" {
171
266
  thinking-mode "anthropic-budget-effort"
@@ -173,7 +268,7 @@ class "anthropic" {
173
268
  }
174
269
  }
175
270
  on "amazon-bedrock" "anthropic" "cloudflare-ai-gateway" "github-copilot" "google-vertex" \
176
- "opencode-zen" "openrouter" "vercel-ai-gateway" "zenmux" {
271
+ "opencode-zen" "openrouter" "snowflake" "vercel-ai-gateway" "zenmux" {
177
272
  family "opus" {
178
273
  revision ">=4.6 <4.7" {
179
274
  thinking-efforts "low" "medium" "high" "max"
@@ -181,7 +276,7 @@ class "anthropic" {
181
276
  }
182
277
  }
183
278
  on "amazon-bedrock" "anthropic" "cloudflare-ai-gateway" "github-copilot" "google-vertex" \
184
- "opencode-zen" "vercel-ai-gateway" "zenmux" {
279
+ "opencode-zen" "snowflake" "vercel-ai-gateway" "zenmux" {
185
280
  revision ">=4.7 <45.1" {
186
281
  thinking-mode "anthropic-adaptive"
187
282
  }
@@ -212,13 +307,13 @@ class "anthropic" {
212
307
  }
213
308
  }
214
309
  on "anthropic" "cloudflare-ai-gateway" "github-copilot" "google-vertex" "opencode-zen" \
215
- "openrouter" "vercel-ai-gateway" "zenmux" {
310
+ "openrouter" "snowflake" "vercel-ai-gateway" "zenmux" {
216
311
  revision ">=4.7 <45.1" {
217
312
  thinking-efforts "low" "medium" "high" "xhigh" "max"
218
313
  }
219
314
  }
220
315
  on "anthropic" "cloudflare-ai-gateway" "github-copilot" "google-vertex" "opencode-zen" \
221
- "vercel-ai-gateway" "zenmux" {
316
+ "snowflake" "vercel-ai-gateway" "zenmux" {
222
317
  family "sonnet" {
223
318
  revision ">=4.6 <5" {
224
319
  thinking-efforts "low" "medium" "high"
@@ -92,8 +92,10 @@ class "deepseek" {
92
92
  models "deepseek-flash" priority=10 {
93
93
  strip-image-input #false
94
94
  }
95
- on "ollama-cloud" "nvidia" "deepseek" "fireworks" "nanogpt" "opencode-go" "openrouter" "litellm" "nous" {
96
- stream-markup-healing-pattern "dsml"
97
- }
95
+ // DSML is the model's own tool-call grammar, not a host quirk: any server
96
+ // running DeepSeek's chat template without (or with a broken) tool parser
97
+ // leaks it into content — hosted gateways, local backends, and custom
98
+ // providers alike. On hosts that parse it the healer sees no markup.
99
+ stream-markup-healing-pattern "dsml"
98
100
  thinking-loop-guard "deepseek"
99
101
  }
@@ -118,3 +118,15 @@ class "gemini" {
118
118
  }
119
119
  }
120
120
  }
121
+
122
+ // Gemini 3+ bills a fixed `media_resolution` budget per image regardless of
123
+ // pixels; the default for images is HIGH, 1,120 tokens.
124
+ // https://ai.google.dev/gemini-api/docs/media-resolution
125
+ class "gemini" {
126
+ revision ">=3" {
127
+ image-tokenization {
128
+ regime "fixed"
129
+ tokens 1120
130
+ }
131
+ }
132
+ }
@@ -107,7 +107,7 @@ class "glm" {
107
107
  // the intentional overlap with census host-dialect residues such as
108
108
  // baseten's `zai-org/GLM-5*`.
109
109
  models "*glm-5.3" "*glm-5.3-air" "*glm-5.3-turbo" "*glm-5.3-flash" "*glm-5.3:*" \
110
- "*glm-5.3-flash-uncensored" "*glm-5.3-free" "*glm-5.3-highspeed" "*glm-5.3-flash-lab" priority=10 {
110
+ "*glm-5.3-flash-uncensored" "*glm-5.3-free" "*glm-5.3-highspeed" "*glm-5.3-fast" "*glm-5.3-flash-lab" priority=10 {
111
111
  thinking-default-level "max"
112
112
  thinking-efforts "low" "high" "max"
113
113
  thinking-requires-effort #true
@@ -115,5 +115,12 @@ class "kimi" {
115
115
  native-kimi-k3-reasoning #true
116
116
  clamp-output-to-model-max #true
117
117
  }
118
+ // Native K3 accepts forced tools on the Anthropic surface too;
119
+ // omitting thinking leaves its mandatory provider default intact.
120
+ on-api "anthropic-messages" {
121
+ family "k3" {
122
+ supports-forced-tool-choice #true
123
+ }
124
+ }
118
125
  }
119
126
  }
@@ -3,13 +3,13 @@
3
3
  class "meta" {
4
4
  // Exact ids on purpose: only an exact selector upgrades hosts whose
5
5
  // discovery misreports a Muse Spark revision as non-reasoning.
6
- // muse-spark-1.3 exposes the max effort tier; older/contributor revisions
7
- // keep the 5-tier ladder.
8
- models "muse-spark-1.3" {
6
+ // muse-spark-1.3 standard and contributor expose the max effort tier;
7
+ // older revisions keep the 5-tier ladder.
8
+ models "muse-spark-1.3" "muse-spark-1.3-contributor" {
9
9
  thinking-efforts "minimal" "low" "medium" "high" "xhigh" "max"
10
10
  thinking-mode "effort"
11
11
  }
12
- models "muse-spark-1.1" "muse-spark-1.2" "muse-spark-1.2-contributor" "muse-spark-1.3-contributor" {
12
+ models "muse-spark-1.1" "muse-spark-1.2" "muse-spark-1.2-contributor" {
13
13
  thinking-efforts "minimal" "low" "medium" "high" "xhigh"
14
14
  thinking-mode "effort"
15
15
  }
@@ -1,9 +1,15 @@
1
1
  // Model-lineage compat for "openai"; regenerated from the frozen census using class taxonomy selectors.
2
2
 
3
3
  class "openai" {
4
- // Replaces the o-series mandatory-reasoning fallback.
4
+ // Replaces the o-series mandatory-reasoning fallback. o-series and GPT-5+
5
+ // reject explicit sampling params (`temperature`, `top_p`) with a 400 on
6
+ // every serving host (#5606), whichever API fronts them.
5
7
  family "o-series" {
6
8
  thinking-requires-effort #true
9
+ supports-sampling-params #false
10
+ }
11
+ revision ">=5" {
12
+ supports-sampling-params #false
7
13
  }
8
14
  // GPT wire ladders are model generations, not host contracts: <5.2 keeps
9
15
  // the classic four-tier scale, 5.2+ drops minimal for xhigh, and 5.6+
@@ -81,3 +87,105 @@ class "openai" {
81
87
  }
82
88
  }
83
89
  }
90
+
91
+ // GPT-5.2+ bills images in 32px patches × 1.2, sized per `detail` level:
92
+ // https://developers.openai.com/api/docs/guides/images-vision#calculating-costs
93
+ // Older lines carry no lineage rule and bill at their wire API's fallback
94
+ // (providers/image-tokenization.kdl).
95
+ class "openai" {
96
+ // gpt-5.6 sizing, shared by later lines. `<10` keeps separator-collapsed
97
+ // revisions (`openai-gpt-52-codex` parses as 52) off the 5.6+ sizing.
98
+ revision ">=5.6 <10" {
99
+ image-tokenization {
100
+ regime "openai-patch"
101
+ multiplier 1.2
102
+ auto "original"
103
+ low {
104
+ max-edge 512
105
+ }
106
+ high {
107
+ max-edge 2048
108
+ patch-budget 2500
109
+ }
110
+ original {
111
+ max-edge 65535
112
+ }
113
+ }
114
+ }
115
+ revision "=5.5" {
116
+ image-tokenization {
117
+ regime "openai-patch"
118
+ multiplier 1.2
119
+ auto "original"
120
+ low {
121
+ max-edge 512
122
+ }
123
+ high {
124
+ max-edge 2048
125
+ patch-budget 2500
126
+ }
127
+ original {
128
+ max-edge 6000
129
+ patch-budget 10000
130
+ }
131
+ }
132
+ }
133
+ // gpt-5.4: `auto` sizes like `high`, and `low` keeps a 6,144-patch budget.
134
+ revision "=5.4" {
135
+ image-tokenization {
136
+ regime "openai-patch"
137
+ multiplier 1.2
138
+ auto "high"
139
+ low {
140
+ max-edge 2048
141
+ patch-budget 6144
142
+ }
143
+ high {
144
+ max-edge 2048
145
+ patch-budget 2500
146
+ }
147
+ original {
148
+ max-edge 6000
149
+ patch-budget 10000
150
+ }
151
+ }
152
+ }
153
+ // gpt-5.2 (and the 5.3 Codex SKU) size every level the same way.
154
+ revision ">=5.2 <5.4" {
155
+ image-tokenization {
156
+ regime "openai-patch"
157
+ multiplier 1.2
158
+ auto "high"
159
+ low {
160
+ max-edge 2048
161
+ patch-budget 6144
162
+ }
163
+ high {
164
+ max-edge 2048
165
+ patch-budget 6144
166
+ }
167
+ original {
168
+ max-edge 2048
169
+ patch-budget 6144
170
+ }
171
+ }
172
+ }
173
+ // residue: astra's limits differ from the rest of its revision.
174
+ models "*gpt-6-astra*" {
175
+ image-tokenization {
176
+ regime "openai-patch"
177
+ multiplier 1.2
178
+ auto "original"
179
+ low {
180
+ max-edge 512
181
+ }
182
+ high {
183
+ max-edge 65535
184
+ patch-budget 2500
185
+ }
186
+ original {
187
+ max-edge 65535
188
+ }
189
+ }
190
+ }
191
+ }
@@ -36,8 +36,6 @@ provider "amazon-bedrock" {
36
36
  }
37
37
  class "openai" {
38
38
  thinking-mode "effort"
39
- // OpenAI models reject Converse image blocks nested inside toolResult content.
40
- requires-tool-result-image-hoisting #true
41
39
  }
42
40
  class "deepseek" {
43
41
  requires-reasoning-content-for-all-assistant-turns #true
@@ -51,11 +49,6 @@ provider "amazon-bedrock" {
51
49
  class "unknown" {
52
50
  thinking-efforts "minimal" "low" "medium" "high"
53
51
  thinking-mode "budget"
54
- // Opaque application-inference-profile ARNs carry no vendor signal, so an
55
- // OpenAI-backed profile classifies here and would otherwise nest images in
56
- // toolResult content and hit the same rejection. Hoisting is accepted by
57
- // every Converse model measured, so it is the safe default for unknowns.
58
- requires-tool-result-image-hoisting #true
59
52
  }
60
53
  // residue: taxonomy ranks and exact globs do not isolate these models.
61
54
  models "moonshot.kimi-k2-thinking" {
@@ -28,12 +28,14 @@ provider "cursor" {
28
28
  }
29
29
  }
30
30
  // GetUsableModels advertises no input modalities or context windows.
31
- // K3 (including the bare `k3` alias Cursor serves) is natively
32
- // multimodal and 1M-context.
31
+ // Reviewed full-context K3 aliases are multimodal and 1M-context.
32
+ // K3 family identity alone does not verify other Cursor SKUs such as k3-256k.
33
33
  class "kimi" {
34
34
  family "k3" {
35
- input-modalities "text" "image"
36
- context-window-floor 1000000
35
+ models "*kimi-k3*" "k3" "*/k3" {
36
+ input-modalities "text" "image"
37
+ context-window-floor 1000000
38
+ }
37
39
  }
38
40
  family "k2.7-code" {
39
41
  // Cursor advertised Kimi K2.7 Code Context window 262k.
@@ -56,10 +58,6 @@ provider "cursor" {
56
58
  context-window-floor 272000
57
59
  }
58
60
  }
59
- models "k3" "*/k3" {
60
- input-modalities "text" "image"
61
- context-window-floor 1000000
62
- }
63
61
  models "default" {
64
62
  context-window-floor 256000
65
63
  }
@@ -2,6 +2,9 @@
2
2
 
3
3
  provider "google-antigravity" {
4
4
  default-model "gemini-3.1-pro"
5
+ // `fetchAvailableModels` is the account's served roster; bundled rows it
6
+ // omits (e.g. Claude 5.5 on plans without it) 404 on every request (#14328).
7
+ dynamic-models-authoritative #true
5
8
  kind-apis {
6
9
  image "google-gemini-cli"
7
10
  }
@@ -64,7 +67,11 @@ provider "google-antigravity" {
64
67
  models "gemini-3-pro" {
65
68
  thinking-mode "google-level"
66
69
  }
67
- models "gemini-3-pro-image" {
70
+ // Antigravity discovery lists image SKUs beside chat models with no output
71
+ // modality, so they would build as chat. Accounts advertise either SKU in
72
+ // `imageGenerationModelIds` (gemini-3.1-flash-image replaced
73
+ // gemini-3-pro-image on some accounts, #11106).
74
+ models "gemini-3-pro-image" "gemini-3.1-flash-image" {
68
75
  kind "image"
69
76
  }
70
77
  // residue: taxonomy ranks and exact globs do not isolate these models.
@@ -0,0 +1,42 @@
1
+ // Image billing for readers whose lineage has no `image-tokenization` rule in
2
+ // classes/*.kdl, by the wire API carrying the request. priority=-1: these are
3
+ // fallbacks, so a class-wide lineage rule (same specificity) always wins.
4
+
5
+ // OpenAI-compatible wires bill like GPT-5.5: 32px patches × 1.2, `auto` sized
6
+ // like `original`.
7
+ on-api "openai-completions" "openai-responses" "openai-codex-responses" "azure-openai-responses" priority=-1 {
8
+ image-tokenization {
9
+ regime "openai-patch"
10
+ multiplier 1.2
11
+ auto "original"
12
+ low {
13
+ max-edge 512
14
+ }
15
+ high {
16
+ max-edge 2048
17
+ patch-budget 2500
18
+ }
19
+ original {
20
+ max-edge 6000
21
+ patch-budget 10000
22
+ }
23
+ }
24
+ }
25
+
26
+ // Google wires bill Gemini 3's fixed `media_resolution` budget per image.
27
+ on-api "google-generative-ai" "google-gemini-cli" "google-vertex" priority=-1 {
28
+ image-tokenization {
29
+ regime "fixed"
30
+ tokens 1120
31
+ }
32
+ }
33
+
34
+ // Anthropic wires and every other adapter bill Claude's high-res tier, the
35
+ // largest per-image bill, so an unpriced reader is never undercounted.
36
+ on-api "anthropic-messages" "bedrock-converse-stream" "openrouter" "ollama-chat" "cursor-agent" "factory-droid-agent" "gitlab-duo-agent" "devin-agent" "apple-foundation-models" priority=-1 {
37
+ image-tokenization {
38
+ regime "anthropic-patch"
39
+ max-edge 2576
40
+ max-tokens 4784
41
+ }
42
+ }
@@ -42,8 +42,8 @@ provider "meta" {
42
42
  supports-reasoning-effort #true
43
43
  include-encrypted-reasoning #true
44
44
  }
45
- // Meta documents the `max` effort tier for Muse Spark 1.3 (standard) only;
46
- // contributor tiers and other revisions stay on the 5-tier ladder.
45
+ // Meta documents the `max` effort tier for Muse Spark 1.3 standard and
46
+ // contributor tiers; other revisions stay on the 5-tier ladder.
47
47
  model "muse-spark-1.3" name="Muse Spark 1.3" {
48
48
  reasoning #true
49
49
  input "text" "image"
@@ -60,7 +60,7 @@ provider "meta" {
60
60
  cost input=0.1 output=0.2 cache-read=0.002 cache-write=0
61
61
  limits context=1048576 max-tokens=131072
62
62
  thinking-mode "effort"
63
- thinking-efforts "minimal" "low" "medium" "high" "xhigh"
63
+ thinking-efforts "minimal" "low" "medium" "high" "xhigh" "max"
64
64
  supports-reasoning-effort #true
65
65
  include-encrypted-reasoning #true
66
66
  }