@linxiraos/pi-catalog 1.1.6 → 1.1.8
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 +10 -6
- package/README.md +9 -8
- package/dist/types/build.d.ts +13 -8
- package/dist/types/cline-pass-model-id.d.ts +4 -0
- package/dist/types/compat/anthropic.d.ts +10 -4
- package/dist/types/compat/auth-ids.d.ts +4 -0
- package/dist/types/compat/auth.d.ts +7 -0
- package/dist/types/compat/axes.d.ts +50 -0
- package/dist/types/compat/behavior.d.ts +69 -0
- package/dist/types/compat/cascade.d.ts +37 -0
- package/dist/types/{variant-collapse.d.ts → compat/collapse.d.ts} +60 -35
- package/dist/types/compat/openai.d.ts +7 -26
- package/dist/types/compat/resolve.d.ts +15 -0
- package/dist/types/compat/revision.d.ts +41 -0
- package/dist/types/compat/taxonomy.d.ts +93 -0
- package/dist/types/compat/types.d.ts +565 -0
- package/dist/types/discovery/antigravity.d.ts +1 -1
- package/dist/types/discovery/cursor-proto.d.ts +6 -6
- package/dist/types/discovery/cursor.d.ts +8 -0
- package/dist/types/discovery/devin-proto.d.ts +363 -0
- package/dist/types/discovery/gemini-cli.d.ts +1 -1
- package/dist/types/identity/id.d.ts +1 -0
- package/dist/types/identity/index.d.ts +3 -3
- package/dist/types/identity/reference.d.ts +0 -10
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model-thinking.d.ts +6 -24
- package/dist/types/provider-models/cline-pass.d.ts +22 -0
- package/dist/types/provider-models/descriptors.d.ts +20 -1
- package/dist/types/provider-models/models-dev-policies.d.ts +2 -1
- package/dist/types/provider-models/openai-compat.d.ts +59 -46
- package/dist/types/provider-models/special.d.ts +23 -2
- package/dist/types/types.d.ts +177 -13
- package/dist/types/wire/cline-pass.d.ts +21 -0
- package/dist/types/wire/devin-proto.d.ts +14 -0
- package/dist/types/wire/devin.d.ts +36 -0
- package/dist/types/wire/github-copilot.d.ts +31 -12
- package/package.json +6 -4
- package/src/build.ts +165 -48
- package/src/cline-pass-model-id.ts +11 -0
- package/src/compat/anthropic.ts +15 -136
- package/src/compat/auth-ids.ts +157 -0
- package/src/compat/auth.ts +60 -0
- package/src/compat/axes.ts +290 -0
- package/src/compat/behavior.ts +207 -0
- package/src/compat/cascade.ts +230 -0
- package/src/{variant-collapse.ts → compat/collapse.ts} +381 -773
- package/src/compat/openai.ts +17 -848
- package/src/compat/resolve.ts +1229 -0
- package/src/compat/revision.ts +154 -0
- package/src/compat/rules/README.md +315 -0
- package/src/compat/rules/auth/_order.kdl +13 -0
- package/src/compat/rules/auth/abliteration.kdl +9 -0
- package/src/compat/rules/auth/aiand.kdl +9 -0
- package/src/compat/rules/auth/aimlapi.kdl +3 -0
- package/src/compat/rules/auth/alibaba-coding-plan.kdl +5 -0
- package/src/compat/rules/auth/alibaba-token-plan.kdl +11 -0
- package/src/compat/rules/auth/amazon-bedrock.kdl +5 -0
- package/src/compat/rules/auth/anthropic.kdl +53 -0
- package/src/compat/rules/auth/azure.kdl +3 -0
- package/src/compat/rules/auth/baseten.kdl +9 -0
- package/src/compat/rules/auth/bedrock-mantle.kdl +5 -0
- package/src/compat/rules/auth/cerebras.kdl +9 -0
- package/src/compat/rules/auth/cline-pass.kdl +12 -0
- package/src/compat/rules/auth/cloudflare-ai-gateway.kdl +4 -0
- package/src/compat/rules/auth/coreweave.kdl +9 -0
- package/src/compat/rules/auth/cursor.kdl +5 -0
- package/src/compat/rules/auth/deepinfra.kdl +11 -0
- package/src/compat/rules/auth/deepseek.kdl +10 -0
- package/src/compat/rules/auth/devin.kdl +28 -0
- package/src/compat/rules/auth/exa.kdl +9 -0
- package/src/compat/rules/auth/firepass.kdl +14 -0
- package/src/compat/rules/auth/fireworks.kdl +16 -0
- package/src/compat/rules/auth/github-copilot.kdl +7 -0
- package/src/compat/rules/auth/gitlab-duo-agent.kdl +23 -0
- package/src/compat/rules/auth/gitlab-duo.kdl +24 -0
- package/src/compat/rules/auth/gmi-cloud.kdl +9 -0
- package/src/compat/rules/auth/google-antigravity.kdl +28 -0
- package/src/compat/rules/auth/google-gemini-cli.kdl +26 -0
- package/src/compat/rules/auth/google-vertex.kdl +5 -0
- package/src/compat/rules/auth/google.kdl +3 -0
- package/src/compat/rules/auth/groq.kdl +3 -0
- package/src/compat/rules/auth/huggingface.kdl +9 -0
- package/src/compat/rules/auth/kagi.kdl +9 -0
- package/src/compat/rules/auth/kilo.kdl +4 -0
- package/src/compat/rules/auth/kimi-code.kdl +18 -0
- package/src/compat/rules/auth/litellm.kdl +8 -0
- package/src/compat/rules/auth/llama.cpp.kdl +10 -0
- package/src/compat/rules/auth/lm-studio.kdl +7 -0
- package/src/compat/rules/auth/meta.kdl +9 -0
- package/src/compat/rules/auth/minimax-code-cn.kdl +9 -0
- package/src/compat/rules/auth/minimax-code.kdl +9 -0
- package/src/compat/rules/auth/minimax.kdl +3 -0
- package/src/compat/rules/auth/mistral.kdl +3 -0
- package/src/compat/rules/auth/moonshot.kdl +9 -0
- package/src/compat/rules/auth/nanogpt.kdl +9 -0
- package/src/compat/rules/auth/novita.kdl +12 -0
- package/src/compat/rules/auth/nvidia.kdl +11 -0
- package/src/compat/rules/auth/ollama-cloud.kdl +8 -0
- package/src/compat/rules/auth/ollama.kdl +9 -0
- package/src/compat/rules/auth/openai-codex-device.kdl +20 -0
- package/src/compat/rules/auth/openai-codex.kdl +33 -0
- package/src/compat/rules/auth/openai.kdl +3 -0
- package/src/compat/rules/auth/opencode-go.kdl +10 -0
- package/src/compat/rules/auth/opencode-zen.kdl +9 -0
- package/src/compat/rules/auth/openrouter.kdl +32 -0
- package/src/compat/rules/auth/parallel.kdl +9 -0
- package/src/compat/rules/auth/perplexity.kdl +7 -0
- package/src/compat/rules/auth/qianfan.kdl +9 -0
- package/src/compat/rules/auth/qwen-portal.kdl +9 -0
- package/src/compat/rules/auth/sakana.kdl +9 -0
- package/src/compat/rules/auth/siliconflow-cn.kdl +9 -0
- package/src/compat/rules/auth/siliconflow.kdl +9 -0
- package/src/compat/rules/auth/synthetic.kdl +9 -0
- package/src/compat/rules/auth/tavily.kdl +9 -0
- package/src/compat/rules/auth/together.kdl +14 -0
- package/src/compat/rules/auth/umans.kdl +9 -0
- package/src/compat/rules/auth/venice.kdl +9 -0
- package/src/compat/rules/auth/vercel-ai-gateway.kdl +8 -0
- package/src/compat/rules/auth/vllm.kdl +9 -0
- package/src/compat/rules/auth/wafer-serverless.kdl +11 -0
- package/src/compat/rules/auth/xai-oauth.kdl +27 -0
- package/src/compat/rules/auth/xai.kdl +9 -0
- package/src/compat/rules/auth/xiaomi-token-plan-ams.kdl +9 -0
- package/src/compat/rules/auth/xiaomi-token-plan-cn.kdl +9 -0
- package/src/compat/rules/auth/xiaomi-token-plan-sgp.kdl +9 -0
- package/src/compat/rules/auth/xiaomi.kdl +6 -0
- package/src/compat/rules/auth/yolo-auto.kdl +11 -0
- package/src/compat/rules/auth/zai-coding-plan.kdl +29 -0
- package/src/compat/rules/auth/zai.kdl +9 -0
- package/src/compat/rules/auth/zenmux.kdl +9 -0
- package/src/compat/rules/auth/zhipu-coding-plan.kdl +9 -0
- package/src/compat/rules/classes/amazon.kdl +21 -0
- package/src/compat/rules/classes/anthropic.kdl +285 -0
- package/src/compat/rules/classes/baidu.kdl +9 -0
- package/src/compat/rules/classes/bytedance.kdl +9 -0
- package/src/compat/rules/classes/cohere.kdl +7 -0
- package/src/compat/rules/classes/deepseek.kdl +80 -0
- package/src/compat/rules/classes/gemini.kdl +107 -0
- package/src/compat/rules/classes/gemma.kdl +14 -0
- package/src/compat/rules/classes/glm.kdl +115 -0
- package/src/compat/rules/classes/gpt-oss.kdl +16 -0
- package/src/compat/rules/classes/kimi.kdl +113 -0
- package/src/compat/rules/classes/meta.kdl +15 -0
- package/src/compat/rules/classes/mimo.kdl +32 -0
- package/src/compat/rules/classes/minimax.kdl +79 -0
- package/src/compat/rules/classes/mistral.kdl +19 -0
- package/src/compat/rules/classes/openai.kdl +42 -0
- package/src/compat/rules/classes/qwen.kdl +72 -0
- package/src/compat/rules/classes/stepfun.kdl +10 -0
- package/src/compat/rules/classes/xai.kdl +45 -0
- package/src/compat/rules/providers/abliteration.kdl +8 -0
- package/src/compat/rules/providers/aiand.kdl +19 -0
- package/src/compat/rules/providers/aimlapi.kdl +24 -0
- package/src/compat/rules/providers/alibaba-coding-plan.kdl +20 -0
- package/src/compat/rules/providers/alibaba-token-plan.kdl +35 -0
- package/src/compat/rules/providers/amazon-bedrock.kdl +36 -0
- package/src/compat/rules/providers/anthropic.kdl +24 -0
- package/src/compat/rules/providers/azure.kdl +19 -0
- package/src/compat/rules/providers/baseten.kdl +19 -0
- package/src/compat/rules/providers/bedrock-mantle.kdl +15 -0
- package/src/compat/rules/providers/cerebras.kdl +19 -0
- package/src/compat/rules/providers/cline-pass.kdl +8 -0
- package/src/compat/rules/providers/cloudflare-ai-gateway.kdl +26 -0
- package/src/compat/rules/providers/coreweave.kdl +16 -0
- package/src/compat/rules/providers/cursor.kdl +52 -0
- package/src/compat/rules/providers/deepseek.kdl +21 -0
- package/src/compat/rules/providers/firepass.kdl +15 -0
- package/src/compat/rules/providers/fireworks.kdl +43 -0
- package/src/compat/rules/providers/github-copilot.kdl +62 -0
- package/src/compat/rules/providers/gitlab-duo.kdl +24 -0
- package/src/compat/rules/providers/gmi-cloud.kdl +8 -0
- package/src/compat/rules/providers/google-antigravity.kdl +59 -0
- package/src/compat/rules/providers/google-gemini-cli.kdl +12 -0
- package/src/compat/rules/providers/google-vertex.kdl +25 -0
- package/src/compat/rules/providers/google.kdl +17 -0
- package/src/compat/rules/providers/groq.kdl +8 -0
- package/src/compat/rules/providers/huggingface.kdl +24 -0
- package/src/compat/rules/providers/kilo.kdl +51 -0
- package/src/compat/rules/providers/kimi-code.kdl +37 -0
- package/src/compat/rules/providers/llama.cpp.kdl +6 -0
- package/src/compat/rules/providers/lm-studio.kdl +6 -0
- package/src/compat/rules/providers/meta.kdl +10 -0
- package/src/compat/rules/providers/minimax-code-cn.kdl +13 -0
- package/src/compat/rules/providers/minimax-code.kdl +13 -0
- package/src/compat/rules/providers/minimax.kdl +6 -0
- package/src/compat/rules/providers/mistral.kdl +8 -0
- package/src/compat/rules/providers/moonshot.kdl +36 -0
- package/src/compat/rules/providers/nanogpt.kdl +100 -0
- package/src/compat/rules/providers/novita.kdl +34 -0
- package/src/compat/rules/providers/nvidia.kdl +27 -0
- package/src/compat/rules/providers/ollama-cloud.kdl +20 -0
- package/src/compat/rules/providers/ollama.kdl +12 -0
- package/src/compat/rules/providers/openai-codex.kdl +121 -0
- package/src/compat/rules/providers/openai.kdl +82 -0
- package/src/compat/rules/providers/opencode-go.kdl +97 -0
- package/src/compat/rules/providers/opencode-zen.kdl +103 -0
- package/src/compat/rules/providers/openrouter.kdl +66 -0
- package/src/compat/rules/providers/qianfan.kdl +8 -0
- package/src/compat/rules/providers/sakana.kdl +10 -0
- package/src/compat/rules/providers/synthetic.kdl +16 -0
- package/src/compat/rules/providers/together.kdl +22 -0
- package/src/compat/rules/providers/umans.kdl +28 -0
- package/src/compat/rules/providers/venice.kdl +46 -0
- package/src/compat/rules/providers/vercel-ai-gateway.kdl +73 -0
- package/src/compat/rules/providers/vllm.kdl +8 -0
- package/src/compat/rules/providers/wafer-serverless.kdl +35 -0
- package/src/compat/rules/providers/xai-oauth.kdl +48 -0
- package/src/compat/rules/providers/xai.kdl +50 -0
- package/src/compat/rules/providers/xiaomi-token-plan-ams.kdl +9 -0
- package/src/compat/rules/providers/xiaomi-token-plan-cn.kdl +9 -0
- package/src/compat/rules/providers/xiaomi-token-plan-sgp.kdl +9 -0
- package/src/compat/rules/providers/xiaomi.kdl +22 -0
- package/src/compat/rules/providers/yolo-auto.kdl +16 -0
- package/src/compat/rules/providers/zai.kdl +36 -0
- package/src/compat/rules/providers/zenmux.kdl +108 -0
- package/src/compat/rules/providers/zhipu-coding-plan.kdl +49 -0
- package/src/compat/rules/runtime/behavior.kdl +254 -0
- package/src/compat/rules/taxonomy/_collapse.kdl +747 -0
- package/src/compat/rules/taxonomy/_discovery.kdl +60 -0
- package/src/compat/rules/taxonomy/ai21.kdl +6 -0
- package/src/compat/rules/taxonomy/amazon.kdl +8 -0
- package/src/compat/rules/taxonomy/anthropic.kdl +17 -0
- package/src/compat/rules/taxonomy/baidu.kdl +5 -0
- package/src/compat/rules/taxonomy/bytedance.kdl +5 -0
- package/src/compat/rules/taxonomy/cohere.kdl +6 -0
- package/src/compat/rules/taxonomy/deepseek.kdl +18 -0
- package/src/compat/rules/taxonomy/gemini.kdl +9 -0
- package/src/compat/rules/taxonomy/gemma.kdl +3 -0
- package/src/compat/rules/taxonomy/glm.kdl +17 -0
- package/src/compat/rules/taxonomy/gpt-oss.kdl +11 -0
- package/src/compat/rules/taxonomy/kimi.kdl +20 -0
- package/src/compat/rules/taxonomy/meta.kdl +10 -0
- package/src/compat/rules/taxonomy/mimo.kdl +7 -0
- package/src/compat/rules/taxonomy/minimax.kdl +9 -0
- package/src/compat/rules/taxonomy/mistral.kdl +7 -0
- package/src/compat/rules/taxonomy/openai.kdl +43 -0
- package/src/compat/rules/taxonomy/qwen.kdl +33 -0
- package/src/compat/rules/taxonomy/stepfun.kdl +5 -0
- package/src/compat/rules/taxonomy/unknown.kdl +3 -0
- package/src/compat/rules/taxonomy/xai.kdl +12 -0
- package/src/compat/rules.d.json.ts +5 -0
- package/src/compat/rules.json +16933 -0
- package/src/compat/taxonomy.ts +452 -0
- package/src/compat/types.ts +586 -0
- package/src/discovery/antigravity.ts +5 -6
- package/src/discovery/codex.ts +12 -7
- package/src/discovery/cursor-proto.ts +7 -7
- package/src/discovery/cursor.ts +53 -49
- package/src/discovery/devin-proto.ts +613 -0
- package/src/discovery/devin.ts +358 -52
- package/src/discovery/gemini-cli.ts +14 -11
- package/src/discovery/gemini.ts +2 -0
- package/src/identity/dialect.ts +2 -2
- package/src/identity/id.ts +12 -0
- package/src/identity/index.ts +3 -3
- package/src/identity/reference.ts +30 -4
- package/src/index.ts +1 -1
- package/src/model-manager.ts +4 -4
- package/src/model-thinking.ts +6 -807
- package/src/model-tokenizer.ts +37 -44
- package/src/models.json +118192 -44573
- package/src/models.ts +6 -1
- package/src/provider-models/bundled-references.ts +3 -1
- package/src/provider-models/cline-pass.ts +226 -0
- package/src/provider-models/descriptors.ts +18 -0
- package/src/provider-models/google.ts +14 -5
- package/src/provider-models/models-dev-policies.ts +4 -29
- package/src/provider-models/ollama.ts +15 -2
- package/src/provider-models/openai-compat.ts +827 -524
- package/src/provider-models/special.ts +186 -2
- package/src/types.ts +197 -11
- package/src/wire/cline-pass.ts +35 -0
- package/src/wire/devin-proto.ts +30 -0
- package/src/wire/devin.ts +72 -0
- package/src/wire/github-copilot.ts +49 -7
- package/dist/types/compat/bedrock.d.ts +0 -3
- package/dist/types/compat/devin.d.ts +0 -9
- package/dist/types/identity/classify.d.ts +0 -69
- package/dist/types/identity/family.d.ts +0 -243
- package/dist/types/identity/markers.d.ts +0 -4
- package/dist/types/openai-pricing.d.ts +0 -17
- package/src/compat/bedrock.ts +0 -153
- package/src/compat/devin.ts +0 -12
- package/src/identity/classify.ts +0 -242
- package/src/identity/family.ts +0 -496
- package/src/identity/markers.ts +0 -49
- package/src/openai-pricing.ts +0 -29
package/src/models.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { classifyModel } from "./compat/taxonomy";
|
|
1
2
|
import MODELS from "./models.json" with { type: "json" };
|
|
2
3
|
import type { Api, KnownProvider, Model, ModelCost, TokenCost, Usage } from "./types";
|
|
3
4
|
|
|
@@ -22,7 +23,11 @@ function getProviderModels(provider: string): Map<string, Model<Api>> | undefine
|
|
|
22
23
|
for (const id in rawModels) {
|
|
23
24
|
// models.json rows are complete Models emitted by generate-models.ts;
|
|
24
25
|
// consuming them verbatim keeps startup allocation-free.
|
|
25
|
-
|
|
26
|
+
const row = rawModels[id as keyof typeof rawModels] as unknown as Model<Api>;
|
|
27
|
+
// Rows baked before the compat engine (and stale cache snapshots) lack
|
|
28
|
+
// `identity`; classify lazily so consumers can rely on the field.
|
|
29
|
+
row.identity ??= classifyModel(provider, id, { lenient: true });
|
|
30
|
+
providerModels.set(id, row);
|
|
26
31
|
}
|
|
27
32
|
modelRegistry.set(provider, providerModels);
|
|
28
33
|
return providerModels;
|
|
@@ -45,7 +45,9 @@ function getGlobalReferences(): Map<string, Model<Api>> {
|
|
|
45
45
|
for (const provider of getBundledProviders()) {
|
|
46
46
|
for (const model of getBundledModels(provider as Parameters<typeof getBundledModels>[0])) {
|
|
47
47
|
const candidate = model as Model<Api>;
|
|
48
|
-
|
|
48
|
+
// ClinePass limits, pricing, and reasoning controls are gateway-specific;
|
|
49
|
+
// matching them by bare id would contaminate unrelated proxy models.
|
|
50
|
+
if (candidate.provider === "cline-pass" || isZeroCostXaiOAuthReference(candidate)) {
|
|
49
51
|
continue;
|
|
50
52
|
}
|
|
51
53
|
const existing = references.get(candidate.id);
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { Effort } from "../effort";
|
|
2
|
+
import type { ModelSpec, ThinkingConfig } from "../types";
|
|
3
|
+
|
|
4
|
+
type ClinePassCost = ModelSpec<"openai-completions">["cost"];
|
|
5
|
+
type ClinePassInput = ModelSpec<"openai-completions">["input"];
|
|
6
|
+
|
|
7
|
+
export interface ClinePassModelMetadata {
|
|
8
|
+
name: string;
|
|
9
|
+
contextWindow: number;
|
|
10
|
+
maxTokens: number;
|
|
11
|
+
input: ClinePassInput;
|
|
12
|
+
cost: ClinePassCost;
|
|
13
|
+
reasoning: boolean;
|
|
14
|
+
thinking?: ThinkingConfig;
|
|
15
|
+
tier: "subscription" | "free";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const LOW_HIGH_MAX: ThinkingConfig = {
|
|
19
|
+
mode: "effort",
|
|
20
|
+
efforts: [Effort.Low, Effort.High, Effort.Max],
|
|
21
|
+
defaultLevel: Effort.High,
|
|
22
|
+
requiresEffort: false,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const HIGH_XHIGH: ThinkingConfig = {
|
|
26
|
+
mode: "effort",
|
|
27
|
+
efforts: [Effort.High, Effort.XHigh],
|
|
28
|
+
requiresEffort: false,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const LOW_TO_MAX: ThinkingConfig = {
|
|
32
|
+
mode: "effort",
|
|
33
|
+
efforts: [Effort.Low, Effort.Medium, Effort.High, Effort.XHigh, Effort.Max],
|
|
34
|
+
requiresEffort: false,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const QWEN_38_EFFORTS: ThinkingConfig = {
|
|
38
|
+
mode: "effort",
|
|
39
|
+
efforts: [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High, Effort.XHigh],
|
|
40
|
+
requiresEffort: true,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const QWEN_37_BUDGETS: ThinkingConfig = {
|
|
44
|
+
mode: "budget",
|
|
45
|
+
efforts: [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High, Effort.XHigh, Effort.Max],
|
|
46
|
+
defaultLevel: Effort.High,
|
|
47
|
+
requiresEffort: false,
|
|
48
|
+
// Cline derives these from its 10/20/50/80/95/100% effort ratios and
|
|
49
|
+
// the model's 131,072-token output ceiling, capped by the advertised
|
|
50
|
+
// 262,144-token reasoning maximum.
|
|
51
|
+
effortBudgets: {
|
|
52
|
+
[Effort.Minimal]: 13_107,
|
|
53
|
+
[Effort.Low]: 26_214,
|
|
54
|
+
[Effort.Medium]: 65_536,
|
|
55
|
+
[Effort.High]: 104_857,
|
|
56
|
+
[Effort.XHigh]: 124_518,
|
|
57
|
+
[Effort.Max]: 131_072,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* ClinePass metadata published by Cline CLI 3.0.58 / @cline/llms 0.0.79.
|
|
63
|
+
* The public recommended-models endpoint remains authoritative for membership;
|
|
64
|
+
* this snapshot supplies the exact limits, plan pricing, and reasoning controls
|
|
65
|
+
* that endpoint omits, including a deterministic offline catalog floor.
|
|
66
|
+
*/
|
|
67
|
+
export const CLINE_PASS_MODEL_METADATA: Readonly<Record<string, ClinePassModelMetadata>> = {
|
|
68
|
+
"kimi-k3": {
|
|
69
|
+
name: "Kimi K3",
|
|
70
|
+
contextWindow: 1_048_576,
|
|
71
|
+
maxTokens: 1_048_576,
|
|
72
|
+
input: ["text", "image"],
|
|
73
|
+
cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 0 },
|
|
74
|
+
reasoning: true,
|
|
75
|
+
thinking: LOW_HIGH_MAX,
|
|
76
|
+
tier: "subscription",
|
|
77
|
+
},
|
|
78
|
+
"qwen3.8-max": {
|
|
79
|
+
name: "Qwen3.8 Max",
|
|
80
|
+
contextWindow: 1_000_000,
|
|
81
|
+
maxTokens: 131_072,
|
|
82
|
+
input: ["text", "image"],
|
|
83
|
+
cost: { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 },
|
|
84
|
+
reasoning: true,
|
|
85
|
+
thinking: QWEN_38_EFFORTS,
|
|
86
|
+
tier: "subscription",
|
|
87
|
+
},
|
|
88
|
+
"deepseek-v4-flash": {
|
|
89
|
+
name: "DeepSeek V4 Flash",
|
|
90
|
+
contextWindow: 1_048_576,
|
|
91
|
+
maxTokens: 384_000,
|
|
92
|
+
input: ["text"],
|
|
93
|
+
cost: { input: 0.056, output: 0.112, cacheRead: 0.0112, cacheWrite: 0 },
|
|
94
|
+
reasoning: true,
|
|
95
|
+
thinking: HIGH_XHIGH,
|
|
96
|
+
tier: "subscription",
|
|
97
|
+
},
|
|
98
|
+
"glm-5.2": {
|
|
99
|
+
name: "GLM-5.2",
|
|
100
|
+
contextWindow: 1_048_576,
|
|
101
|
+
maxTokens: 131_072,
|
|
102
|
+
input: ["text"],
|
|
103
|
+
cost: { input: 0.966, output: 3.036, cacheRead: 0.1932, cacheWrite: 0 },
|
|
104
|
+
reasoning: true,
|
|
105
|
+
thinking: LOW_HIGH_MAX,
|
|
106
|
+
tier: "subscription",
|
|
107
|
+
},
|
|
108
|
+
"deepseek-v4-pro": {
|
|
109
|
+
name: "DeepSeek V4 Pro",
|
|
110
|
+
contextWindow: 1_048_576,
|
|
111
|
+
maxTokens: 384_000,
|
|
112
|
+
input: ["text"],
|
|
113
|
+
cost: { input: 0.522, output: 1.044, cacheRead: 0.0435, cacheWrite: 0 },
|
|
114
|
+
reasoning: true,
|
|
115
|
+
thinking: HIGH_XHIGH,
|
|
116
|
+
tier: "subscription",
|
|
117
|
+
},
|
|
118
|
+
"qwen3.7-max": {
|
|
119
|
+
name: "Qwen3.7 Max",
|
|
120
|
+
contextWindow: 1_000_000,
|
|
121
|
+
maxTokens: 131_072,
|
|
122
|
+
input: ["text"],
|
|
123
|
+
cost: { input: 1.475, output: 4.425, cacheRead: 0.295, cacheWrite: 1.84375 },
|
|
124
|
+
reasoning: true,
|
|
125
|
+
thinking: HIGH_XHIGH,
|
|
126
|
+
tier: "subscription",
|
|
127
|
+
},
|
|
128
|
+
"qwen3.7-plus": {
|
|
129
|
+
name: "Qwen3.7 Plus",
|
|
130
|
+
contextWindow: 1_000_000,
|
|
131
|
+
maxTokens: 131_072,
|
|
132
|
+
input: ["text", "image"],
|
|
133
|
+
cost: { input: 0.32, output: 1.28, cacheRead: 0.064, cacheWrite: 0.4 },
|
|
134
|
+
reasoning: true,
|
|
135
|
+
thinking: QWEN_37_BUDGETS,
|
|
136
|
+
tier: "subscription",
|
|
137
|
+
},
|
|
138
|
+
"minimax-m3": {
|
|
139
|
+
name: "MiniMax-M3",
|
|
140
|
+
contextWindow: 1_048_576,
|
|
141
|
+
maxTokens: 512_000,
|
|
142
|
+
input: ["text", "image"],
|
|
143
|
+
cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 },
|
|
144
|
+
reasoning: true,
|
|
145
|
+
tier: "subscription",
|
|
146
|
+
},
|
|
147
|
+
"kimi-k2.7-code": {
|
|
148
|
+
name: "Kimi K2.7 Code",
|
|
149
|
+
contextWindow: 262_144,
|
|
150
|
+
maxTokens: 262_144,
|
|
151
|
+
input: ["text", "image"],
|
|
152
|
+
cost: { input: 0.67, output: 3.4, cacheRead: 0.19, cacheWrite: 0 },
|
|
153
|
+
reasoning: true,
|
|
154
|
+
tier: "subscription",
|
|
155
|
+
},
|
|
156
|
+
"kimi-k2.6": {
|
|
157
|
+
name: "Kimi K2.6",
|
|
158
|
+
contextWindow: 262_144,
|
|
159
|
+
maxTokens: 262_144,
|
|
160
|
+
input: ["text", "image"],
|
|
161
|
+
cost: { input: 0.95, output: 4, cacheRead: 0.16, cacheWrite: 0 },
|
|
162
|
+
reasoning: true,
|
|
163
|
+
tier: "subscription",
|
|
164
|
+
},
|
|
165
|
+
"glm-5.3": {
|
|
166
|
+
name: "GLM-5.3",
|
|
167
|
+
contextWindow: 1_048_576,
|
|
168
|
+
maxTokens: 131_072,
|
|
169
|
+
input: ["text"],
|
|
170
|
+
cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 },
|
|
171
|
+
reasoning: true,
|
|
172
|
+
thinking: LOW_HIGH_MAX,
|
|
173
|
+
tier: "subscription",
|
|
174
|
+
},
|
|
175
|
+
"mimo-v2.5-pro": {
|
|
176
|
+
name: "MiMo-V2.5-Pro",
|
|
177
|
+
contextWindow: 1_050_000,
|
|
178
|
+
maxTokens: 131_072,
|
|
179
|
+
input: ["text"],
|
|
180
|
+
cost: { input: 0.435, output: 0.87, cacheRead: 0.0036, cacheWrite: 0 },
|
|
181
|
+
reasoning: true,
|
|
182
|
+
tier: "subscription",
|
|
183
|
+
},
|
|
184
|
+
"mimo-v2.5": {
|
|
185
|
+
name: "MiMo-V2.5",
|
|
186
|
+
contextWindow: 1_050_000,
|
|
187
|
+
maxTokens: 131_072,
|
|
188
|
+
input: ["text", "image"],
|
|
189
|
+
cost: { input: 0.14, output: 0.28, cacheRead: 0.0028, cacheWrite: 0 },
|
|
190
|
+
reasoning: true,
|
|
191
|
+
tier: "subscription",
|
|
192
|
+
},
|
|
193
|
+
"stealth/ox-alpha": {
|
|
194
|
+
name: "Ox Alpha (free)",
|
|
195
|
+
contextWindow: 1_048_576,
|
|
196
|
+
maxTokens: 131_072,
|
|
197
|
+
input: ["text", "image"],
|
|
198
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
199
|
+
reasoning: true,
|
|
200
|
+
thinking: LOW_TO_MAX,
|
|
201
|
+
tier: "free",
|
|
202
|
+
},
|
|
203
|
+
"deepseek/deepseek-v4-flash": {
|
|
204
|
+
name: "DeepSeek V4 Flash (free)",
|
|
205
|
+
contextWindow: 1_048_576,
|
|
206
|
+
maxTokens: 384_000,
|
|
207
|
+
input: ["text"],
|
|
208
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
209
|
+
reasoning: true,
|
|
210
|
+
thinking: HIGH_XHIGH,
|
|
211
|
+
tier: "free",
|
|
212
|
+
},
|
|
213
|
+
"poolside/laguna-s-2.1:free": {
|
|
214
|
+
name: "Laguna S 2.1 (free)",
|
|
215
|
+
contextWindow: 262_144,
|
|
216
|
+
maxTokens: 32_768,
|
|
217
|
+
input: ["text"],
|
|
218
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
219
|
+
reasoning: true,
|
|
220
|
+
tier: "free",
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
export function getClinePassModelMetadata(id: string): ClinePassModelMetadata | undefined {
|
|
225
|
+
return CLINE_PASS_MODEL_METADATA[id];
|
|
226
|
+
}
|
|
@@ -9,6 +9,7 @@ import type { ModelManagerConfig, ProviderCatalogEntry, ProviderDescriptor } fro
|
|
|
9
9
|
import { googleModelManagerOptions, googleVertexModelManagerOptions } from "./google";
|
|
10
10
|
import { ollamaCloudModelManagerOptions } from "./ollama";
|
|
11
11
|
import {
|
|
12
|
+
abliterationModelManagerOptions,
|
|
12
13
|
aiandModelManagerOptions,
|
|
13
14
|
aimlApiModelManagerOptions,
|
|
14
15
|
alibabaCodingPlanModelManagerOptions,
|
|
@@ -17,6 +18,7 @@ import {
|
|
|
17
18
|
basetenModelManagerOptions,
|
|
18
19
|
bedrockMantleModelManagerOptions,
|
|
19
20
|
cerebrasModelManagerOptions,
|
|
21
|
+
clinePassModelManagerOptions,
|
|
20
22
|
cloudflareAiGatewayModelManagerOptions,
|
|
21
23
|
coreWeaveModelManagerOptions,
|
|
22
24
|
deepinfraModelManagerOptions,
|
|
@@ -69,6 +71,14 @@ import {
|
|
|
69
71
|
} from "./special";
|
|
70
72
|
|
|
71
73
|
export const CATALOG_PROVIDERS = [
|
|
74
|
+
{
|
|
75
|
+
id: "abliteration",
|
|
76
|
+
defaultModel: "abliterated-model",
|
|
77
|
+
envVars: ["ABLITERATION_API_KEY", "ABLIT_KEY"],
|
|
78
|
+
createModelManagerOptions: (config: ModelManagerConfig) => abliterationModelManagerOptions(config),
|
|
79
|
+
dynamicModelsAuthoritative: true,
|
|
80
|
+
catalogDiscovery: { label: "Abliteration" },
|
|
81
|
+
},
|
|
72
82
|
{
|
|
73
83
|
id: "aiand",
|
|
74
84
|
defaultModel: "moonshotai/kimi-k2.7-code",
|
|
@@ -175,6 +185,14 @@ export const CATALOG_PROVIDERS = [
|
|
|
175
185
|
dynamicModelsAuthoritative: true,
|
|
176
186
|
catalogDiscovery: { label: "Devin", envVars: ["DEVIN_API_KEY"], oauthProvider: "devin" },
|
|
177
187
|
},
|
|
188
|
+
{
|
|
189
|
+
id: "cline-pass",
|
|
190
|
+
defaultModel: "kimi-k3",
|
|
191
|
+
envVars: ["CLINE_API_KEY"],
|
|
192
|
+
createModelManagerOptions: (config: ModelManagerConfig) => clinePassModelManagerOptions(config),
|
|
193
|
+
dynamicModelsAuthoritative: true,
|
|
194
|
+
catalogDiscovery: { label: "ClinePass", allowUnauthenticated: true },
|
|
195
|
+
},
|
|
178
196
|
{
|
|
179
197
|
id: "firepass",
|
|
180
198
|
defaultModel: "kimi-k2.6-turbo",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { reviewedCollapseTable } from "../compat/collapse";
|
|
2
|
+
import { classifyModel } from "../compat/taxonomy";
|
|
1
3
|
import { fetchAntigravityDiscoveryModels } from "../discovery/antigravity";
|
|
2
4
|
import { fetchGeminiModels } from "../discovery/gemini";
|
|
3
5
|
import { fetchGeminiCliQuotaModels } from "../discovery/gemini-cli";
|
|
4
|
-
import { isGeminiModelId } from "../identity/family";
|
|
5
6
|
import type { ModelManagerOptions } from "../model-manager";
|
|
6
7
|
import type { FetchImpl } from "../types";
|
|
7
|
-
import { GEMINI_CLI_VARIANT_COLLAPSE_TABLE } from "../variant-collapse";
|
|
8
8
|
|
|
9
9
|
export interface GoogleModelManagerConfig {
|
|
10
10
|
apiKey?: string;
|
|
@@ -34,6 +34,7 @@ export interface GoogleGeminiCliModelManagerConfig {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const CLOUD_CODE_ASSIST_ENDPOINT = "https://cloudcode-pa.googleapis.com";
|
|
37
|
+
const GEMINI_37_FLASH_CACHE_MIGRATION_MODEL_IDS = ["gemini-3.7-flash"] as const;
|
|
37
38
|
|
|
38
39
|
function toDiscoveryFetch(fetchImpl: FetchImpl | undefined): typeof fetch | undefined {
|
|
39
40
|
if (!fetchImpl) {
|
|
@@ -51,6 +52,7 @@ export function googleModelManagerOptions(
|
|
|
51
52
|
const apiKey = config?.apiKey;
|
|
52
53
|
return {
|
|
53
54
|
providerId: "google",
|
|
55
|
+
dropCachedModelIdsOnStaticMismatch: GEMINI_37_FLASH_CACHE_MIGRATION_MODEL_IDS,
|
|
54
56
|
...(apiKey
|
|
55
57
|
? { fetchDynamicModels: () => fetchGeminiModels({ apiKey, fetch: toDiscoveryFetch(config?.fetch) }) }
|
|
56
58
|
: undefined),
|
|
@@ -58,7 +60,10 @@ export function googleModelManagerOptions(
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
export function googleVertexModelManagerOptions(_config?: GoogleVertexModelManagerConfig): ModelManagerOptions {
|
|
61
|
-
return {
|
|
63
|
+
return {
|
|
64
|
+
providerId: "google-vertex",
|
|
65
|
+
dropCachedModelIdsOnStaticMismatch: GEMINI_37_FLASH_CACHE_MIGRATION_MODEL_IDS,
|
|
66
|
+
};
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
export function googleAntigravityModelManagerOptions(
|
|
@@ -91,10 +96,14 @@ export function googleGeminiCliModelManagerOptions(
|
|
|
91
96
|
? {
|
|
92
97
|
fetchDynamicModels: async () => {
|
|
93
98
|
const fetcher = toDiscoveryFetch(config?.fetch);
|
|
99
|
+
const collapseTable = reviewedCollapseTable("google-gemini-cli");
|
|
100
|
+
if (collapseTable === undefined) {
|
|
101
|
+
throw new Error("missing reviewed collapse table for google-gemini-cli");
|
|
102
|
+
}
|
|
94
103
|
const models = await fetchAntigravityDiscoveryModels({
|
|
95
104
|
token,
|
|
96
105
|
fetcher,
|
|
97
|
-
collapseTable:
|
|
106
|
+
collapseTable: collapseTable,
|
|
98
107
|
});
|
|
99
108
|
// Antigravity's fetchAvailableModels is unreachable for
|
|
100
109
|
// credentials without Antigravity entitlement (Code Assist
|
|
@@ -104,7 +113,7 @@ export function googleGeminiCliModelManagerOptions(
|
|
|
104
113
|
return fetchGeminiCliQuotaModels({ token, projectId: config?.projectId, endpoint, fetcher });
|
|
105
114
|
}
|
|
106
115
|
return models
|
|
107
|
-
.filter(m =>
|
|
116
|
+
.filter(m => classifyModel("google-gemini-cli", m.id, { lenient: true }).class === "gemini")
|
|
108
117
|
.map(m => ({
|
|
109
118
|
...m,
|
|
110
119
|
provider: "google-gemini-cli" as const,
|
|
@@ -1,38 +1,13 @@
|
|
|
1
|
+
import { isExcludedModel } from "../compat/behavior";
|
|
1
2
|
import type { Api, ModelSpec } from "../types";
|
|
2
3
|
|
|
3
|
-
const BEDROCK_MANTLE_OPENAI_MODEL_IDS: Readonly<Record<string, true>> = {
|
|
4
|
-
"openai.gpt-5.4": true,
|
|
5
|
-
"openai.gpt-5.5": true,
|
|
6
|
-
"openai.gpt-5.6-luna": true,
|
|
7
|
-
"openai.gpt-5.6-sol": true,
|
|
8
|
-
"openai.gpt-5.6-terra": true,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
4
|
/**
|
|
12
|
-
* Remove models.dev rows that OMP cannot route successfully
|
|
5
|
+
* Remove models.dev rows that OMP cannot route successfully; the roster
|
|
6
|
+
* policy lives in the `exclude-models` behavior rules.
|
|
13
7
|
*
|
|
14
8
|
* Generation and runtime refresh share this policy so a live catalog cannot
|
|
15
9
|
* reintroduce selectors deliberately excluded from the bundled catalog.
|
|
16
10
|
*/
|
|
17
11
|
export function filterModelsDevCatalogRows<TApi extends Api>(models: readonly ModelSpec<TApi>[]): ModelSpec<TApi>[] {
|
|
18
|
-
return models.filter(model =>
|
|
19
|
-
if (model.provider === "amazon-bedrock") {
|
|
20
|
-
// AWS does not document the jp. Opus 5 profile, and the openai.gpt-5.x
|
|
21
|
-
// rows are Mantle-only ids that Bedrock rejects or misroutes.
|
|
22
|
-
return model.id !== "jp.anthropic.claude-opus-5" && !BEDROCK_MANTLE_OPENAI_MODEL_IDS[model.id];
|
|
23
|
-
}
|
|
24
|
-
if (model.provider === "zai") {
|
|
25
|
-
// [1m] is a Claude Code selector convention, not an inference id.
|
|
26
|
-
return !model.id.endsWith("[1m]");
|
|
27
|
-
}
|
|
28
|
-
if (model.provider === "fireworks" || model.provider === "firepass") {
|
|
29
|
-
// Control-plane resource ids are not accepted by the inference API.
|
|
30
|
-
return !model.id.startsWith("accounts/fireworks/");
|
|
31
|
-
}
|
|
32
|
-
if (model.provider === "xiaomi" || model.provider.startsWith("xiaomi-token-plan-")) {
|
|
33
|
-
// Text-chat transports cannot serve Xiaomi's audio-only models.
|
|
34
|
-
return !model.id.includes("-tts") && !model.id.includes("-asr");
|
|
35
|
-
}
|
|
36
|
-
return true;
|
|
37
|
-
});
|
|
12
|
+
return models.filter(model => !isExcludedModel(model.provider, model.id));
|
|
38
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fetchWithRetry } from "@linxiraos/pi-utils";
|
|
2
|
+
import { compareRevision, parseRevision } from "../compat/revision";
|
|
3
|
+
import { classifyModel } from "../compat/taxonomy";
|
|
2
4
|
import { Effort } from "../effort";
|
|
3
|
-
import { isGlm52ReasoningEffortModelId } from "../identity/family";
|
|
4
5
|
import type { ModelManagerOptions } from "../model-manager";
|
|
5
6
|
import type { FetchImpl, ModelSpec, ThinkingConfig } from "../types";
|
|
6
7
|
import { discoveryFetch } from "../utils";
|
|
@@ -96,7 +97,19 @@ function getThinkingConfig(modelId: string, capabilities: string[] | undefined):
|
|
|
96
97
|
if (!capabilities?.includes("thinking")) {
|
|
97
98
|
return undefined;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
+
const identity = classifyModel("ollama-cloud", modelId, { lenient: true });
|
|
101
|
+
const revision = identity.revision === undefined ? undefined : parseRevision(identity.revision);
|
|
102
|
+
const floor = parseRevision(identity.family === "flash" ? "5.3" : "5.2");
|
|
103
|
+
const isGlmEffortModel =
|
|
104
|
+
identity.class === "glm" &&
|
|
105
|
+
(identity.family === undefined ||
|
|
106
|
+
identity.family === "air" ||
|
|
107
|
+
identity.family === "turbo" ||
|
|
108
|
+
identity.family === "flash") &&
|
|
109
|
+
revision !== undefined &&
|
|
110
|
+
floor !== undefined &&
|
|
111
|
+
compareRevision(revision, floor) >= 0;
|
|
112
|
+
if (isGlmEffortModel) {
|
|
100
113
|
return OLLAMA_CLOUD_GLM_52_THINKING;
|
|
101
114
|
}
|
|
102
115
|
return { mode: "effort", efforts: [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High] };
|