bbb91fa8ae
Add Alibaba Cloud Model Studio Token Plan subscription service as two built-in API-key providers: qwen-token-plan (international, Singapore) and qwen-token-plan-cn (China, Beijing). Each provider exposes 15 text-generation models (Qwen, DeepSeek, GLM, Kimi, MiniMax) via the OpenAI-compatible endpoint with DashScope enable_thinking support. Model metadata is sourced from models.dev; qwen3.8-max-preview is hardcoded until models.dev includes it. Also fixes kimi-coding test references (k2p7 -> kimi-for-coding) after models.dev catalog update picked up by generate-models. Closes #6850
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { getModels } from "../src/compat.ts";
|
|
|
|
const TEXT_MODELS = [
|
|
"MiniMax-M2.5",
|
|
"deepseek-v3.2",
|
|
"deepseek-v4-flash",
|
|
"deepseek-v4-pro",
|
|
"glm-5",
|
|
"glm-5.1",
|
|
"glm-5.2",
|
|
"kimi-k2.5",
|
|
"kimi-k2.6",
|
|
"kimi-k2.7-code",
|
|
"qwen3.6-flash",
|
|
"qwen3.6-plus",
|
|
"qwen3.7-max",
|
|
"qwen3.7-plus",
|
|
"qwen3.8-max-preview",
|
|
];
|
|
|
|
const IMAGE_MODELS = ["qwen-image-2.0", "qwen-image-2.0-pro", "wan2.7-image", "wan2.7-image-pro"];
|
|
|
|
describe("Qwen Token Plan models", () => {
|
|
it.each(["qwen-token-plan", "qwen-token-plan-cn"] as const)("exposes all text models on %s", (provider) => {
|
|
const modelIds = getModels(provider).map((model) => model.id);
|
|
for (const expected of TEXT_MODELS) {
|
|
expect(modelIds, `${provider} should include ${expected}`).toContain(expected);
|
|
}
|
|
});
|
|
|
|
it.each(["qwen-token-plan", "qwen-token-plan-cn"] as const)("omits image models from %s", (provider) => {
|
|
const modelIds = getModels(provider).map((model) => model.id);
|
|
for (const excluded of IMAGE_MODELS) {
|
|
expect(modelIds, `${provider} should not include ${excluded}`).not.toContain(excluded);
|
|
}
|
|
});
|
|
});
|