@ai-sdk/anthropic 4.0.84 → 4.0.85

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.
@@ -22,7 +22,7 @@ import {
22
22
  type ToolNameMapping,
23
23
  } from '@ai-sdk/provider-utils';
24
24
  import {
25
- anthropicFallbackContentSchema,
25
+ anthropicFallbackContentSchemaValidator,
26
26
  anthropicReasoningMetadataSchema,
27
27
  type AnthropicAssistantMessage,
28
28
  type AnthropicImageContent,
@@ -880,7 +880,7 @@ export async function convertToAnthropicPrompt({
880
880
 
881
881
  const fallbackMetadata = await safeValidateTypes({
882
882
  value: part.providerOptions?.anthropic,
883
- schema: anthropicFallbackContentSchema,
883
+ schema: anthropicFallbackContentSchemaValidator,
884
884
  });
885
885
 
886
886
  if (!fallbackMetadata.success) {
@@ -3,6 +3,7 @@ import {
3
3
  combineHeaders,
4
4
  convertInlineFileDataToUint8Array,
5
5
  createJsonResponseHandler,
6
+ encodePathSegment,
6
7
  getFromApi,
7
8
  postFormDataToApi,
8
9
  resolve,
@@ -22,17 +23,6 @@ interface AnthropicSkillsConfig {
22
23
  fetch?: FetchFunction;
23
24
  }
24
25
 
25
- function encodePathSegment(value: string): string {
26
- const encodedValue = encodeURIComponent(value);
27
-
28
- // URL parsing normalizes both literal and percent-encoded dot segments.
29
- return encodedValue === '.'
30
- ? '%252E'
31
- : encodedValue === '..'
32
- ? '%252E%252E'
33
- : encodedValue;
34
- }
35
-
36
26
  export class AnthropicSkills implements SkillsV4 {
37
27
  readonly specificationVersion = 'v4';
38
28