mirror of https://github.com/openclaw/openclaw.git
Providers: fix kimi-coding thinking normalization
This commit is contained in:
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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue