@ai-sdk/anthropic 3.0.93 → 3.0.94

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.
@@ -2699,7 +2699,7 @@ async function convertToAnthropicMessagesPrompt({
2699
2699
  let errorInfo = {};
2700
2700
  try {
2701
2701
  if (typeof output.value === "string") {
2702
- errorInfo = JSON.parse(output.value);
2702
+ errorInfo = (0, import_provider_utils14.secureJsonParse)(output.value);
2703
2703
  } else if (typeof output.value === "object" && output.value !== null) {
2704
2704
  errorInfo = output.value;
2705
2705
  }
@@ -4807,7 +4807,7 @@ var AnthropicMessagesLanguageModel = class {
4807
4807
  let finalInput = contentBlock.input === "" ? "{}" : contentBlock.input;
4808
4808
  if (contentBlock.providerToolName === "code_execution") {
4809
4809
  try {
4810
- const parsed = JSON.parse(finalInput);
4810
+ const parsed = (0, import_provider_utils15.secureJsonParse)(finalInput);
4811
4811
  if (parsed != null && typeof parsed === "object" && "code" in parsed && !("type" in parsed)) {
4812
4812
  finalInput = JSON.stringify({
4813
4813
  type: "programmatic-tool-call",