@oh-my-pi/pi-catalog 17.2.10 → 17.2.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
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [17.2.11] - 2026-08-07
6
+
7
+ ### Fixed
8
+
9
+ - Increased the default stream idle-timeout floor on Amazon Bedrock to 900 seconds for reasoning and adaptive-thinking models (such as Claude) to prevent premature watchdog timeouts during long reasoning stretches.
10
+ - Fixed Devin model families (including SWE-1.7, Claude 5, Gemini 3.6 Flash, Kimi K3, Grok 4.5, and Inkling) to correctly group as logical models with reasoning-effort routing instead of separate wire variants.
11
+ - Added missing context-window and output-token limits for dynamically discovered Alibaba Token Plan models.
12
+
5
13
  ## [17.2.10] - 2026-08-06
6
14
 
7
15
  ### Changed
@@ -1,3 +1,3 @@
1
1
  import type { ModelSpec, ResolvedBedrockCompat } from "../types.js";
2
- /** Resolve Bedrock Converse prompt-cache capabilities once per model. */
2
+ /** Resolve Bedrock Converse prompt-cache and stream-watchdog compat once per model. */
3
3
  export declare function buildBedrockCompat(spec: ModelSpec<"bedrock-converse-stream">): ResolvedBedrockCompat;
@@ -342,6 +342,17 @@ export interface AlibabaCodingPlanModelManagerConfig {
342
342
  export declare function alibabaCodingPlanModelManagerOptions(config?: AlibabaCodingPlanModelManagerConfig): ModelManagerOptions<"openai-completions">;
343
343
  export { ALIBABA_TOKEN_PLAN_BASE_URL };
344
344
  export declare const ALIBABA_TOKEN_PLAN_STATIC_MODELS: readonly ModelSpec<"openai-completions">[];
345
+ /**
346
+ * Metadata for Alibaba Token Plan models that are dynamically discovered but not
347
+ * in the static catalog. Context window and max tokens are sourced from
348
+ * official model documentation and provider catalogs. Unknown future models
349
+ * remain available with null limits instead of assigning unsafe guessed limits.
350
+ */
351
+ export interface AlibabaTokenPlanModelLimits {
352
+ contextWindow: number;
353
+ maxTokens: number;
354
+ }
355
+ export declare const ALIBABA_TOKEN_PLAN_DISCOVERED_MODEL_LIMITS: Readonly<Record<string, AlibabaTokenPlanModelLimits>>;
345
356
  export interface AlibabaTokenPlanModelManagerConfig {
346
357
  apiKey?: string;
347
358
  baseUrl?: string;
@@ -478,6 +478,12 @@ export interface BedrockCompat {
478
478
  * Capability metadata only; zero means no explicit checkpoints.
479
479
  */
480
480
  promptCacheMaximumCheckpoints?: number;
481
+ /**
482
+ * Stream-watchdog idle-timeout fallback in ms; 0 disables the idle watchdog.
483
+ * Undefined defers to `PI_STREAM_IDLE_TIMEOUT_MS`, then the legacy
484
+ * `PI_OPENAI_STREAM_IDLE_TIMEOUT_MS` alias, then the 300s default.
485
+ */
486
+ streamIdleTimeoutMs?: number;
481
487
  }
482
488
  /** Fully-resolved Bedrock Converse prompt-cache capabilities, materialized once by `buildModel`. */
483
489
  export interface ResolvedBedrockCompat {
@@ -485,6 +491,13 @@ export interface ResolvedBedrockCompat {
485
491
  supportsLongPromptCacheRetention: boolean;
486
492
  promptCacheMinimumTokens: number;
487
493
  promptCacheMaximumCheckpoints: number;
494
+ /**
495
+ * Stream-watchdog idle-timeout fallback in ms for hosts with no keepalive
496
+ * events; 0 disables the idle watchdog. Undefined defers to
497
+ * `PI_STREAM_IDLE_TIMEOUT_MS`, then the legacy
498
+ * `PI_OPENAI_STREAM_IDLE_TIMEOUT_MS` alias, then the 300s default.
499
+ */
500
+ streamIdleTimeoutMs?: number;
488
501
  }
489
502
  /**
490
503
  * OpenRouter provider routing preferences.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-catalog",
4
- "version": "17.2.10",
4
+ "version": "17.2.11",
5
5
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@bufbuild/protobuf": "^2.12.1",
38
- "@oh-my-pi/omptype": "17.2.10",
39
- "@oh-my-pi/pi-utils": "17.2.10"
38
+ "@oh-my-pi/omptype": "17.2.11",
39
+ "@oh-my-pi/pi-utils": "17.2.11"
40
40
  },
41
41
  "devDependencies": {
42
- "@oh-my-pi/pi-ai": "17.2.10",
42
+ "@oh-my-pi/pi-ai": "17.2.11",
43
43
  "@types/bun": "^1.3.14"
44
44
  },
45
45
  "engines": {
@@ -1,3 +1,4 @@
1
+ import { supportsAdaptiveThinkingDisplay } from "../identity/family";
1
2
  import type { ModelSpec, ResolvedBedrockCompat } from "../types";
2
3
  import { applyCompatOverrides } from "./apply";
3
4
 
@@ -118,9 +119,35 @@ function detectedBedrockCompat(modelId: string): ResolvedBedrockCompat {
118
119
  return NO_EXPLICIT_CHECKPOINTS;
119
120
  }
120
121
 
121
- /** Resolve Bedrock Converse prompt-cache capabilities once per model. */
122
+ /**
123
+ * Bedrock ConverseStream sends no ping/keepalive events, so a reasoning model
124
+ * that goes quiet mid-thinking (summarized-display gaps, `omitted` thinking,
125
+ * or the wedged long tool-call generation of issue #4900) reads as a dead
126
+ * stream to the generic 300s idle watchdog and dies with "Provider stream
127
+ * stalled while waiting for the next event" (issue #4758's Bedrock variant).
128
+ * Widen the floor to 600s for reasoning models, mirroring the GLM coding-plan
129
+ * floor; explicit `spec.compat.streamIdleTimeoutMs` overrides still win.
130
+ */
131
+ const BEDROCK_REASONING_STREAM_IDLE_TIMEOUT_MS = 600_000;
132
+ /**
133
+ * Adaptive-thinking Claude (Opus 4.7+, Sonnet/Opus 5, Fable/Mythos 5) reasons
134
+ * for much longer stretches, and starting with Opus 4.7 / Fable 5 the
135
+ * Anthropic-side display default is `omitted` (issue #1373), so quiet gaps run
136
+ * longest on exactly this family — Fable 5 being the worst offender in the
137
+ * field. Direct Anthropic keeps these streams alive with ping keepalives and
138
+ * tolerates up to 3x the 300s idle budget of real-event silence (#4900);
139
+ * pingless Bedrock needs the same 900s tolerance in the raw idle floor.
140
+ */
141
+ const BEDROCK_ADAPTIVE_THINKING_STREAM_IDLE_TIMEOUT_MS = 900_000;
142
+
143
+ /** Resolve Bedrock Converse prompt-cache and stream-watchdog compat once per model. */
122
144
  export function buildBedrockCompat(spec: ModelSpec<"bedrock-converse-stream">): ResolvedBedrockCompat {
123
145
  const compat = { ...detectedBedrockCompat(spec.id) };
146
+ compat.streamIdleTimeoutMs = spec.reasoning
147
+ ? supportsAdaptiveThinkingDisplay(spec.id)
148
+ ? BEDROCK_ADAPTIVE_THINKING_STREAM_IDLE_TIMEOUT_MS
149
+ : BEDROCK_REASONING_STREAM_IDLE_TIMEOUT_MS
150
+ : undefined;
124
151
  applyCompatOverrides(compat, spec.compat);
125
152
  return compat;
126
153
  }
@@ -2834,6 +2834,64 @@ export const ALIBABA_TOKEN_PLAN_STATIC_MODELS: readonly ModelSpec<"openai-comple
2834
2834
  },
2835
2835
  ];
2836
2836
 
2837
+ /**
2838
+ * Metadata for Alibaba Token Plan models that are dynamically discovered but not
2839
+ * in the static catalog. Context window and max tokens are sourced from
2840
+ * official model documentation and provider catalogs. Unknown future models
2841
+ * remain available with null limits instead of assigning unsafe guessed limits.
2842
+ */
2843
+ export interface AlibabaTokenPlanModelLimits {
2844
+ contextWindow: number;
2845
+ maxTokens: number;
2846
+ }
2847
+
2848
+ export const ALIBABA_TOKEN_PLAN_DISCOVERED_MODEL_LIMITS: Readonly<Record<string, AlibabaTokenPlanModelLimits>> = {
2849
+ "qwen3.6-plus": {
2850
+ contextWindow: 1_000_000,
2851
+ maxTokens: 65_536,
2852
+ },
2853
+ "qwen3.8-max": {
2854
+ contextWindow: 1_000_000,
2855
+ maxTokens: 131_072,
2856
+ },
2857
+ "deepseek-v4-flash": {
2858
+ contextWindow: 1_000_000,
2859
+ maxTokens: 384_000,
2860
+ },
2861
+ "deepseek-v4-flash-0731": {
2862
+ contextWindow: 1_000_000,
2863
+ maxTokens: 384_000,
2864
+ },
2865
+ "deepseek-v3.2": {
2866
+ contextWindow: 131_072,
2867
+ maxTokens: 65_536,
2868
+ },
2869
+ "glm-5.1": {
2870
+ contextWindow: 202_752,
2871
+ maxTokens: 128_000,
2872
+ },
2873
+ "glm-5": {
2874
+ contextWindow: 202_752,
2875
+ maxTokens: 16_384,
2876
+ },
2877
+ "kimi-k2.7-code": {
2878
+ contextWindow: 262_144,
2879
+ maxTokens: 262_144,
2880
+ },
2881
+ "kimi-k2.6": {
2882
+ contextWindow: 262_144,
2883
+ maxTokens: 262_144,
2884
+ },
2885
+ "kimi-k2.5": {
2886
+ contextWindow: 262_144,
2887
+ maxTokens: 98_304,
2888
+ },
2889
+ "minimax-m2.5": {
2890
+ contextWindow: 196_608,
2891
+ maxTokens: 32_768,
2892
+ },
2893
+ };
2894
+
2837
2895
  const ALIBABA_TOKEN_PLAN_NON_CHAT_MODEL_PREFIXES = [
2838
2896
  "fun-asr",
2839
2897
  "happyhorse-",
@@ -2888,10 +2946,19 @@ export function alibabaTokenPlanModelManagerOptions(
2888
2946
  baseUrl: defaults.baseUrl,
2889
2947
  };
2890
2948
  }
2891
- // DeepSeek V4 family models discovered dynamically need reasoning config
2892
- if (defaults.id.startsWith("deepseek-v4")) {
2949
+ const normalizedId = defaults.id.trim().toLowerCase();
2950
+ const limits = ALIBABA_TOKEN_PLAN_DISCOVERED_MODEL_LIMITS[normalizedId];
2951
+ const enriched = limits
2952
+ ? {
2953
+ ...defaults,
2954
+ contextWindow: limits.contextWindow,
2955
+ maxTokens: limits.maxTokens,
2956
+ }
2957
+ : defaults;
2958
+
2959
+ if (normalizedId.startsWith("deepseek-v4")) {
2893
2960
  return {
2894
- ...defaults,
2961
+ ...enriched,
2895
2962
  reasoning: true,
2896
2963
  thinking: {
2897
2964
  mode: "effort" as const,
@@ -2899,7 +2966,7 @@ export function alibabaTokenPlanModelManagerOptions(
2899
2966
  },
2900
2967
  };
2901
2968
  }
2902
- return defaults;
2969
+ return enriched;
2903
2970
  },
2904
2971
  fetch: config?.fetch,
2905
2972
  }),
package/src/types.ts CHANGED
@@ -518,6 +518,12 @@ export interface BedrockCompat {
518
518
  * Capability metadata only; zero means no explicit checkpoints.
519
519
  */
520
520
  promptCacheMaximumCheckpoints?: number;
521
+ /**
522
+ * Stream-watchdog idle-timeout fallback in ms; 0 disables the idle watchdog.
523
+ * Undefined defers to `PI_STREAM_IDLE_TIMEOUT_MS`, then the legacy
524
+ * `PI_OPENAI_STREAM_IDLE_TIMEOUT_MS` alias, then the 300s default.
525
+ */
526
+ streamIdleTimeoutMs?: number;
521
527
  }
522
528
 
523
529
  /** Fully-resolved Bedrock Converse prompt-cache capabilities, materialized once by `buildModel`. */
@@ -526,6 +532,13 @@ export interface ResolvedBedrockCompat {
526
532
  supportsLongPromptCacheRetention: boolean;
527
533
  promptCacheMinimumTokens: number;
528
534
  promptCacheMaximumCheckpoints: number;
535
+ /**
536
+ * Stream-watchdog idle-timeout fallback in ms for hosts with no keepalive
537
+ * events; 0 disables the idle watchdog. Undefined defers to
538
+ * `PI_STREAM_IDLE_TIMEOUT_MS`, then the legacy
539
+ * `PI_OPENAI_STREAM_IDLE_TIMEOUT_MS` alias, then the 300s default.
540
+ */
541
+ streamIdleTimeoutMs?: number;
529
542
  }
530
543
 
531
544
  /**
@@ -115,7 +115,7 @@ type DevinTierRoutes = Partial<Record<"off" | "minimal" | "low" | "medium" | "hi
115
115
 
116
116
  /** Devin families with a `-max` sibling: five wire tiers, `low` floor. */
117
117
  const DEVIN_FIVE_TIER_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High, Effort.XHigh, Effort.Max];
118
- /** Devin families topping out at `-xhigh` (pre-5.6 GPT, 5.6 fast lanes). */
118
+ /** Pre-5.6 Devin GPT families top out at `-xhigh`: four wire tiers, `low` floor. */
119
119
  const DEVIN_FOUR_TIER_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High, Effort.XHigh];
120
120
 
121
121
  function devinTierFamily(
@@ -172,8 +172,7 @@ function devinTierFamily(
172
172
 
173
173
  /**
174
174
  * GPT-5.6 (Luna/Sol/Terra) serves per-tier siblings for the full five-tier
175
- * `low..max` wire scale; user efforts route 1:1 onto them. Devin serves no
176
- * `-max-priority` sibling, so the fast family tops out at `xhigh`.
175
+ * `low..max` wire scale in both standard and fast lanes.
177
176
  */
178
177
  function devinGpt56Families(variant: "luna" | "sol" | "terra", name: string): readonly EffortVariantFamily[] {
179
178
  const base = `gpt-5-6-${variant}`;
@@ -200,8 +199,9 @@ function devinGpt56Families(variant: "luna" | "sol" | "terra", name: string): re
200
199
  medium: `${base}-medium-priority`,
201
200
  high: `${base}-high-priority`,
202
201
  xhigh: `${base}-xhigh-priority`,
202
+ max: `${base}-max-priority`,
203
203
  },
204
- DEVIN_FOUR_TIER_EFFORTS,
204
+ DEVIN_FIVE_TIER_EFFORTS,
205
205
  ),
206
206
  ];
207
207
  }
@@ -378,6 +378,54 @@ export const GEMINI_CLI_VARIANT_COLLAPSE_TABLE: VariantCollapseTable = {
378
378
  };
379
379
  export const DEVIN_VARIANT_COLLAPSE_TABLE: VariantCollapseTable = {
380
380
  families: [
381
+ devinTierFamily(
382
+ "claude-opus-5",
383
+ "Claude Opus 5",
384
+ {
385
+ low: "claude-opus-5-low",
386
+ medium: "claude-opus-5-medium",
387
+ high: "claude-opus-5-high",
388
+ xhigh: "claude-opus-5-xhigh",
389
+ max: "claude-opus-5-max",
390
+ },
391
+ DEVIN_FIVE_TIER_EFFORTS,
392
+ ),
393
+ devinTierFamily(
394
+ "claude-opus-5-fast",
395
+ "Claude Opus 5 Fast",
396
+ {
397
+ low: "claude-opus-5-low-fast",
398
+ medium: "claude-opus-5-medium-fast",
399
+ high: "claude-opus-5-high-fast",
400
+ xhigh: "claude-opus-5-xhigh-fast",
401
+ max: "claude-opus-5-max-fast",
402
+ },
403
+ DEVIN_FIVE_TIER_EFFORTS,
404
+ ),
405
+ devinTierFamily(
406
+ "claude-fable-5",
407
+ "Claude Fable 5",
408
+ {
409
+ low: "claude-5-fable-low",
410
+ medium: "claude-5-fable-medium",
411
+ high: "claude-5-fable-high",
412
+ xhigh: "claude-5-fable-xhigh",
413
+ max: "claude-5-fable-max",
414
+ },
415
+ DEVIN_FIVE_TIER_EFFORTS,
416
+ ),
417
+ devinTierFamily(
418
+ "claude-sonnet-5",
419
+ "Claude Sonnet 5",
420
+ {
421
+ low: "claude-sonnet-5-low",
422
+ medium: "claude-sonnet-5-medium",
423
+ high: "claude-sonnet-5-high",
424
+ xhigh: "claude-sonnet-5-xhigh",
425
+ max: "claude-sonnet-5-max",
426
+ },
427
+ DEVIN_FIVE_TIER_EFFORTS,
428
+ ),
381
429
  devinTierFamily(
382
430
  "claude-opus-4-7",
383
431
  "Claude Opus 4.7",
@@ -522,6 +570,48 @@ export const DEVIN_VARIANT_COLLAPSE_TABLE: VariantCollapseTable = {
522
570
  ...devinGpt56Families("luna", "GPT-5.6 Luna"),
523
571
  ...devinGpt56Families("sol", "GPT-5.6 Sol"),
524
572
  ...devinGpt56Families("terra", "GPT-5.6 Terra"),
573
+ devinTierFamily(
574
+ "kimi-k3",
575
+ "Kimi K3",
576
+ {
577
+ low: "kimi-k3-low",
578
+ high: "kimi-k3-high",
579
+ max: "kimi-k3-max",
580
+ },
581
+ [Effort.Low, Effort.High, Effort.Max],
582
+ ),
583
+ devinTierFamily(
584
+ "swe-1-7",
585
+ "SWE-1.7",
586
+ {
587
+ medium: "swe-1-7-medium",
588
+ max: "swe-1-7",
589
+ },
590
+ [Effort.Medium, Effort.Max],
591
+ ),
592
+ devinTierFamily(
593
+ "grok-4-5",
594
+ "Grok 4.5",
595
+ {
596
+ low: "grok-4-5-low",
597
+ medium: "grok-4-5-medium",
598
+ high: "grok-4-5-high",
599
+ },
600
+ [Effort.Low, Effort.Medium, Effort.High],
601
+ ),
602
+ devinTierFamily(
603
+ "inkling",
604
+ "Inkling",
605
+ {
606
+ off: "inkling-none",
607
+ low: "inkling-low",
608
+ medium: "inkling-medium",
609
+ high: "inkling-high",
610
+ xhigh: "inkling-xhigh",
611
+ max: "inkling-max",
612
+ },
613
+ DEVIN_FIVE_TIER_EFFORTS,
614
+ ),
525
615
  devinTierFamily(
526
616
  "gemini-3-1-pro",
527
617
  "Gemini 3.1 Pro",
@@ -542,6 +632,17 @@ export const DEVIN_VARIANT_COLLAPSE_TABLE: VariantCollapseTable = {
542
632
  },
543
633
  [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High],
544
634
  ),
635
+ devinTierFamily(
636
+ "gemini-3-6-flash",
637
+ "Gemini 3.6 Flash",
638
+ {
639
+ minimal: "gemini-3-6-flash-minimal",
640
+ low: "gemini-3-6-flash-low",
641
+ medium: "gemini-3-6-flash-medium",
642
+ high: "gemini-3-6-flash-high",
643
+ },
644
+ [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High],
645
+ ),
545
646
  devinTierFamily(
546
647
  "gemini-3-flash",
547
648
  "Gemini 3 Flash",