Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/core/script/compare-model-migrations.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bun

import path from "node:path";
import { cp, mkdir, rm, writeFile } from "node:fs/promises";
import { cp, mkdir, rm, symlink, writeFile } from "node:fs/promises";
import { existsSync } from "node:fs";
import { tmpdir } from "node:os";
import { mergeDeep } from "remeda";
Expand Down Expand Up @@ -60,7 +60,13 @@ try {

const contents = await new Response(show.stdout).text();
await mkdir(path.dirname(tempFilePath), { recursive: true });
await writeFile(tempFilePath, contents);
const tree = await Bun.$`git ls-tree HEAD -- ${filePath}`.cwd(root).text();
if (tree.startsWith("120000 ")) {
await rm(tempFilePath, { force: true });
await symlink(contents.trim(), tempFilePath);
} else {
await writeFile(tempFilePath, contents);
}
}

const before = await generateForComparison(baselineProvidersPath);
Expand Down
134 changes: 134 additions & 0 deletions packages/core/test/siliconflow.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import { expect, test } from "bun:test";

import { generateCatalog } from "../src/index.js";

test("SiliconFlow catalogs expose only positively documented reasoning controls", async () => {
const { providers } = await generateCatalog(process.cwd());
const global = providers.siliconflow!.models;
const china = providers["siliconflow-cn"]!.models;

for (const id of [
"Pro/MiniMaxAI/MiniMax-M2.1",
"Pro/moonshotai/Kimi-K2-Thinking",
"Pro/moonshotai/Kimi-K2-Instruct-0905",
"Kwaipilot/KAT-Dev",
"PaddlePaddle/PaddleOCR-VL",
"ascend-tribe/pangu-pro-moe",
]) {
expect(china[id]).toBeUndefined();
}

expect(optionIDs(global, "budget_tokens")).toEqual([
"Qwen/Qwen3-14B",
"Qwen/Qwen3-235B-A22B-Thinking-2507",
"Qwen/Qwen3-32B",
"Qwen/Qwen3-8B",
"deepseek-ai/DeepSeek-R1",
"deepseek-ai/DeepSeek-V3.1",
"deepseek-ai/DeepSeek-V3.1-Terminus",
"deepseek-ai/DeepSeek-V3.2",
"deepseek-ai/DeepSeek-V3.2-Exp",
"moonshotai/Kimi-K2.5",
"moonshotai/Kimi-K2.6",
"openai/gpt-oss-120b",
"tencent/Hunyuan-A13B-Instruct",
"tencent/Hy3-preview",
"zai-org/GLM-5",
"zai-org/GLM-5.1",
]);
for (const id of optionIDs(global, "budget_tokens")) {
expect(global[id]?.reasoning_options).toContainEqual({
type: "budget_tokens",
min: 128,
max: 32_768,
});
}

expect(optionIDs(global, "toggle")).toEqual([
"Qwen/Qwen3-14B",
"Qwen/Qwen3-32B",
"Qwen/Qwen3-8B",
"deepseek-ai/DeepSeek-V3.1",
"deepseek-ai/DeepSeek-V3.1-Terminus",
"deepseek-ai/DeepSeek-V3.2",
"deepseek-ai/DeepSeek-V3.2-Exp",
"tencent/Hunyuan-A13B-Instruct",
"zai-org/GLM-5V-Turbo",
]);
expect(optionIDs(china, "toggle")).toEqual([
"Pro/deepseek-ai/DeepSeek-V3.1-Terminus",
"Pro/deepseek-ai/DeepSeek-V3.2",
"Pro/zai-org/GLM-4.7",
"Pro/zai-org/GLM-5",
"Qwen/Qwen3-14B",
"Qwen/Qwen3-32B",
"Qwen/Qwen3-8B",
"Qwen/Qwen3.5-122B-A10B",
"Qwen/Qwen3.5-27B",
"Qwen/Qwen3.5-35B-A3B",
"Qwen/Qwen3.5-397B-A17B",
"Qwen/Qwen3.5-4B",
"Qwen/Qwen3.5-9B",
"deepseek-ai/DeepSeek-V3.1-Terminus",
"deepseek-ai/DeepSeek-V3.2",
"tencent/Hunyuan-A13B-Instruct",
]);

expect(optionIDs(china, "budget_tokens")).toEqual([]);
expect(optionIDs(global, "effort")).toEqual([]);
expect(optionIDs(china, "effort")).toEqual([]);
expect(fixedOptionIDs(global)).toEqual([]);
expect(fixedOptionIDs(china)).toEqual([]);

expect(unresolvedReasoningIDs(global)).toEqual([
"Qwen/Qwen3-VL-235B-A22B-Thinking",
"Qwen/Qwen3-VL-30B-A3B-Thinking",
"Qwen/Qwen3-VL-32B-Thinking",
"deepseek-ai/deepseek-v4-flash",
"deepseek-ai/deepseek-v4-pro",
"stepfun-ai/Step-3.5-Flash",
]);
expect(unresolvedReasoningIDs(china)).toEqual([
"Pro/deepseek-ai/DeepSeek-R1",
"Pro/moonshotai/Kimi-K2.5",
"Pro/moonshotai/Kimi-K2.6",
"Pro/zai-org/GLM-5.1",
"Qwen/Qwen3-235B-A22B-Thinking-2507",
"Qwen/Qwen3-VL-235B-A22B-Thinking",
"Qwen/Qwen3-VL-30B-A3B-Thinking",
"Qwen/Qwen3-VL-32B-Thinking",
"deepseek-ai/DeepSeek-R1",
"deepseek-ai/DeepSeek-V4-Pro",
"stepfun-ai/Step-3.5-Flash",
]);

for (const model of [...Object.values(global), ...Object.values(china)]) {
if (!model.reasoning) expect(model.reasoning_options).toBeUndefined();
}
});

function optionIDs(
models: Record<string, { reasoning_options?: Array<{ type: string }> }>,
type: string,
) {
return Object.entries(models)
.filter(([, model]) => model.reasoning_options?.some((option) => option.type === type))
.map(([id]) => id)
.sort();
}

function fixedOptionIDs(models: Record<string, { reasoning_options?: unknown[] }>) {
return Object.entries(models)
.filter(([, model]) => model.reasoning_options?.length === 0)
.map(([id]) => id)
.sort();
}

function unresolvedReasoningIDs(
models: Record<string, { reasoning: boolean; reasoning_options?: unknown[] }>,
) {
return Object.entries(models)
.filter(([, model]) => model.reasoning && model.reasoning_options === undefined)
.map(([id]) => id)
.sort();
}
20 changes: 0 additions & 20 deletions providers/siliconflow-cn/models/PaddlePaddle/PaddleOCR-VL.toml

This file was deleted.

22 changes: 0 additions & 22 deletions providers/siliconflow-cn/models/Pro/MiniMaxAI/MiniMax-M2.1.toml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2025-09-29"
last_updated = "2025-11-25"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2025-12-03"
last_updated = "2025-12-03"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
Expand Down

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions providers/siliconflow-cn/models/Pro/zai-org/GLM-4.7.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2025-12-22"
last_updated = "2025-12-22"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
Expand Down
1 change: 1 addition & 0 deletions providers/siliconflow-cn/models/Pro/zai-org/GLM-5.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-02-12"
last_updated = "2026-02-12"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
Expand Down
1 change: 0 additions & 1 deletion providers/siliconflow-cn/models/Qwen/Qwen3-14B.toml

This file was deleted.

23 changes: 23 additions & 0 deletions providers/siliconflow-cn/models/Qwen/Qwen3-14B.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Qwen/Qwen3-14B"
family = "qwen"
release_date = "2025-04-30"
last_updated = "2025-11-25"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 0.07
output = 0.28

[limit]
context = 131_000
output = 131_000

[modalities]
input = ["text"]
output = ["text"]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "Qwen/Qwen3-235B-A22B-Thinking-2507"
family = "qwen"
release_date = "2025-07-28"
last_updated = "2025-11-25"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 0.13
output = 0.6

[limit]
context = 262_000
output = 262_000

[modalities]
input = ["text"]
output = ["text"]
1 change: 0 additions & 1 deletion providers/siliconflow-cn/models/Qwen/Qwen3-32B.toml

This file was deleted.

23 changes: 23 additions & 0 deletions providers/siliconflow-cn/models/Qwen/Qwen3-32B.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Qwen/Qwen3-32B"
family = "qwen"
release_date = "2025-04-30"
last_updated = "2025-11-25"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 0.14
output = 0.57

[limit]
context = 131_000
output = 131_000

[modalities]
input = ["text"]
output = ["text"]
1 change: 0 additions & 1 deletion providers/siliconflow-cn/models/Qwen/Qwen3-8B.toml

This file was deleted.

23 changes: 23 additions & 0 deletions providers/siliconflow-cn/models/Qwen/Qwen3-8B.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Qwen/Qwen3-8B"
family = "qwen"
release_date = "2025-04-30"
last_updated = "2025-11-25"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 0.06
output = 0.06

[limit]
context = 131_000
output = 131_000

[modalities]
input = ["text"]
output = ["text"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release_date = "2026-02-26"
last_updated = "2026-02-26"
attachment = false
reasoning = true
reasoning_options = [{ type = "toggle" }]
temperature = true
knowledge = "2025-04"
tool_call = true
Expand Down
Loading
Loading