@linxiraos/pi-catalog 1.0.0 → 1.0.2
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 +88 -6
- package/package.json +98 -99
- package/src/build.ts +3 -3
- package/src/compat/openai.ts +0 -6
- package/src/discovery/antigravity.ts +5 -1
- package/src/discovery/openai-compatible.ts +21 -4
- package/src/identity/classify.ts +32 -9
- package/src/identity/family.ts +18 -4
- package/src/model-manager.ts +13 -2
- package/src/model-thinking.ts +15 -7
- package/src/models.json +7999 -2099
- package/src/models.ts +28 -14
- package/src/provider-models/bundled-references.ts +4 -2
- package/src/provider-models/openai-compat.ts +379 -301
- package/src/types.ts +24 -16
- package/src/variant-collapse.ts +34 -17
- package/src/wire/gemini-headers.ts +79 -18
- package/dist/types/build.d.ts +0 -14
- package/dist/types/compat/anthropic.d.ts +0 -18
- package/dist/types/compat/apply.d.ts +0 -7
- package/dist/types/compat/bedrock.d.ts +0 -3
- package/dist/types/compat/devin.d.ts +0 -9
- package/dist/types/compat/openai.d.ts +0 -26
- package/dist/types/discovery/antigravity.d.ts +0 -70
- package/dist/types/discovery/codex.d.ts +0 -36
- package/dist/types/discovery/cursor-gen/agent_pb.d.ts +0 -16769
- package/dist/types/discovery/cursor.d.ts +0 -23
- 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/dist/types/discovery/devin.d.ts +0 -24
- package/dist/types/discovery/gemini.d.ts +0 -25
- package/dist/types/discovery/gitlab-duo-workflow.d.ts +0 -30
- package/dist/types/discovery/index.d.ts +0 -5
- package/dist/types/discovery/openai-compatible.d.ts +0 -74
- package/dist/types/effort.d.ts +0 -10
- package/dist/types/fireworks-model-id.d.ts +0 -23
- package/dist/types/hosts.d.ts +0 -164
- package/dist/types/identity/bundled.d.ts +0 -3
- package/dist/types/identity/classify.d.ts +0 -69
- package/dist/types/identity/dialect.d.ts +0 -3
- package/dist/types/identity/family.d.ts +0 -181
- package/dist/types/identity/id.d.ts +0 -12
- package/dist/types/identity/index.d.ts +0 -8
- package/dist/types/identity/markers.d.ts +0 -4
- package/dist/types/identity/priority.d.ts +0 -1
- package/dist/types/identity/reference.d.ts +0 -29
- package/dist/types/index.d.ts +0 -17
- package/dist/types/model-cache.d.ts +0 -23
- package/dist/types/model-manager.d.ts +0 -77
- package/dist/types/model-thinking.d.ts +0 -66
- package/dist/types/models.d.ts +0 -12
- package/dist/types/provider-models/bundled-references.d.ts +0 -13
- package/dist/types/provider-models/cache-provider-id.d.ts +0 -9
- package/dist/types/provider-models/descriptor-types.d.ts +0 -76
- package/dist/types/provider-models/descriptors.d.ts +0 -504
- package/dist/types/provider-models/google.d.ts +0 -27
- package/dist/types/provider-models/index.d.ts +0 -7
- package/dist/types/provider-models/ollama.d.ts +0 -22
- package/dist/types/provider-models/openai-compat.d.ts +0 -599
- package/dist/types/provider-models/special.d.ts +0 -53
- package/dist/types/types.d.ts +0 -811
- package/dist/types/utils.d.ts +0 -20
- package/dist/types/variant-collapse.d.ts +0 -133
- package/dist/types/wire/alibaba-token-plan.d.ts +0 -22
- package/dist/types/wire/codex.d.ts +0 -42
- package/dist/types/wire/coreweave.d.ts +0 -12
- package/dist/types/wire/gemini-headers.d.ts +0 -37
- package/dist/types/wire/github-copilot.d.ts +0 -39
package/src/model-thinking.ts
CHANGED
|
@@ -63,9 +63,9 @@ const GEMINI_3_FLASH_EFFORTS: readonly Effort[] = [Effort.Minimal, Effort.Low, E
|
|
|
63
63
|
const GPT_5_2_PLUS_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High, Effort.XHigh];
|
|
64
64
|
const GPT_5_1_CODEX_MINI_EFFORTS: readonly Effort[] = [Effort.Medium, Effort.High];
|
|
65
65
|
const LOW_MEDIUM_HIGH_REASONING_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High];
|
|
66
|
-
/** Wire-exact `low`/`high`/`max` scale used by Kimi K3 and DeepSeek V4 Flash
|
|
66
|
+
/** Wire-exact `low`/`high`/`max` scale used by Kimi K3 and DeepSeek V4 (Flash and Pro, direct API and aggregators). */
|
|
67
67
|
const LOW_HIGH_MAX_REASONING_EFFORTS: readonly Effort[] = [Effort.Low, Effort.High, Effort.Max];
|
|
68
|
-
/** Wire-exact two-tier scale (`high`/`max`): GLM-5.2 on Z.ai/Umans/Ollama Cloud/Baseten, Sakana Fugu, DeepSeek
|
|
68
|
+
/** Wire-exact two-tier scale (`high`/`max`): GLM-5.2 on Z.ai/Umans/Ollama Cloud/Baseten, Sakana Fugu, older DeepSeek reasoners (V3.x/R1). */
|
|
69
69
|
const HIGH_MAX_REASONING_EFFORTS: readonly Effort[] = [Effort.High, Effort.Max];
|
|
70
70
|
/** OpenRouter's DeepSeek route accepts only `high`. */
|
|
71
71
|
const HIGH_ONLY_REASONING_EFFORTS: readonly Effort[] = [Effort.High];
|
|
@@ -366,14 +366,22 @@ function getModelDefinedEfforts<TApi extends Api>(
|
|
|
366
366
|
if (spec.provider === "ollama") {
|
|
367
367
|
return OLLAMA_REASONING_EFFORTS;
|
|
368
368
|
}
|
|
369
|
-
if (
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
//
|
|
369
|
+
if (
|
|
370
|
+
(isOpenAICompatReasoningApi(spec.api) || (spec.api === "ollama-chat" && spec.provider === "ollama-cloud")) &&
|
|
371
|
+
isDeepseekReasoningModel(spec)
|
|
372
|
+
) {
|
|
373
|
+
// DeepSeek V4 (Flash and Pro) accepts the wire-exact low/high/max ladder
|
|
374
|
+
// on every first-party/aggregator host — the direct API, aggregators, and
|
|
375
|
+
// Ollama Cloud alike (medium/xhigh fold into high, max is a real wire
|
|
376
|
+
// tier). See https://api-docs.deepseek.com/api/create-chat-completion.
|
|
377
|
+
// OpenRouter's non-Flash V4 route still exposes only high; the older
|
|
378
|
+
// reasoners (V3.x, R1, deepseek-reasoner) top out at high/max.
|
|
374
379
|
if (isDeepseekV4FlashModelId(spec.id)) {
|
|
375
380
|
return LOW_HIGH_MAX_REASONING_EFFORTS;
|
|
376
381
|
}
|
|
382
|
+
if (bareModelId(spec.id).toLowerCase().includes("deepseek-v4")) {
|
|
383
|
+
return isOpenRouterThinkingFormat(compat) ? HIGH_ONLY_REASONING_EFFORTS : LOW_HIGH_MAX_REASONING_EFFORTS;
|
|
384
|
+
}
|
|
377
385
|
return isOpenRouterThinkingFormat(compat) ? HIGH_ONLY_REASONING_EFFORTS : HIGH_MAX_REASONING_EFFORTS;
|
|
378
386
|
}
|
|
379
387
|
if (spec.provider === "baseten" && isOpenAIGptOssModelId(spec.id)) {
|