Add handleImage and multiTurn tests for vercel-ai-gateway in stream.test.ts

This commit is contained in:
Mario Zechner 2026-01-13 16:56:48 +01:00
parent 19f3c23f6d
commit 1d8d5d3d88
2 changed files with 10 additions and 1 deletions

View file

@ -599,7 +599,7 @@ describe("Generate E2E Tests", () => {
});
describe.skipIf(!process.env.AI_GATEWAY_API_KEY)(
"Vercel AI Gateway Provider (google/gemini-2.5-flash via OpenAI Completions)",
"Vercel AI Gateway Provider (google/gemini-2.5-flash via Anthropic Messages)",
() => {
const llm = getModel("vercel-ai-gateway", "google/gemini-2.5-flash");
@ -614,6 +614,14 @@ describe("Generate E2E Tests", () => {
it("should handle streaming", { retry: 3 }, async () => {
await handleStreaming(llm);
});
it("should handle image input", { retry: 3 }, async () => {
await handleImage(llm);
});
it("should handle multi-turn with tools", { retry: 3 }, async () => {
await multiTurn(llm);
});
},
);

View file

@ -55,6 +55,7 @@ async function testTokensOnAbort<TApi extends Api>(llm: Model<TApi>, options: Op
llm.provider === "google-gemini-cli" ||
llm.provider === "zai" ||
llm.provider === "amazon-bedrock" ||
llm.provider === "vercel-ai-gateway" ||
(llm.provider === "google-antigravity" && llm.id.includes("gpt-oss"))
) {
expect(msg.usage.input).toBe(0);