@ai-sdk/anthropic 3.0.37 → 3.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/anthropic-messages-language-model.ts +7 -0
- package/src/anthropic-messages-options.ts +6 -0
package/dist/internal/index.mjs
CHANGED
|
@@ -805,6 +805,11 @@ var anthropicProviderOptions = z3.object({
|
|
|
805
805
|
* @default 'high'
|
|
806
806
|
*/
|
|
807
807
|
effort: z3.enum(["low", "medium", "high", "max"]).optional(),
|
|
808
|
+
/**
|
|
809
|
+
* Enable fast mode for faster inference (2.5x faster output token speeds).
|
|
810
|
+
* Only supported with claude-opus-4-6.
|
|
811
|
+
*/
|
|
812
|
+
speed: z3.literal("fast").optional(),
|
|
808
813
|
contextManagement: z3.object({
|
|
809
814
|
edits: z3.array(
|
|
810
815
|
z3.discriminatedUnion("type", [
|
|
@@ -2579,6 +2584,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2579
2584
|
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
2580
2585
|
output_config: { effort: anthropicOptions.effort }
|
|
2581
2586
|
},
|
|
2587
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
|
|
2588
|
+
speed: anthropicOptions.speed
|
|
2589
|
+
},
|
|
2582
2590
|
// structured output:
|
|
2583
2591
|
...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
|
|
2584
2592
|
output_format: {
|
|
@@ -2737,6 +2745,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2737
2745
|
if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
|
|
2738
2746
|
betas.add("effort-2025-11-24");
|
|
2739
2747
|
}
|
|
2748
|
+
if (anthropicOptions == null ? void 0 : anthropicOptions.speed) {
|
|
2749
|
+
betas.add("fast-mode-2026-02-01");
|
|
2750
|
+
}
|
|
2740
2751
|
if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
|
|
2741
2752
|
betas.add("fine-grained-tool-streaming-2025-05-14");
|
|
2742
2753
|
}
|