fix: keep Kimi anthropic tool payloads native (#60391) (thanks @Eric-Guo)

This commit is contained in:
Ayaan Zaidi
2026-04-04 08:33:38 +05:30
parent 41e16a883b
commit d7b8faa7bf
4 changed files with 28 additions and 30 deletions

View File

@@ -1,6 +1,5 @@
import type { StreamFn } from "@mariozechner/pi-agent-core";
import { streamSimple } from "@mariozechner/pi-ai";
import { createOpenAIAnthropicToolPayloadCompatibilityWrapper } from "openclaw/plugin-sdk/provider-stream";
const TOOL_CALLS_SECTION_BEGIN = "<|tool_calls_section_begin|>";
const TOOL_CALLS_SECTION_END = "<|tool_calls_section_end|>";
@@ -180,9 +179,3 @@ export function createKimiToolCallMarkupWrapper(baseStreamFn: StreamFn | undefin
return wrapKimiTaggedToolCalls(maybeStream);
};
}
export function wrapKimiProviderStream(baseStreamFn: StreamFn | undefined): StreamFn {
return createKimiToolCallMarkupWrapper(
createOpenAIAnthropicToolPayloadCompatibilityWrapper(baseStreamFn),
);
}