chore(vendor): import pi 1.3.0
Imported as a linear vendor commit so forge rebases do not replay the upstream root tree. git-subtree-dir: third_party/pi git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
This commit is contained in:
1 parent
719370c8f7
commit
6081e3e325
1743 files changed
+205459
-131704
No files matched your search
+3
-2
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { convertMessages } from "../src/api/google-shared.ts";
|
||||
import type { Context, Model } from "../src/types.ts";
|
||||
import { normalizeContext } from "../src/utils/transcript.ts";
|
||||
|
||||
function makeModel<TApi extends "google-generative-ai">(
|
||||
api: TApi,
|
||||
@@ -78,7 +79,7 @@ function makeContext(model: { api: string; provider: string; id: string }): Cont
|
||||
describe("google-shared image tool result routing", () => {
|
||||
it("keeps separate synthetic image turn for Gemini 2.x Google API models", () => {
|
||||
const model = makeModel("google-generative-ai", "google", "gemini-2.5-flash");
|
||||
const contents = convertMessages(model, makeContext(model));
|
||||
const contents = convertMessages(model, normalizeContext(makeContext(model)));
|
||||
|
||||
expect(contents).toHaveLength(5);
|
||||
expect(contents[2].parts?.every((part) => part.functionResponse)).toBe(true);
|
||||
@@ -89,7 +90,7 @@ describe("google-shared image tool result routing", () => {
|
||||
|
||||
it("nests image tool results for Gemini 3 Google API models", () => {
|
||||
const model = makeModel("google-generative-ai", "google", "gemini-3-pro-preview");
|
||||
const contents = convertMessages(model, makeContext(model));
|
||||
const contents = convertMessages(model, normalizeContext(makeContext(model)));
|
||||
|
||||
expect(contents).toHaveLength(3);
|
||||
const toolResultTurn = contents[2];
|
||||
|
||||
Reference in new issue
Block a user