mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
fix(translator): strict Anthropic content block compliance (#2225)
Filter empty text blocks from thoughtSignature-only parts, preserve tool_calls when functionResponse and functionCall coexist in the same content, and skip empty regular text parts before they reach Claude. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
decolua
co-authored by
Cursor
parent
7afaecd617
commit
ce6120ce7b
@@ -9,10 +9,9 @@ const AG2O = (req) =>
|
||||
translateRequest(FORMATS.ANTIGRAVITY, FORMATS.OPENAI, "m", { request: req }, true, null, null);
|
||||
|
||||
describe("Antigravity → OpenAI", () => {
|
||||
// antigravity-to-openai.js:177-189 — content with BOTH functionResponse and functionCall/text
|
||||
// returns toolResults early → drops the tool calls / text.
|
||||
// KNOWN BUG
|
||||
it.fails("functionResponse + functionCall in same content keeps both", () => {
|
||||
// antigravity-to-openai.js — content with BOTH functionResponse and functionCall/text
|
||||
// previously returned toolResults early → dropped tool calls / text (fixed in #2225)
|
||||
it("functionResponse + functionCall in same content keeps both", () => {
|
||||
const out = AG2O({
|
||||
contents: [{
|
||||
role: "model",
|
||||
|
||||
Reference in New Issue
Block a user