@ai-sdk/anthropic 2.0.87 → 2.0.89
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 +13 -0
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +10 -1
- package/dist/internal/index.d.ts +10 -1
- package/dist/internal/index.js +17 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +15 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -2279,6 +2279,12 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2279
2279
|
rejectsSamplingParameters,
|
|
2280
2280
|
isKnownModel
|
|
2281
2281
|
} = getModelCapabilities(this.modelId);
|
|
2282
|
+
if (!isKnownModel && maxOutputTokens == null) {
|
|
2283
|
+
warnings.push({
|
|
2284
|
+
type: "other",
|
|
2285
|
+
message: `The model "${this.modelId}" is unknown. The max output tokens have been limited to ${maxOutputTokensForModel}. Set maxOutputTokens explicitly to override this limit.`
|
|
2286
|
+
});
|
|
2287
|
+
}
|
|
2282
2288
|
if (rejectsSamplingParameters) {
|
|
2283
2289
|
if (temperature != null) {
|
|
2284
2290
|
warnings.push({
|
|
@@ -2314,6 +2320,13 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2314
2320
|
description: "Respond with a JSON object.",
|
|
2315
2321
|
inputSchema: responseFormat.schema
|
|
2316
2322
|
} : void 0;
|
|
2323
|
+
if (jsonResponseTool != null && (anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse) === false) {
|
|
2324
|
+
warnings.push({
|
|
2325
|
+
type: "unsupported-setting",
|
|
2326
|
+
setting: "providerOptions",
|
|
2327
|
+
details: "`disableParallelToolUse: false` is ignored when using the JSON response tool. Parallel tool use is disabled to ensure a single coherent JSON tool call."
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2317
2330
|
const cacheControlValidator = new CacheControlValidator();
|
|
2318
2331
|
const { prompt: messagesPrompt, betas } = await convertToAnthropicMessagesPrompt({
|
|
2319
2332
|
prompt,
|
|
@@ -4174,6 +4187,7 @@ var anthropicTools = {
|
|
|
4174
4187
|
export {
|
|
4175
4188
|
AnthropicMessagesLanguageModel,
|
|
4176
4189
|
anthropicTools,
|
|
4177
|
-
prepareTools
|
|
4190
|
+
prepareTools,
|
|
4191
|
+
sanitizeJsonSchema
|
|
4178
4192
|
};
|
|
4179
4193
|
//# sourceMappingURL=index.mjs.map
|