@oh-my-pi/pi-catalog 17.3.7 → 17.4.0

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 (79) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/types/build.d.ts +5 -0
  3. package/dist/types/discovery/cursor-proto.d.ts +5362 -0
  4. package/dist/types/discovery/devin-proto.d.ts +1549 -0
  5. package/dist/types/discovery/index.d.ts +1 -0
  6. package/dist/types/discovery/protobuf.d.ts +102 -0
  7. package/dist/types/identity/family.d.ts +23 -1
  8. package/dist/types/index.d.ts +1 -0
  9. package/dist/types/model-thinking.d.ts +6 -2
  10. package/dist/types/model-tokenizer.d.ts +8 -0
  11. package/dist/types/provider-models/descriptors.d.ts +1 -0
  12. package/dist/types/types.d.ts +27 -1
  13. package/dist/types/variant-collapse.d.ts +2 -0
  14. package/package.json +5 -6
  15. package/src/build.ts +7 -0
  16. package/src/compat/openai.ts +27 -1
  17. package/src/discovery/codex.ts +118 -24
  18. package/src/discovery/cursor-proto.ts +8322 -0
  19. package/src/discovery/cursor.ts +16 -3
  20. package/src/discovery/devin-proto.ts +2037 -0
  21. package/src/discovery/devin.ts +4 -3
  22. package/src/discovery/index.ts +1 -0
  23. package/src/discovery/protobuf.ts +1073 -0
  24. package/src/hosts.ts +22 -1
  25. package/src/identity/family.ts +42 -1
  26. package/src/index.ts +1 -0
  27. package/src/model-cache.ts +67 -6
  28. package/src/model-thinking.ts +38 -6
  29. package/src/model-tokenizer.ts +75 -0
  30. package/src/models.json +185055 -2118
  31. package/src/models.ts +6 -5
  32. package/src/provider-models/bundled-references.ts +12 -2
  33. package/src/provider-models/cache-provider-id.ts +3 -1
  34. package/src/provider-models/descriptors.ts +1 -0
  35. package/src/provider-models/openai-compat.ts +194 -44
  36. package/src/types.ts +36 -0
  37. package/src/variant-collapse.ts +67 -34
  38. package/dist/types/discovery/cursor-gen/agent_pb.d.ts +0 -16769
  39. package/dist/types/discovery/devin-gen/buf/validate/validate_pb.d.ts +0 -1715
  40. package/dist/types/discovery/devin-gen/exa/analytics_pb/analytics_pb.d.ts +0 -693
  41. package/dist/types/discovery/devin-gen/exa/api_server_pb/api_server_pb.d.ts +0 -9158
  42. package/dist/types/discovery/devin-gen/exa/auth_pb/auth_pb.d.ts +0 -52
  43. package/dist/types/discovery/devin-gen/exa/auto_cascade_common_pb/auto_cascade_common_pb.d.ts +0 -276
  44. package/dist/types/discovery/devin-gen/exa/bug_checker_pb/bug_checker_pb.d.ts +0 -78
  45. package/dist/types/discovery/devin-gen/exa/cascade_plugins_pb/cascade_plugins_pb.d.ts +0 -999
  46. package/dist/types/discovery/devin-gen/exa/chat_pb/chat_pb.d.ts +0 -1704
  47. package/dist/types/discovery/devin-gen/exa/code_edit/code_edit_pb/code_edit_pb.d.ts +0 -656
  48. package/dist/types/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb.d.ts +0 -15014
  49. package/dist/types/discovery/devin-gen/exa/context_module_pb/context_module_pb.d.ts +0 -607
  50. package/dist/types/discovery/devin-gen/exa/cortex_pb/cortex_pb.d.ts +0 -11830
  51. package/dist/types/discovery/devin-gen/exa/diff_action_pb/diff_action_pb.d.ts +0 -248
  52. package/dist/types/discovery/devin-gen/exa/index_pb/index_pb.d.ts +0 -1747
  53. package/dist/types/discovery/devin-gen/exa/knowledge_base_pb/knowledge_base_pb.d.ts +0 -509
  54. package/dist/types/discovery/devin-gen/exa/language_server_pb/language_server_pb.d.ts +0 -9048
  55. package/dist/types/discovery/devin-gen/exa/opensearch_clients_pb/opensearch_clients_pb.d.ts +0 -1760
  56. package/dist/types/discovery/devin-gen/exa/prompt_pb/prompt_pb.d.ts +0 -286
  57. package/dist/types/discovery/devin-gen/exa/reactive_component_pb/reactive_component_pb.d.ts +0 -405
  58. package/dist/types/discovery/devin-gen/exa/trust_pb/trust_pb.d.ts +0 -582
  59. package/src/discovery/cursor-gen/agent_pb.ts +0 -19513
  60. package/src/discovery/devin-gen/buf/validate/validate_pb.ts +0 -1862
  61. package/src/discovery/devin-gen/exa/analytics_pb/analytics_pb.ts +0 -871
  62. package/src/discovery/devin-gen/exa/api_server_pb/api_server_pb.ts +0 -11083
  63. package/src/discovery/devin-gen/exa/auth_pb/auth_pb.ts +0 -71
  64. package/src/discovery/devin-gen/exa/auto_cascade_common_pb/auto_cascade_common_pb.ts +0 -348
  65. package/src/discovery/devin-gen/exa/bug_checker_pb/bug_checker_pb.ts +0 -103
  66. package/src/discovery/devin-gen/exa/cascade_plugins_pb/cascade_plugins_pb.ts +0 -1198
  67. package/src/discovery/devin-gen/exa/chat_pb/chat_pb.ts +0 -2063
  68. package/src/discovery/devin-gen/exa/code_edit/code_edit_pb/code_edit_pb.ts +0 -810
  69. package/src/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb.ts +0 -18354
  70. package/src/discovery/devin-gen/exa/context_module_pb/context_module_pb.ts +0 -732
  71. package/src/discovery/devin-gen/exa/cortex_pb/cortex_pb.ts +0 -14277
  72. package/src/discovery/devin-gen/exa/diff_action_pb/diff_action_pb.ts +0 -312
  73. package/src/discovery/devin-gen/exa/index_pb/index_pb.ts +0 -2106
  74. package/src/discovery/devin-gen/exa/knowledge_base_pb/knowledge_base_pb.ts +0 -623
  75. package/src/discovery/devin-gen/exa/language_server_pb/language_server_pb.ts +0 -10918
  76. package/src/discovery/devin-gen/exa/opensearch_clients_pb/opensearch_clients_pb.ts +0 -2125
  77. package/src/discovery/devin-gen/exa/prompt_pb/prompt_pb.ts +0 -361
  78. package/src/discovery/devin-gen/exa/reactive_component_pb/reactive_component_pb.ts +0 -450
  79. package/src/discovery/devin-gen/exa/trust_pb/trust_pb.ts +0 -712
@@ -1,12 +1,12 @@
1
1
  import * as http2 from "node:http2";
2
- import { create, fromBinary, toBinary } from "@bufbuild/protobuf";
3
2
  import { type } from "@oh-my-pi/omptype";
4
3
  import { isKimiK3ModelId } from "../identity";
5
4
  import { bareModelId, parseGlmModel, semverGte } from "../identity/classify";
6
5
  import { getBundledModels } from "../models";
7
6
  import { toModelSpec } from "../provider-models/bundled-references";
8
7
  import type { Model, ModelSpec } from "../types";
9
- import { GetUsableModelsRequestSchema, GetUsableModelsResponseSchema } from "./cursor-gen/agent_pb";
8
+ import { GetUsableModelsRequestSchema, GetUsableModelsResponseSchema } from "./cursor-proto";
9
+ import { create, fromBinary, toBinary } from "./protobuf";
10
10
 
11
11
  const CURSOR_DEFAULT_BASE_URL = "https://api2.cursor.sh";
12
12
  const CURSOR_DEFAULT_CLIENT_VERSION = "cli-2026.02.13-41ac335";
@@ -28,6 +28,15 @@ const CURSOR_MAX_MODE_1M_ID_PATTERN = /claude|gemini/;
28
28
  /** Kimi's official bare K3 id (`k3`, `kimi/k3`); `k3-256k` is the 256k SKU and stays out. */
29
29
  const CURSOR_KIMI_K3_BARE_ID_PATTERN = /(^|\/)k3$/i;
30
30
 
31
+ /**
32
+ * Versioned Cursor Grok ids (`cursor-grok-4.5`, `cursor-grok-4.6-high`) are
33
+ * reasoning models whose effort is carried in the per-tier sibling id.
34
+ * `GetUsableModels` ships no `thinkingDetails` and the bundled references read
35
+ * `reasoning: false`, so classification falls back to the id. The non-reasoning
36
+ * `grok-code-*` coding models lack the version digit and stay out.
37
+ */
38
+ const CURSOR_GROK_REASONING_ID_PATTERN = /^cursor-grok-\d/i;
39
+
31
40
  /**
32
41
  * Model-id families whose native catalogs (anthropic, openai/openai-codex,
33
42
  * google) are multimodal. Cursor-only or text-only families (`composer-*`,
@@ -297,7 +306,11 @@ function normalizeCursorModel(
297
306
 
298
307
  const name = pickModelDisplayName(details, id);
299
308
  const reference = references.get(id);
300
- const reasoning = isKimiK3ModelId(id) || Boolean(details.thinkingDetails) || reference?.reasoning === true;
309
+ const reasoning =
310
+ isKimiK3ModelId(id) ||
311
+ CURSOR_GROK_REASONING_ID_PATTERN.test(id) ||
312
+ Boolean(details.thinkingDetails) ||
313
+ reference?.reasoning === true;
301
314
 
302
315
  if (reference) {
303
316
  return {