fix(copilot): honor advertised model endpoints (#34958)

This commit is contained in:
Aiden Cline
2026-07-02 10:23:57 -05:00
committed by GitHub
parent f52424e05f
commit 373cd08b98
7 changed files with 131 additions and 20 deletions
+14
View File
@@ -50,6 +50,20 @@ describe("public exports", () => {
expect(
GitHubCopilot.configure({ baseURL: "https://api.githubcopilot.test", apiKey: "fixture" }).model,
).toBeFunction()
expect(
GitHubCopilot.configure({
baseURL: "https://api.githubcopilot.test",
apiKey: "fixture",
endpoint: "responses",
}).model("mai-code-1-flash-picker").route.id,
).toBe("openai-responses")
expect(
GitHubCopilot.configure({
baseURL: "https://api.githubcopilot.test",
apiKey: "fixture",
endpoint: "chat",
}).model("gpt-5").route.id,
).toBe("openai-chat")
})
test("protocol barrels expose supported low-level routes", () => {