mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 04:31:10 +00:00
* refactor: move bundled replay policy ownership into plugins * test: preserve replay fallback until providers adopt hooks * test: cover response replay branches for ollama and zai --------- Co-authored-by: Shakker <shakkerdroid@gmail.com>
24 lines
747 B
TypeScript
24 lines
747 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { registerSingleProviderPlugin } from "../../test/helpers/plugins/plugin-registration.js";
|
|
import plugin from "./index.js";
|
|
|
|
describe("moonshot provider plugin", () => {
|
|
it("owns replay policy for OpenAI-compatible Moonshot transports", () => {
|
|
const provider = registerSingleProviderPlugin(plugin);
|
|
|
|
expect(
|
|
provider.buildReplayPolicy?.({
|
|
provider: "moonshot",
|
|
modelApi: "openai-completions",
|
|
modelId: "kimi-k2.5",
|
|
} as never),
|
|
).toMatchObject({
|
|
sanitizeToolCallIds: true,
|
|
toolCallIdMode: "strict",
|
|
applyAssistantFirstOrderingFix: true,
|
|
validateGeminiTurns: true,
|
|
validateAnthropicTurns: true,
|
|
});
|
|
});
|
|
});
|