mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-26 09:21:55 +00:00
Providers: fix kimi-coding thinking normalization
This commit is contained in:
committed by
scoootscooob
parent
d25b4a2943
commit
9acb4c8fbc
@@ -77,6 +77,7 @@ export default definePluginEntry({
|
||||
},
|
||||
},
|
||||
capabilities: {
|
||||
openAiPayloadNormalizationMode: "moonshot-thinking",
|
||||
preserveAnthropicThinkingSignatures: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -32,6 +32,7 @@ const resolveProviderCapabilitiesWithPluginMock = vi.fn((params: { provider: str
|
||||
};
|
||||
case "kimi":
|
||||
return {
|
||||
openAiPayloadNormalizationMode: "moonshot-thinking",
|
||||
preserveAnthropicThinkingSignatures: false,
|
||||
};
|
||||
default:
|
||||
@@ -122,7 +123,7 @@ describe("resolveProviderCapabilities", () => {
|
||||
expect(resolveProviderCapabilities("kimi-code")).toEqual({
|
||||
anthropicToolSchemaMode: "native",
|
||||
anthropicToolChoiceMode: "native",
|
||||
openAiPayloadNormalizationMode: "default",
|
||||
openAiPayloadNormalizationMode: "moonshot-thinking",
|
||||
providerFamily: "default",
|
||||
preserveAnthropicThinkingSignatures: false,
|
||||
openAiCompatTurnValidation: true,
|
||||
@@ -143,6 +144,7 @@ describe("resolveProviderCapabilities", () => {
|
||||
|
||||
it("routes moonshot payload compatibility through the capability registry", () => {
|
||||
expect(usesMoonshotThinkingPayloadCompat("moonshot")).toBe(true);
|
||||
expect(usesMoonshotThinkingPayloadCompat("kimi-coding")).toBe(true);
|
||||
expect(usesMoonshotThinkingPayloadCompat("openai")).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -67,6 +67,9 @@ const PLUGIN_CAPABILITIES_FALLBACKS: Record<string, Partial<ProviderCapabilities
|
||||
moonshot: {
|
||||
openAiPayloadNormalizationMode: "moonshot-thinking",
|
||||
},
|
||||
"kimi-coding": {
|
||||
openAiPayloadNormalizationMode: "moonshot-thinking",
|
||||
},
|
||||
opencode: {
|
||||
openAiCompatTurnValidation: false,
|
||||
geminiThoughtSignatureSanitization: true,
|
||||
|
||||
Reference in New Issue
Block a user