|
|
@@ -3339,7 +3339,7 @@ describe("ProviderTransform.variants", () => {
|
|
|
expect(Object.keys(result)).toEqual(["low", "medium", "high"])
|
|
|
})
|
|
|
|
|
|
- test("grok-4 returns empty object", () => {
|
|
|
+ test("grok-4 uses the provider's standard efforts", () => {
|
|
|
const model = createMockModel({
|
|
|
id: "openrouter/grok-4",
|
|
|
providerID: "openrouter",
|
|
|
@@ -3350,7 +3350,8 @@ describe("ProviderTransform.variants", () => {
|
|
|
},
|
|
|
})
|
|
|
const result = ProviderTransform.variants(model)
|
|
|
- expect(result).toEqual({})
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high"])
|
|
|
+ expect(result.medium).toEqual({ reasoning: { effort: "medium" } })
|
|
|
})
|
|
|
|
|
|
test("grok-3-mini returns low and high with reasoning", () => {
|
|
|
@@ -3766,18 +3767,19 @@ describe("ProviderTransform.variants", () => {
|
|
|
})
|
|
|
|
|
|
describe("@ai-sdk/xai", () => {
|
|
|
- test("grok-3 returns empty object", () => {
|
|
|
+ test("grok-4.5 uses standard reasoning efforts", () => {
|
|
|
const model = createMockModel({
|
|
|
- id: "xai/grok-3",
|
|
|
+ id: "xai/grok-4.5",
|
|
|
providerID: "xai",
|
|
|
api: {
|
|
|
- id: "grok-3",
|
|
|
+ id: "grok-4.5",
|
|
|
url: "https://api.x.ai",
|
|
|
npm: "@ai-sdk/xai",
|
|
|
},
|
|
|
})
|
|
|
const result = ProviderTransform.variants(model)
|
|
|
- expect(result).toEqual({})
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high"])
|
|
|
+ expect(result.medium).toEqual({ reasoningEffort: "medium" })
|
|
|
})
|
|
|
|
|
|
test("grok-3-mini returns low and high with reasoningEffort", () => {
|