|
@@ -1224,6 +1224,102 @@ describe("ProviderTransform.variants", () => {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ describe("@ai-sdk/github-copilot", () => {
|
|
|
|
|
+ test("standard models return low, medium, high", () => {
|
|
|
|
|
+ const model = createMockModel({
|
|
|
|
|
+ id: "gpt-4.5",
|
|
|
|
|
+ providerID: "github-copilot",
|
|
|
|
|
+ api: {
|
|
|
|
|
+ id: "gpt-4.5",
|
|
|
|
|
+ url: "https://api.githubcopilot.com",
|
|
|
|
|
+ npm: "@ai-sdk/github-copilot",
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high"])
|
|
|
|
|
+ expect(result.low).toEqual({
|
|
|
|
|
+ reasoningEffort: "low",
|
|
|
|
|
+ reasoningSummary: "auto",
|
|
|
|
|
+ include: ["reasoning.encrypted_content"],
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ test("gpt-5.1-codex-max includes xhigh", () => {
|
|
|
|
|
+ const model = createMockModel({
|
|
|
|
|
+ id: "gpt-5.1-codex-max",
|
|
|
|
|
+ providerID: "github-copilot",
|
|
|
|
|
+ api: {
|
|
|
|
|
+ id: "gpt-5.1-codex-max",
|
|
|
|
|
+ url: "https://api.githubcopilot.com",
|
|
|
|
|
+ npm: "@ai-sdk/github-copilot",
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high", "xhigh"])
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ test("gpt-5.1-codex-mini does not include xhigh", () => {
|
|
|
|
|
+ const model = createMockModel({
|
|
|
|
|
+ id: "gpt-5.1-codex-mini",
|
|
|
|
|
+ providerID: "github-copilot",
|
|
|
|
|
+ api: {
|
|
|
|
|
+ id: "gpt-5.1-codex-mini",
|
|
|
|
|
+ url: "https://api.githubcopilot.com",
|
|
|
|
|
+ npm: "@ai-sdk/github-copilot",
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high"])
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ test("gpt-5.1-codex does not include xhigh", () => {
|
|
|
|
|
+ const model = createMockModel({
|
|
|
|
|
+ id: "gpt-5.1-codex",
|
|
|
|
|
+ providerID: "github-copilot",
|
|
|
|
|
+ api: {
|
|
|
|
|
+ id: "gpt-5.1-codex",
|
|
|
|
|
+ url: "https://api.githubcopilot.com",
|
|
|
|
|
+ npm: "@ai-sdk/github-copilot",
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high"])
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ test("gpt-5.2 includes xhigh", () => {
|
|
|
|
|
+ const model = createMockModel({
|
|
|
|
|
+ id: "gpt-5.2",
|
|
|
|
|
+ providerID: "github-copilot",
|
|
|
|
|
+ api: {
|
|
|
|
|
+ id: "gpt-5.2",
|
|
|
|
|
+ url: "https://api.githubcopilot.com",
|
|
|
|
|
+ npm: "@ai-sdk/github-copilot",
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high", "xhigh"])
|
|
|
|
|
+ expect(result.xhigh).toEqual({
|
|
|
|
|
+ reasoningEffort: "xhigh",
|
|
|
|
|
+ reasoningSummary: "auto",
|
|
|
|
|
+ include: ["reasoning.encrypted_content"],
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ test("gpt-5.2-codex includes xhigh", () => {
|
|
|
|
|
+ const model = createMockModel({
|
|
|
|
|
+ id: "gpt-5.2-codex",
|
|
|
|
|
+ providerID: "github-copilot",
|
|
|
|
|
+ api: {
|
|
|
|
|
+ id: "gpt-5.2-codex",
|
|
|
|
|
+ url: "https://api.githubcopilot.com",
|
|
|
|
|
+ npm: "@ai-sdk/github-copilot",
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high", "xhigh"])
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
describe("@ai-sdk/cerebras", () => {
|
|
describe("@ai-sdk/cerebras", () => {
|
|
|
test("returns WIDELY_SUPPORTED_EFFORTS with reasoningEffort", () => {
|
|
test("returns WIDELY_SUPPORTED_EFFORTS with reasoningEffort", () => {
|
|
|
const model = createMockModel({
|
|
const model = createMockModel({
|