mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 20:05:46 -06:00
c3d843eb24
* test: remove residual duplicate assertions * test: repair stale routing and capability fixtures * fix(cli): bound one-shot stream drain exit
25 lines
885 B
TypeScript
25 lines
885 B
TypeScript
// Sglang tests cover index plugin behavior.
|
|
import { registerSingleProviderPlugin } from "openclaw/plugin-sdk/plugin-test-runtime";
|
|
import { describe, expect, it } from "vitest";
|
|
import plugin from "./index.js";
|
|
|
|
describe("sglang provider plugin", () => {
|
|
it("owns OpenAI-compatible replay without dropping reasoning history", async () => {
|
|
const provider = await registerSingleProviderPlugin(plugin);
|
|
const policy = provider.buildReplayPolicy?.({
|
|
provider: "sglang",
|
|
modelApi: "openai-completions",
|
|
modelId: "moonshotai/kimi-k2-thinking",
|
|
} as never);
|
|
|
|
expect(policy).toMatchObject({
|
|
sanitizeToolCallIds: true,
|
|
toolCallIdMode: "strict",
|
|
applyAssistantFirstOrderingFix: true,
|
|
validateGeminiTurns: true,
|
|
validateAnthropicTurns: true,
|
|
});
|
|
expect(policy).not.toHaveProperty("dropReasoningFromHistory");
|
|
});
|
|
});
|