mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
* fix(antigravity): preserve protocol fidelity and fail closed * chore: add PR-numbered changelog fragment * test: split oversized Antigravity suites * refactor(antigravity): align official IDE and CLI identities * fix(antigravity): align catalog with callable models * test(antigravity): update 2 test files to renamed version-cache API (#8013 fix) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: nguyenha935 <208228297+nguyenha935@users.noreply.github.com> Co-authored-by: backryun <backryun@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: nguyenha935 <nguyenha935@users.noreply.github.com> Co-authored-by: Probe Test <probe@example.com>
26 lines
1019 B
TypeScript
26 lines
1019 B
TypeScript
import { test } from "node:test";
|
||
import assert from "node:assert/strict";
|
||
|
||
import { AntigravityExecutor } from "../../open-sse/executors/antigravity.ts";
|
||
|
||
test("AntigravityExecutor.transformRequest preserves prompt text byte-for-byte", async () => {
|
||
const executor = new AntigravityExecutor();
|
||
const text = "OmniRoute, OpenCode, Cursor — keep this exact text 👩🏽💻";
|
||
const body = {
|
||
request: {
|
||
contents: [{ role: "user", parts: [{ text }] }],
|
||
},
|
||
};
|
||
|
||
const result = await executor.transformRequest("antigravity/gemini-3.1-pro", body, true, {
|
||
projectId: "project-1",
|
||
});
|
||
|
||
if (result instanceof Response) throw new Error("Unexpected Response from transformRequest");
|
||
const transformedText = (result.request.contents as Array<{ parts: Array<{ text?: string }> }>)[0]
|
||
.parts[0].text;
|
||
assert.equal(transformedText, text);
|
||
assert.deepEqual(Buffer.from(transformedText ?? ""), Buffer.from(text));
|
||
assert.equal(transformedText?.includes(""), text.includes(""));
|
||
});
|