@oh-my-pi/pi-catalog 18.2.0 → 18.2.1

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 (41) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/types/compat/behavior.d.ts +11 -0
  3. package/dist/types/compat/types.d.ts +21 -0
  4. package/dist/types/discovery/antigravity.d.ts +10 -1
  5. package/dist/types/model-thinking.d.ts +7 -0
  6. package/dist/types/provider-models/openai-compat.d.ts +2 -0
  7. package/dist/types/types.d.ts +26 -1
  8. package/package.json +4 -4
  9. package/src/compat/axes.ts +14 -0
  10. package/src/compat/behavior.ts +22 -2
  11. package/src/compat/cascade.ts +3 -1
  12. package/src/compat/context-window.ts +11 -1
  13. package/src/compat/resolve.ts +42 -16
  14. package/src/compat/rules/README.md +3 -1
  15. package/src/compat/rules/classes/deepseek.kdl +9 -1
  16. package/src/compat/rules/classes/kimi.kdl +6 -0
  17. package/src/compat/rules/providers/alibaba-token-plan.kdl +16 -8
  18. package/src/compat/rules/providers/amazon-bedrock.kdl +30 -0
  19. package/src/compat/rules/providers/azure.kdl +6 -0
  20. package/src/compat/rules/providers/cerebras.kdl +10 -0
  21. package/src/compat/rules/providers/commandcode.kdl +20 -4
  22. package/src/compat/rules/providers/cursor.kdl +32 -0
  23. package/src/compat/rules/providers/deepseek.kdl +5 -5
  24. package/src/compat/rules/providers/google-vertex.kdl +15 -0
  25. package/src/compat/rules/providers/meta.kdl +3 -0
  26. package/src/compat/rules/providers/muse-code.kdl +3 -0
  27. package/src/compat/rules/providers/openrouter.kdl +6 -0
  28. package/src/compat/rules/runtime/behavior.kdl +17 -0
  29. package/src/compat/rules/taxonomy/deepseek.kdl +5 -0
  30. package/src/compat/rules.json +1 -1
  31. package/src/compat/types.ts +23 -0
  32. package/src/discovery/antigravity.ts +80 -43
  33. package/src/identity/bundled.ts +4 -3
  34. package/src/model-cache.ts +115 -37
  35. package/src/model-thinking.ts +10 -7
  36. package/src/models.json +1 -1
  37. package/src/provider-models/bundled-references.ts +4 -3
  38. package/src/provider-models/cache-provider-id.ts +14 -8
  39. package/src/provider-models/ollama.ts +11 -31
  40. package/src/provider-models/openai-compat.ts +94 -24
  41. package/src/types.ts +28 -0
@@ -1,6 +1,12 @@
1
1
  // Model-lineage compat for "kimi"; regenerated from the frozen census using class taxonomy selectors.
2
2
 
3
3
  class "kimi" {
4
+ // Kimi chat templates can revise bytes they have already streamed: a leaned-on
5
+ // thinking opener reclassifies visible text as reasoning, and native
6
+ // section/tool-call tokens are carved out of the visible channel mid-stream.
7
+ // Declared revision-possible so finished prose stays in the live viewport
8
+ // instead of retiring into native scrollback ahead of the turn.
9
+ stream-revision "possible"
4
10
  // Replaces the K2.6 reasoning stream-idle baseline on OpenAI-compatible routes.
5
11
  on "baseten" "cline-pass" "cloudflare-ai-gateway" "coreweave" "deepinfra" "firepass" "fireworks" \
6
12
  "huggingface" "moonshot" "novita" "nvidia" "opencode-go" "opencode-zen" "openrouter" \
@@ -114,10 +114,17 @@ provider "alibaba-token-plan" {
114
114
  models "deepseek-v4-pro" {
115
115
  thinking-format "qwen"
116
116
  }
117
- // residue: taxonomy ranks and exact globs do not isolate these models.
118
- models "qwen3.8-max" {
119
- thinking-default-level "xhigh"
120
- thinking-efforts "low" "medium" "xhigh"
117
+ // Max Preview rides only Alibaba's binary enable_thinking toggle: it stays on
118
+ // the Qwen dialect and must not emit an unsupported reasoning_effort field.
119
+ models "qwen3.8-max-preview" {
120
+ thinking-efforts "low" "high" "xhigh"
121
+ thinking-requires-effort #true
122
+ }
123
+ // Max and Flash steer thinking depth through the OpenAI reasoning_effort
124
+ // control and replay reasoning_content across turns (preserve_thinking
125
+ // defaults on for both).
126
+ models "qwen3.8-max" "qwen3.8-flash" {
127
+ replay-reasoning-content #true
121
128
  when-thinking {
122
129
  extra-body {
123
130
  enable_thinking #true
@@ -125,9 +132,10 @@ provider "alibaba-token-plan" {
125
132
  thinking-format "openai"
126
133
  }
127
134
  }
128
- // residue: taxonomy ranks and exact globs do not isolate these models.
129
- models "qwen3.8-max-preview" {
130
- thinking-efforts "low" "high" "xhigh"
131
- thinking-requires-effort #true
135
+ // Max exposes a distinct low/medium/xhigh ladder; Flash retains its
136
+ // provider-authored minimal/low/medium/high ladder.
137
+ models "qwen3.8-max" {
138
+ thinking-default-level "xhigh"
139
+ thinking-efforts "low" "medium" "xhigh"
132
140
  }
133
141
  }
@@ -3,7 +3,15 @@
3
3
  provider "amazon-bedrock" {
4
4
  default-model "us.anthropic.claude-opus-4-8"
5
5
 
6
+ // The Converse assembler positions content blocks by wire index
7
+ // (`amazon-bedrock.ts`), so a block can land above text already rendered.
8
+ stream-revision "possible"
6
9
  class "anthropic" {
10
+ family "fable" {
11
+ revision ">=5.1 <5.2" {
12
+ thinking-efforts "low" "medium" "high" "xhigh" "max"
13
+ }
14
+ }
7
15
  family "opus" {
8
16
  revision ">=4.6 <4.7" {
9
17
  thinking-mode "anthropic-adaptive"
@@ -42,4 +50,26 @@ provider "amazon-bedrock" {
42
50
  models "moonshot.kimi-k2-thinking" {
43
51
  thinking-requires-effort #true
44
52
  }
53
+ // The Qwen rows arrive with maxTokens copied from the upstream context
54
+ // window (262000 on a 262144 window), so a request that does not set an
55
+ // output budget of its own asks Bedrock for more than the model accepts
56
+ // and gets a 400 back ("you requested 262000 output tokens"). AWS
57
+ // publishes the real caps on the model cards — 8K for Qwen3-Next 80B A3B
58
+ // and Qwen3 VL 235B A22B, 16K for Qwen3 Coder Next — and the context
59
+ // windows already match, so only the output side needs patching (#12089).
60
+ models "qwen.qwen3-next-80b-a3b" {
61
+ limits-patch {
62
+ max-tokens 8000
63
+ }
64
+ }
65
+ models "qwen.qwen3-vl-235b-a22b" {
66
+ limits-patch {
67
+ max-tokens 8000
68
+ }
69
+ }
70
+ models "qwen.qwen3-coder-next" {
71
+ limits-patch {
72
+ max-tokens 16000
73
+ }
74
+ }
45
75
  }
@@ -19,4 +19,10 @@ provider "azure" {
19
19
  models "gpt-5.1-codex-mini" {
20
20
  thinking-efforts "medium" "high"
21
21
  }
22
+ // Azure Chat Completions rejects Astra reasoning whenever function tools are
23
+ // present; the documented escape hatch is an explicit `none` effort.
24
+ models "gpt-6-astra*" {
25
+ disable-reasoning-with-tools #true
26
+ reasoning-disable-mode "none-effort"
27
+ }
22
28
  }
@@ -16,6 +16,16 @@ provider "cerebras" {
16
16
  input-modalities "text" "image"
17
17
  }
18
18
  thinking-mode "effort"
19
+ // Cerebras accepts OpenAI `reasoning_effort`, not Qwen-native thinking
20
+ // fields such as `enable_thinking`.
21
+ class "qwen" {
22
+ thinking-format "openai"
23
+ }
24
+ // Qwen 3.8 accepts low/medium/high; `none` is its wire-only off value.
25
+ models "qwen-3.8-27b" {
26
+ thinking-efforts "low" "medium" "high"
27
+ reasoning-disable-mode "none-effort"
28
+ }
19
29
  // residue: taxonomy ranks and exact globs do not isolate these models.
20
30
  models "zai-glm-4.7" {
21
31
  thinking-efforts "minimal" "low" "medium" "high" "xhigh"
@@ -1,10 +1,13 @@
1
1
  // Command Code Provider API deployment contract. Model capabilities and effort
2
2
  // ladders follow command-code@1.44.0: the thinking-efforts below reproduce the
3
3
  // bundle's 36-id effort registry 1:1 (verified against its effort map), plus
4
- // the 5 Muse Spark lineage ids whose ladder OMP's classes/meta.kdl carries.
5
- // Every other served id exposes no effort dial upstream (`modelSupports-
6
- // ReasoningEffort` is false for them in the CLI), so a missing ladder here
7
- // is a deliberate absence, not a gap.
4
+ // the 5 Muse Spark lineage ids whose ladder OMP's classes/meta.kdl carries and
5
+ // `deepseek/deepseek-v4.1-flash`, which postdates that bundle (see its rule).
6
+ // Every id the 1.44.0 census serves without an effort dial keeps a missing
7
+ // ladder here as a deliberate absence, not a gap (`modelSupportsReasoning-
8
+ // Effort` is false for those ids in that bundle). Later bundles (1.53.0) hand
9
+ // dials to a few further ids — MiniMaxAI/MiniMax-M3 and meta/muse-spark-1.3's
10
+ // `max` — which stay out of this change.
8
11
  provider "commandcode" {
9
12
  default-model "claude-sonnet-4-6"
10
13
  env "COMMAND_CODE_API_KEY" "COMMANDCODE_API_KEY"
@@ -54,6 +57,19 @@ provider "commandcode" {
54
57
  supports-reasoning-effort #true
55
58
  thinking-efforts "low" "high" "max"
56
59
  }
60
+ // `deepseek/deepseek-v4.1-flash` postdates command-code@1.44.0, so it is
61
+ // absent from that bundle's effort registry; command-code@1.53.0 lists it
62
+ // in the same low/high/max group as Kimi K3 and GLM-5.3, and the live docs
63
+ // model table carries the same scale plus image input.
64
+ models "deepseek/deepseek-v4.1-flash" {
65
+ supports-reasoning-effort #true
66
+ thinking-efforts "low" "high" "max"
67
+ // The class's `token="vision"` exemption misses this id (its name
68
+ // carries no `vision` token) even though the deployment serves it with
69
+ // image input, so the opt-out is explicit here.
70
+ strip-image-input #false
71
+ input-modalities "text" "image"
72
+ }
57
73
  models "google/gemini-3.1-flash-lite" "google/gemini-3.5-flash" \
58
74
  "google/gemini-3.5-flash-lite" "google/gemini-3.6-flash" "google/gemini-3.7-flash" \
59
75
  "google/gemini-3.8-flash" "gpt-5.4-mini" "xai/grok-4.5" {
@@ -11,6 +11,15 @@ provider "cursor" {
11
11
  class "anthropic" {
12
12
  family "fable" {
13
13
  requires-cursor-tool-schema-projection #true
14
+ // Cursor advertised Context window 300k (Max 1M recovered elsewhere).
15
+ context-window-floor 300000
16
+ }
17
+ family "opus" {
18
+ revision ">=5 <6" {
19
+ // Cursor advertised Claude Opus 5 Context window 300k; Max 1M
20
+ // stays recovered on labeled/maxMode rows via Math.max.
21
+ context-window-floor 300000
22
+ }
14
23
  }
15
24
  }
16
25
  // GetUsableModels advertises no input modalities or context windows.
@@ -21,11 +30,34 @@ provider "cursor" {
21
30
  input-modalities "text" "image"
22
31
  context-window-floor 1000000
23
32
  }
33
+ family "k2.7-code" {
34
+ // Cursor advertised Kimi K2.7 Code Context window 262k.
35
+ context-window-floor 262000
36
+ }
37
+ }
38
+ class "xai" {
39
+ family "grok" {
40
+ revision ">=4.5 <4.7" {
41
+ // Cursor advertised Grok 4.5/4.6 Context window 256k (product
42
+ // cap; not xAI native 500k). Max context is unmarked.
43
+ context-window-floor 256000
44
+ }
45
+ }
46
+ }
47
+ class "openai" {
48
+ revision ">=5.6 <5.7" {
49
+ // Cursor advertised GPT-5.6 Sol/Terra/Luna Context window 272k;
50
+ // raises unlabeled -fast variants from the 200k default.
51
+ context-window-floor 272000
52
+ }
24
53
  }
25
54
  models "k3" "*/k3" {
26
55
  input-modalities "text" "image"
27
56
  context-window-floor 1000000
28
57
  }
58
+ models "default" {
59
+ context-window-floor 256000
60
+ }
29
61
  // Cursor-only families verified to accept selectedImages even though the
30
62
  // roster carries no modality metadata.
31
63
  models "cursor-grok-4" "cursor-grok-4.*" "cursor-grok-4-*" "cursor-grok-4:*" "cursor-grok-4_*" {
@@ -17,8 +17,8 @@ provider "deepseek" {
17
17
  // First-party peak USD / 1M tokens; all other UTC hours receive 50% off.
18
18
  // Source: https://api-docs.deepseek.com/quick_start/pricing (2026-09-10).
19
19
  // residue: the pricing page's Flash-priced names, not a taxonomy family: the
20
- // bare alias carries no family, and the retired `v4-flash`/`-vision-exp` ids
21
- // are still accepted and billed at the Flash card.
20
+ // retired `v4-flash`/`-vision-exp` ids are still accepted and billed at the
21
+ // Flash card.
22
22
  models "deepseek-flash" "deepseek-v4-flash" "deepseek-v4-flash-vision-exp" {
23
23
  clamp-output-to-model-max #true
24
24
  time-based-cost {
@@ -43,9 +43,9 @@ provider "deepseek" {
43
43
  cache-write 0
44
44
  }
45
45
  }
46
- // residue: upstream discovery has not seeded the bare alias's limits; the
47
- // pricing page documents this SKU (DeepSeek-V4.1-Flash) as 1M context / 384K
48
- // output, and without them the agent cannot enforce its context budget.
46
+ // residue: the pricing page documents this SKU (DeepSeek-V4.1-Flash) as 1M
47
+ // context / 384K output; pinned as a reviewed correction so the documented
48
+ // window survives an upstream metadata gap.
49
49
  models "deepseek-flash" {
50
50
  limits-patch {
51
51
  context-window 1000000
@@ -11,6 +11,21 @@ provider "google-vertex" {
11
11
  // Vertex rejects `output_config.effort` and its effort beta header;
12
12
  // replaces the provider checks in anthropic.ts request shaping.
13
13
  supports-output-effort #false
14
+
15
+ // Vertex rejects maxOutputTokens=65536 for the Gemini 2.5 Flash-Lite line
16
+ // with 400 "supported range is from 1 (inclusive) to 65536 (exclusive)";
17
+ // the 2.5 Flash/Pro siblings accept 65536 on the same endpoint (Pro does
18
+ // not validate the field at all), so only the Lite line is clamped here.
19
+ // Other hosts are unverified and keep the documented value.
20
+ class "gemini" {
21
+ family "lite" {
22
+ revision ">=2.5 <2.6" {
23
+ limits-patch {
24
+ max-tokens 65535
25
+ }
26
+ }
27
+ }
28
+ }
14
29
  class "anthropic" {
15
30
  revision ">=4.5 <4.6" {
16
31
  thinking-efforts "minimal" "low" "medium" "high" "xhigh"
@@ -69,6 +69,9 @@ provider "meta" {
69
69
  include-encrypted-reasoning #true
70
70
  supports-reasoning-effort #true
71
71
  clamp-output-to-model-max #true
72
+ // api.meta.ai/v1 accepts only tool_choice "auto"; "none", "required" and named
73
+ // choices are rejected with 400 (verified 2026-09-10), so omit the field.
74
+ supports-tool-choice #false
72
75
  class "unknown" {
73
76
  thinking-efforts "minimal" "low" "medium" "high" "xhigh"
74
77
  thinking-mode "effort"
@@ -12,6 +12,9 @@ provider "muse-code" {
12
12
  include-encrypted-reasoning #true
13
13
  supports-reasoning-effort #true
14
14
  clamp-output-to-model-max #true
15
+ // api.meta.ai/v1 accepts only tool_choice "auto"; "none", "required" and named
16
+ // choices are rejected with 400 (verified 2026-09-10), so omit the field.
17
+ supports-tool-choice #false
15
18
  // Subscription tier bills per request; the compact edit prompt cuts the
16
19
  // recurring tool-schema bytes. Verified 2026-09-05 against api.meta.ai/v1:
17
20
  // `custom` tools are rejected with 400 "`custom` tools are not supported
@@ -17,6 +17,12 @@ provider "openrouter" {
17
17
  // isOpenRouterAnthropicModel checks in the OpenAI request builders.
18
18
  retry-without-strict-on-grammar-error #true
19
19
  }
20
+ class "meta" {
21
+ family "muse-spark" {
22
+ filter-reasoning-history #true
23
+ allows-synthetic-reasoning-content-for-tool-calls #false
24
+ }
25
+ }
20
26
  class "minimax" {
21
27
  family "m3" {
22
28
  thinking-efforts "minimal" "low" "medium" "high"
@@ -20,6 +20,12 @@ behavior {
20
20
  // `opencode` provider in the picker.
21
21
  retired-providers "wafer-pass" "wandb" "opencode"
22
22
 
23
+ // ClinePass exposes gateway-specific limits, pricing, and reasoning
24
+ // controls; matching them by bare model id contaminates unrelated proxy
25
+ // models (a LiteLLM proxy serving `glm-5.3-flash`), so its rows are barred
26
+ // from seeding cross-provider bare-id enrichment references (#10932).
27
+ reference-isolated-providers "cline-pass"
28
+
23
29
  // Discovered Responses/Codex models receive these additional operations.
24
30
  model-operations provider="openai" {
25
31
  exact "o3"
@@ -83,6 +89,11 @@ behavior {
83
89
  glob="*/gpt-5.6-sol-pro" glob="*/gpt-5.6-luna" glob="*/gpt-5.6-luna-pro"
84
90
  }
85
91
 
92
+ // Z.AI and Zhipu emit timezone-naive account-reset wall clocks in Beijing
93
+ // time. Provider-aware retry paths append this offset before parsing.
94
+ retry-reset-timezone provider="zai" offset="+08:00"
95
+ retry-reset-timezone provider="zhipu-coding-plan" offset="+08:00"
96
+
86
97
  // Cloudflare AI Gateway namespace routing. The Workers AI prefix remains
87
98
  // on the request id; the upstream namespaces are stripped.
88
99
  api-routes provider="cloudflare-ai-gateway" {
@@ -102,6 +113,12 @@ behavior {
102
113
 
103
114
  // Provider-default wire model for model-less hosted search operations.
104
115
  hosted-default provider="kimi-search" model="kimi-for-coding"
116
+ // LiteLLM publishes task-specific endpoint models beside conversational
117
+ // models. Exact mode metadata avoids brittle model-name heuristics while
118
+ // unknown and malformed future values remain selectable.
119
+ exclude-discovery-modes "audio_speech" "audio_transcription" "batch" "embedding" "guardrail" \
120
+ "image_edit" "image_generation" "moderation" "ocr" "rerank" "search" "vector_store" \
121
+ "video_generation" provider="litellm"
105
122
  // models.dev rows OMP cannot route successfully: AWS does not document
106
123
  // the jp. Opus 5 profile, and the openai.gpt-5.x rows are Mantle-only
107
124
  // ids that Bedrock rejects or misroutes.
@@ -5,6 +5,11 @@ class "deepseek" {
5
5
  family "r1" glob="*deepseek-r1*"
6
6
  family "reasoner" glob="*deepseek-reasoner*"
7
7
  family "flash" glob="*deepseek*v4*flash*"
8
+ // V4.1 Flash dropped the generation digit from its release id: the native
9
+ // roster serves it as bare `deepseek-flash`, which the `v4` glob cannot
10
+ // match. Without a family the descriptor's V4-generation filter drops the
11
+ // row, so it survived only as a stale previous-snapshot entry.
12
+ family "flash" glob="*deepseek-flash"
8
13
  family "pro" glob="*deepseek*v4*pro*"
9
14
  // Bare V4 chat/reasoner ids without a flash/pro segment.
10
15
  family "v4" glob="*deepseek-v4*"