mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-16 10:28:45 +00:00
41 lines
1.1 KiB
TypeScript
41 lines
1.1 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),
|
|
).toMatchObject({ id: "kimi-for-coding" });
|
|
});
|
|
|
|
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",
|
|
});
|
|
});
|
|
});
|