mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 23:32:12 +03:00
fix(github): drop trailing assistant prefill for Copilot chat (#5802)
Integrated into release/v3.8.43
This commit is contained in:
committed by
GitHub
parent
3323b5b617
commit
e7ae29d607
@@ -112,6 +112,11 @@ test("GithubExecutor.transformRequest injects JSON response instructions for Cla
|
||||
reasoning_text: "internal",
|
||||
reasoning_content: "internal",
|
||||
},
|
||||
// Trailing user turn: dropTrailingAssistantPrefill (9router#2143) strips a
|
||||
// conversation that ends in "assistant", which would otherwise remove the very
|
||||
// message this test inspects below. Keep the array ending in "user" so this test
|
||||
// stays focused on response_format injection + reasoning-field stripping.
|
||||
{ role: "user", content: "thanks" },
|
||||
],
|
||||
};
|
||||
|
||||
@@ -225,6 +230,11 @@ test("GithubExecutor.transformRequest leaves string content and missing content
|
||||
role: "assistant",
|
||||
tool_calls: [{ id: "c1", type: "function", function: { name: "f", arguments: "{}" } }],
|
||||
},
|
||||
// Trailing tool response: dropTrailingAssistantPrefill (9router#2143) strips a
|
||||
// conversation that ends in "assistant", which would otherwise remove the very
|
||||
// tool_calls message this test inspects below. A real tool round-trip ends in
|
||||
// "tool", not "assistant" — model that shape instead.
|
||||
{ role: "tool", tool_call_id: "c1", content: "result" },
|
||||
],
|
||||
};
|
||||
const result = executor.transformRequest("claude-sonnet-4.6", body, true, {});
|
||||
|
||||
Reference in New Issue
Block a user