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,8 +1,7 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { stream as streamAnthropic } from "../src/api/anthropic-messages.ts";
|
||||
import { getModel } from "../src/compat.ts";
|
||||
import { getModel, normalizeContext } from "../src/compat.ts";
|
||||
import { getSupportedThinkingLevels } from "../src/models.ts";
|
||||
import type { Context } from "../src/types.ts";
|
||||
|
||||
const mockState = vi.hoisted(() => ({
|
||||
constructorOpts: undefined as Record<string, unknown> | undefined,
|
||||
@@ -52,10 +51,10 @@ vi.mock("@anthropic-ai/sdk", () => {
|
||||
});
|
||||
|
||||
describe("Copilot Claude via Anthropic Messages", () => {
|
||||
const context: Context = {
|
||||
const context = normalizeContext({
|
||||
systemPrompt: "You are a helpful assistant.",
|
||||
messages: [{ role: "user", content: "Hello", timestamp: Date.now() }],
|
||||
};
|
||||
});
|
||||
|
||||
it("applies Copilot-specific adaptive thinking effort overrides", () => {
|
||||
const opus47 = getModel("github-copilot", "claude-opus-4.7");
|
||||
@@ -70,6 +69,11 @@ describe("Copilot Claude via Anthropic Messages", () => {
|
||||
expect(getSupportedThinkingLevels(opus5)).toContain("xhigh");
|
||||
expect(getSupportedThinkingLevels(opus5)).toContain("max");
|
||||
|
||||
const opus55 = getModel("github-copilot", "claude-opus-5.5");
|
||||
expect(opus55.api).toBe("anthropic-messages");
|
||||
expect(opus55.contextWindow).toBe(1000000);
|
||||
expect(getSupportedThinkingLevels(opus55)).toEqual(["low", "medium", "high", "xhigh", "max"]);
|
||||
|
||||
const sonnet46 = getModel("github-copilot", "claude-sonnet-4.6");
|
||||
expect(sonnet46.thinkingLevelMap).toMatchObject({ minimal: "low", max: "max" });
|
||||
expect(getSupportedThinkingLevels(sonnet46)).toContain("max");
|
||||
|
||||
Reference in New Issue
Block a user