mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 02:41:24 +00:00
fix(agents): normalize strict openai-compatible turn ordering
Co-authored-by: liuwenyong1985 <48443240+liuwenyong1985@users.noreply.github.com>
This commit is contained in:
@@ -43,4 +43,22 @@ describe("resolveTranscriptPolicy", () => {
|
||||
expect(policy.sanitizeToolCallIds).toBe(false);
|
||||
expect(policy.toolCallIdMode).toBeUndefined();
|
||||
});
|
||||
|
||||
it("enables user-turn merge for strict OpenAI-compatible providers", () => {
|
||||
const policy = resolveTranscriptPolicy({
|
||||
provider: "moonshot",
|
||||
modelId: "kimi-k2.5",
|
||||
modelApi: "openai-completions",
|
||||
});
|
||||
expect(policy.validateAnthropicTurns).toBe(true);
|
||||
});
|
||||
|
||||
it("keeps OpenRouter on its existing turn-validation path", () => {
|
||||
const policy = resolveTranscriptPolicy({
|
||||
provider: "openrouter",
|
||||
modelId: "openai/gpt-4.1",
|
||||
modelApi: "openai-completions",
|
||||
});
|
||||
expect(policy.validateAnthropicTurns).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user