|
|
@@ -2681,12 +2681,14 @@ describe("ProviderTransform.variants", () => {
|
|
|
expect(result.xhigh).toEqual({
|
|
|
thinking: {
|
|
|
type: "adaptive",
|
|
|
+ display: "summarized",
|
|
|
},
|
|
|
effort: "xhigh",
|
|
|
})
|
|
|
expect(result.max).toEqual({
|
|
|
thinking: {
|
|
|
type: "adaptive",
|
|
|
+ display: "summarized",
|
|
|
},
|
|
|
effort: "max",
|
|
|
})
|
|
|
@@ -2706,6 +2708,47 @@ describe("ProviderTransform.variants", () => {
|
|
|
expect(Object.keys(result)).toEqual(["low", "medium", "high", "xhigh", "max"])
|
|
|
})
|
|
|
|
|
|
+ test("anthropic opus 4.8 forces display summarized for adaptive reasoning", () => {
|
|
|
+ const model = createMockModel({
|
|
|
+ id: "anthropic/claude-opus-4-8",
|
|
|
+ providerID: "gateway",
|
|
|
+ api: {
|
|
|
+ id: "anthropic/claude-opus-4-8",
|
|
|
+ url: "https://gateway.ai",
|
|
|
+ npm: "@ai-sdk/gateway",
|
|
|
+ },
|
|
|
+ })
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high", "xhigh", "max"])
|
|
|
+ expect(result.high).toEqual({
|
|
|
+ thinking: {
|
|
|
+ type: "adaptive",
|
|
|
+ display: "summarized",
|
|
|
+ },
|
|
|
+ effort: "high",
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ test("anthropic opus 4.6 omits display so it keeps the summarized default", () => {
|
|
|
+ const model = createMockModel({
|
|
|
+ id: "anthropic/claude-opus-4-6",
|
|
|
+ providerID: "gateway",
|
|
|
+ api: {
|
|
|
+ id: "anthropic/claude-opus-4-6",
|
|
|
+ url: "https://gateway.ai",
|
|
|
+ npm: "@ai-sdk/gateway",
|
|
|
+ },
|
|
|
+ })
|
|
|
+ const result = ProviderTransform.variants(model)
|
|
|
+ expect(Object.keys(result)).toEqual(["low", "medium", "high", "max"])
|
|
|
+ expect(result.high).toEqual({
|
|
|
+ thinking: {
|
|
|
+ type: "adaptive",
|
|
|
+ },
|
|
|
+ effort: "high",
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
test("anthropic models return anthropic thinking options", () => {
|
|
|
const model = createMockModel({
|
|
|
id: "anthropic/claude-sonnet-4",
|