From 5a59b8d18d60ed18402dd07e92cfc99e33e5b496 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Mon, 15 Dec 2025 19:12:43 +0100 Subject: [PATCH] Add GitHub Copilot test to packages/ai --- packages/ai/test/stream.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/ai/test/stream.test.ts b/packages/ai/test/stream.test.ts index 3ab8c208..5fd5c95f 100644 --- a/packages/ai/test/stream.test.ts +++ b/packages/ai/test/stream.test.ts @@ -678,6 +678,22 @@ describe("Generate E2E Tests", () => { }); }); + describe.skipIf(!process.env.GITHUB_COPILOT_TOKEN)("GitHub Copilot Provider (gpt-4o via OpenAI Completions)", () => { + const llm = getModel("github-copilot", "gpt-4o"); + + it("should complete basic text generation", async () => { + await basicTextGeneration(llm, { apiKey: process.env.GITHUB_COPILOT_TOKEN }); + }); + + it("should handle tool calling", async () => { + await handleToolCall(llm, { apiKey: process.env.GITHUB_COPILOT_TOKEN }); + }); + + it("should handle streaming", async () => { + await handleStreaming(llm, { apiKey: process.env.GITHUB_COPILOT_TOKEN }); + }); + }); + // Check if ollama is installed let ollamaInstalled = false; try {