@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.
- package/CHANGELOG.md +36 -0
- package/dist/types/build.d.ts +5 -0
- package/dist/types/discovery/cursor-proto.d.ts +5362 -0
- package/dist/types/discovery/devin-proto.d.ts +1549 -0
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/discovery/protobuf.d.ts +102 -0
- package/dist/types/identity/family.d.ts +23 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model-thinking.d.ts +6 -2
- package/dist/types/model-tokenizer.d.ts +8 -0
- package/dist/types/provider-models/descriptors.d.ts +1 -0
- package/dist/types/types.d.ts +27 -1
- package/dist/types/variant-collapse.d.ts +2 -0
- package/package.json +5 -6
- package/src/build.ts +7 -0
- package/src/compat/openai.ts +27 -1
- package/src/discovery/codex.ts +118 -24
- package/src/discovery/cursor-proto.ts +8322 -0
- package/src/discovery/cursor.ts +16 -3
- package/src/discovery/devin-proto.ts +2037 -0
- package/src/discovery/devin.ts +4 -3
- package/src/discovery/index.ts +1 -0
- package/src/discovery/protobuf.ts +1073 -0
- package/src/hosts.ts +22 -1
- package/src/identity/family.ts +42 -1
- package/src/index.ts +1 -0
- package/src/model-cache.ts +67 -6
- package/src/model-thinking.ts +38 -6
- package/src/model-tokenizer.ts +75 -0
- package/src/models.json +185055 -2118
- package/src/models.ts +6 -5
- package/src/provider-models/bundled-references.ts +12 -2
- package/src/provider-models/cache-provider-id.ts +3 -1
- package/src/provider-models/descriptors.ts +1 -0
- package/src/provider-models/openai-compat.ts +194 -44
- package/src/types.ts +36 -0
- package/src/variant-collapse.ts +67 -34
- package/dist/types/discovery/cursor-gen/agent_pb.d.ts +0 -16769
- package/dist/types/discovery/devin-gen/buf/validate/validate_pb.d.ts +0 -1715
- package/dist/types/discovery/devin-gen/exa/analytics_pb/analytics_pb.d.ts +0 -693
- package/dist/types/discovery/devin-gen/exa/api_server_pb/api_server_pb.d.ts +0 -9158
- package/dist/types/discovery/devin-gen/exa/auth_pb/auth_pb.d.ts +0 -52
- package/dist/types/discovery/devin-gen/exa/auto_cascade_common_pb/auto_cascade_common_pb.d.ts +0 -276
- package/dist/types/discovery/devin-gen/exa/bug_checker_pb/bug_checker_pb.d.ts +0 -78
- package/dist/types/discovery/devin-gen/exa/cascade_plugins_pb/cascade_plugins_pb.d.ts +0 -999
- package/dist/types/discovery/devin-gen/exa/chat_pb/chat_pb.d.ts +0 -1704
- package/dist/types/discovery/devin-gen/exa/code_edit/code_edit_pb/code_edit_pb.d.ts +0 -656
- package/dist/types/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb.d.ts +0 -15014
- package/dist/types/discovery/devin-gen/exa/context_module_pb/context_module_pb.d.ts +0 -607
- package/dist/types/discovery/devin-gen/exa/cortex_pb/cortex_pb.d.ts +0 -11830
- package/dist/types/discovery/devin-gen/exa/diff_action_pb/diff_action_pb.d.ts +0 -248
- package/dist/types/discovery/devin-gen/exa/index_pb/index_pb.d.ts +0 -1747
- package/dist/types/discovery/devin-gen/exa/knowledge_base_pb/knowledge_base_pb.d.ts +0 -509
- package/dist/types/discovery/devin-gen/exa/language_server_pb/language_server_pb.d.ts +0 -9048
- package/dist/types/discovery/devin-gen/exa/opensearch_clients_pb/opensearch_clients_pb.d.ts +0 -1760
- package/dist/types/discovery/devin-gen/exa/prompt_pb/prompt_pb.d.ts +0 -286
- package/dist/types/discovery/devin-gen/exa/reactive_component_pb/reactive_component_pb.d.ts +0 -405
- package/dist/types/discovery/devin-gen/exa/trust_pb/trust_pb.d.ts +0 -582
- package/src/discovery/cursor-gen/agent_pb.ts +0 -19513
- package/src/discovery/devin-gen/buf/validate/validate_pb.ts +0 -1862
- package/src/discovery/devin-gen/exa/analytics_pb/analytics_pb.ts +0 -871
- package/src/discovery/devin-gen/exa/api_server_pb/api_server_pb.ts +0 -11083
- package/src/discovery/devin-gen/exa/auth_pb/auth_pb.ts +0 -71
- package/src/discovery/devin-gen/exa/auto_cascade_common_pb/auto_cascade_common_pb.ts +0 -348
- package/src/discovery/devin-gen/exa/bug_checker_pb/bug_checker_pb.ts +0 -103
- package/src/discovery/devin-gen/exa/cascade_plugins_pb/cascade_plugins_pb.ts +0 -1198
- package/src/discovery/devin-gen/exa/chat_pb/chat_pb.ts +0 -2063
- package/src/discovery/devin-gen/exa/code_edit/code_edit_pb/code_edit_pb.ts +0 -810
- package/src/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb.ts +0 -18354
- package/src/discovery/devin-gen/exa/context_module_pb/context_module_pb.ts +0 -732
- package/src/discovery/devin-gen/exa/cortex_pb/cortex_pb.ts +0 -14277
- package/src/discovery/devin-gen/exa/diff_action_pb/diff_action_pb.ts +0 -312
- package/src/discovery/devin-gen/exa/index_pb/index_pb.ts +0 -2106
- package/src/discovery/devin-gen/exa/knowledge_base_pb/knowledge_base_pb.ts +0 -623
- package/src/discovery/devin-gen/exa/language_server_pb/language_server_pb.ts +0 -10918
- package/src/discovery/devin-gen/exa/opensearch_clients_pb/opensearch_clients_pb.ts +0 -2125
- package/src/discovery/devin-gen/exa/prompt_pb/prompt_pb.ts +0 -361
- package/src/discovery/devin-gen/exa/reactive_component_pb/reactive_component_pb.ts +0 -450
- package/src/discovery/devin-gen/exa/trust_pb/trust_pb.ts +0 -712
package/src/discovery/cursor.ts
CHANGED
|
@@ -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-
|
|
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 =
|
|
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 {
|