mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { registerSingleProviderPlugin } from "openclaw/plugin-sdk/plugin-test-runtime";
|
|
import { describe, expect, it } from "vitest";
|
|
import plugin from "./index.js";
|
|
|
|
describe("kimi provider plugin", () => {
|
|
it("normalizes legacy Kimi Code ids to the stable API model id", async () => {
|
|
const provider = await registerSingleProviderPlugin(plugin);
|
|
|
|
expect(
|
|
provider.normalizeResolvedModel?.({
|
|
provider: "kimi",
|
|
modelId: "kimi-code",
|
|
model: {
|
|
id: "kimi-code",
|
|
name: "Kimi Code",
|
|
provider: "kimi",
|
|
api: "anthropic-messages",
|
|
},
|
|
} as never),
|
|
).toEqual({
|
|
id: "kimi-for-coding",
|
|
name: "Kimi Code",
|
|
provider: "kimi",
|
|
api: "anthropic-messages",
|
|
});
|
|
});
|
|
|
|
it("uses binary thinking with thinking off by default", async () => {
|
|
const provider = await registerSingleProviderPlugin(plugin);
|
|
|
|
expect(
|
|
provider.resolveThinkingProfile?.({
|
|
provider: "kimi",
|
|
modelId: "kimi-code",
|
|
reasoning: true,
|
|
} as never),
|
|
).toEqual({
|
|
levels: [
|
|
{ id: "off", label: "off" },
|
|
{ id: "low", label: "on" },
|
|
],
|
|
defaultLevel: "off",
|
|
});
|
|
});
|
|
});
|