@ai-sdk/anthropic 3.0.43 → 3.0.45
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 +12 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +5 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +5 -5
- package/dist/internal/index.mjs.map +1 -1
- package/docs/05-anthropic.mdx +29 -2
- package/package.json +1 -1
- package/src/anthropic-messages-api.ts +2 -0
- package/src/anthropic-messages-language-model.ts +5 -2
- package/src/anthropic-messages-options.ts +4 -3
package/dist/internal/index.mjs
CHANGED
|
@@ -769,11 +769,11 @@ var anthropicLanguageModelOptions = z3.object({
|
|
|
769
769
|
*/
|
|
770
770
|
thinking: z3.discriminatedUnion("type", [
|
|
771
771
|
z3.object({
|
|
772
|
-
/** for Opus 4.6 and newer models */
|
|
772
|
+
/** for Sonnet 4.6, Opus 4.6, and newer models */
|
|
773
773
|
type: z3.literal("adaptive")
|
|
774
774
|
}),
|
|
775
775
|
z3.object({
|
|
776
|
-
/** for models before Opus 4.6 */
|
|
776
|
+
/** for models before Opus 4.6, except Sonnet 4.6 still supports it */
|
|
777
777
|
type: z3.literal("enabled"),
|
|
778
778
|
budgetTokens: z3.number().optional()
|
|
779
779
|
}),
|
|
@@ -841,7 +841,7 @@ var anthropicLanguageModelOptions = z3.object({
|
|
|
841
841
|
* Enable fast mode for faster inference (2.5x faster output token speeds).
|
|
842
842
|
* Only supported with claude-opus-4-6.
|
|
843
843
|
*/
|
|
844
|
-
speed: z3.
|
|
844
|
+
speed: z3.enum(["fast", "standard"]).optional(),
|
|
845
845
|
contextManagement: z3.object({
|
|
846
846
|
edits: z3.array(
|
|
847
847
|
z3.discriminatedUnion("type", [
|
|
@@ -2830,7 +2830,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2830
2830
|
if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
|
|
2831
2831
|
betas.add("effort-2025-11-24");
|
|
2832
2832
|
}
|
|
2833
|
-
if (anthropicOptions == null ? void 0 : anthropicOptions.speed) {
|
|
2833
|
+
if ((anthropicOptions == null ? void 0 : anthropicOptions.speed) === "fast") {
|
|
2834
2834
|
betas.add("fast-mode-2026-02-01");
|
|
2835
2835
|
}
|
|
2836
2836
|
if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
|
|
@@ -4087,7 +4087,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
4087
4087
|
}
|
|
4088
4088
|
};
|
|
4089
4089
|
function getModelCapabilities(modelId) {
|
|
4090
|
-
if (modelId.includes("claude-opus-4-6")) {
|
|
4090
|
+
if (modelId.includes("claude-sonnet-4-6") || modelId.includes("claude-opus-4-6")) {
|
|
4091
4091
|
return {
|
|
4092
4092
|
maxOutputTokens: 128e3,
|
|
4093
4093
|
supportsStructuredOutput: true,
|