@ai-sdk/anthropic 2.0.76 → 2.0.77
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 +7 -0
- package/README.md +2 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +8 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The **[Anthropic provider](https://ai-sdk.dev/providers/ai-sdk-providers/anthropic)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Anthropic Messages API](https://docs.anthropic.com/claude/reference/messages_post).
|
|
4
4
|
|
|
5
|
+
> **Deploying to Vercel?** With Vercel's AI Gateway you can access Anthropic (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
|
|
6
|
+
|
|
5
7
|
## Setup
|
|
6
8
|
|
|
7
9
|
The Anthropic provider is available in the `@ai-sdk/anthropic` module. You can install it with
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
|
|
|
31
31
|
var import_provider_utils21 = require("@ai-sdk/provider-utils");
|
|
32
32
|
|
|
33
33
|
// src/version.ts
|
|
34
|
-
var VERSION = true ? "2.0.
|
|
34
|
+
var VERSION = true ? "2.0.77" : "0.0.0-test";
|
|
35
35
|
|
|
36
36
|
// src/anthropic-messages-language-model.ts
|
|
37
37
|
var import_provider3 = require("@ai-sdk/provider");
|
|
@@ -2233,9 +2233,15 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2233
2233
|
};
|
|
2234
2234
|
if (isThinking) {
|
|
2235
2235
|
if (thinkingType === "enabled" && thinkingBudget == null) {
|
|
2236
|
-
|
|
2237
|
-
|
|
2236
|
+
warnings.push({
|
|
2237
|
+
type: "other",
|
|
2238
|
+
message: "thinking budget is required when thinking is enabled. using default budget of 1024 tokens."
|
|
2238
2239
|
});
|
|
2240
|
+
baseArgs.thinking = {
|
|
2241
|
+
type: "enabled",
|
|
2242
|
+
budget_tokens: 1024
|
|
2243
|
+
};
|
|
2244
|
+
thinkingBudget = 1024;
|
|
2239
2245
|
}
|
|
2240
2246
|
if (baseArgs.temperature != null) {
|
|
2241
2247
|
baseArgs.temperature = void 0;
|