Compare commits
5 commits
dev
...
deepseek-a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b00a8500ed | ||
|
|
7d60e47e19 | ||
|
|
5338bc9d40 |
||
|
|
153d53cbfd | ||
|
|
56fd16e5c0 |
4 changed files with 151 additions and 0 deletions
1
bun.lock
1
bun.lock
|
|
@ -668,6 +668,7 @@
|
||||||
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch",
|
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch",
|
||||||
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
||||||
"@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch",
|
"@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch",
|
||||||
|
"@ai-sdk/anthropic@3.0.71": "patches/@ai-sdk%2Fanthropic@3.0.71.patch",
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@types/bun": "catalog:",
|
"@types/bun": "catalog:",
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,7 @@
|
||||||
"@types/node": "catalog:"
|
"@types/node": "catalog:"
|
||||||
},
|
},
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
|
"@ai-sdk/anthropic@3.0.71": "patches/@ai-sdk%2Fanthropic@3.0.71.patch",
|
||||||
"@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch",
|
"@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch",
|
||||||
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
|
||||||
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch"
|
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch"
|
||||||
|
|
|
||||||
|
|
@ -612,6 +612,27 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (model.api.id.includes("deepseek")) {
|
||||||
|
return {
|
||||||
|
high: {
|
||||||
|
thinking: {
|
||||||
|
type: "enabled",
|
||||||
|
},
|
||||||
|
output_config: {
|
||||||
|
effort: "high",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
max: {
|
||||||
|
thinking: {
|
||||||
|
type: "enabled",
|
||||||
|
},
|
||||||
|
output_config: {
|
||||||
|
effort: "max",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (adaptiveEfforts) {
|
if (adaptiveEfforts) {
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(
|
||||||
adaptiveEfforts.map((effort) => [
|
adaptiveEfforts.map((effort) => [
|
||||||
|
|
|
||||||
128
patches/@ai-sdk%2Fanthropic@3.0.71.patch
Normal file
128
patches/@ai-sdk%2Fanthropic@3.0.71.patch
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
diff --git a/dist/index.js b/dist/index.js
|
||||||
|
--- a/dist/index.js
|
||||||
|
+++ b/dist/index.js
|
||||||
|
@@ -934,6 +934,10 @@ var anthropicLanguageModelOptions = import_v43.z.object({
|
||||||
|
*/
|
||||||
|
effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
||||||
|
/**
|
||||||
|
+ * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
|
||||||
|
+ */
|
||||||
|
+ output_config: import_v43.z.record(import_v43.z.string(), import_v43.z.any()).optional(),
|
||||||
|
+ /**
|
||||||
|
* Task budget for agentic turns. Informs the model of the total token budget
|
||||||
|
* available for the current task, allowing it to prioritize work and wind down
|
||||||
|
* gracefully as the budget is consumed.
|
||||||
|
@@ -3070,8 +3074,9 @@ var AnthropicMessagesLanguageModel = class {
|
||||||
|
...thinkingDisplay != null && { display: thinkingDisplay }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
- ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
+ ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
output_config: {
|
||||||
|
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
|
||||||
|
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
||||||
|
effort: anthropicOptions.effort
|
||||||
|
},
|
||||||
|
diff --git a/dist/index.mjs b/dist/index.mjs
|
||||||
|
--- a/dist/index.mjs
|
||||||
|
+++ b/dist/index.mjs
|
||||||
|
@@ -929,6 +929,10 @@ var anthropicLanguageModelOptions = z3.object({
|
||||||
|
*/
|
||||||
|
effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
||||||
|
/**
|
||||||
|
+ * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
|
||||||
|
+ */
|
||||||
|
+ output_config: z3.record(z3.string(), z3.any()).optional(),
|
||||||
|
+ /**
|
||||||
|
* Task budget for agentic turns. Informs the model of the total token budget
|
||||||
|
* available for the current task, allowing it to prioritize work and wind down
|
||||||
|
* gracefully as the budget is consumed.
|
||||||
|
@@ -3107,8 +3111,9 @@ var AnthropicMessagesLanguageModel = class {
|
||||||
|
...thinkingDisplay != null && { display: thinkingDisplay }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
- ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
+ ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
output_config: {
|
||||||
|
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
|
||||||
|
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
||||||
|
effort: anthropicOptions.effort
|
||||||
|
},
|
||||||
|
diff --git a/dist/index.d.ts b/dist/index.d.ts
|
||||||
|
--- a/dist/index.d.ts
|
||||||
|
+++ b/dist/index.d.ts
|
||||||
|
@@ -178,9 +178,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
||||||
|
high: "high";
|
||||||
|
xhigh: "xhigh";
|
||||||
|
max: "max";
|
||||||
|
}>>;
|
||||||
|
+ output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
||||||
|
taskBudget: z.ZodOptional<z.ZodObject<{
|
||||||
|
type: z.ZodLiteral<"tokens">;
|
||||||
|
total: z.ZodNumber;
|
||||||
|
remaining: z.ZodOptional<z.ZodNumber>;
|
||||||
|
}, z.core.$strip>>;
|
||||||
|
diff --git a/dist/index.d.mts b/dist/index.d.mts
|
||||||
|
--- a/dist/index.d.mts
|
||||||
|
+++ b/dist/index.d.mts
|
||||||
|
@@ -178,9 +178,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
||||||
|
high: "high";
|
||||||
|
xhigh: "xhigh";
|
||||||
|
max: "max";
|
||||||
|
}>>;
|
||||||
|
+ output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
||||||
|
taskBudget: z.ZodOptional<z.ZodObject<{
|
||||||
|
type: z.ZodLiteral<"tokens">;
|
||||||
|
total: z.ZodNumber;
|
||||||
|
remaining: z.ZodOptional<z.ZodNumber>;
|
||||||
|
}, z.core.$strip>>;
|
||||||
|
diff --git a/dist/internal/index.js b/dist/internal/index.js
|
||||||
|
--- a/dist/internal/index.js
|
||||||
|
+++ b/dist/internal/index.js
|
||||||
|
@@ -926,6 +926,10 @@ var anthropicLanguageModelOptions = import_v43.z.object({
|
||||||
|
*/
|
||||||
|
effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
||||||
|
/**
|
||||||
|
+ * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
|
||||||
|
+ */
|
||||||
|
+ output_config: import_v43.z.record(import_v43.z.string(), import_v43.z.any()).optional(),
|
||||||
|
+ /**
|
||||||
|
* Task budget for agentic turns. Informs the model of the total token budget
|
||||||
|
* available for the current task, allowing it to prioritize work and wind down
|
||||||
|
* gracefully as the budget is consumed.
|
||||||
|
@@ -3062,8 +3066,9 @@ var AnthropicMessagesLanguageModel = class {
|
||||||
|
...thinkingDisplay != null && { display: thinkingDisplay }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
- ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
+ ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
output_config: {
|
||||||
|
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
|
||||||
|
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
||||||
|
effort: anthropicOptions.effort
|
||||||
|
},
|
||||||
|
diff --git a/dist/internal/index.mjs b/dist/internal/index.mjs
|
||||||
|
--- a/dist/internal/index.mjs
|
||||||
|
+++ b/dist/internal/index.mjs
|
||||||
|
@@ -913,6 +913,10 @@ var anthropicLanguageModelOptions = z3.object({
|
||||||
|
*/
|
||||||
|
effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
||||||
|
/**
|
||||||
|
+ * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
|
||||||
|
+ */
|
||||||
|
+ output_config: z3.record(z3.string(), z3.any()).optional(),
|
||||||
|
+ /**
|
||||||
|
* Task budget for agentic turns. Informs the model of the total token budget
|
||||||
|
* available for the current task, allowing it to prioritize work and wind down
|
||||||
|
* gracefully as the budget is consumed.
|
||||||
|
@@ -3091,8 +3095,9 @@ var AnthropicMessagesLanguageModel = class {
|
||||||
|
...thinkingDisplay != null && { display: thinkingDisplay }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
- ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
+ ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
|
||||||
|
output_config: {
|
||||||
|
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
|
||||||
|
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
||||||
|
effort: anthropicOptions.effort
|
||||||
|
},
|
||||||
Loading…
Add table
Add a link
Reference in a new issue