@ai-sdk/anthropic 4.0.0-beta.19 → 4.0.0-beta.21

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.
@@ -899,11 +899,18 @@ var anthropicLanguageModelOptions = import_v43.z.object({
899
899
  container: import_v43.z.object({
900
900
  id: import_v43.z.string().optional(),
901
901
  skills: import_v43.z.array(
902
- import_v43.z.object({
903
- type: import_v43.z.union([import_v43.z.literal("anthropic"), import_v43.z.literal("custom")]),
904
- skillId: import_v43.z.string(),
905
- version: import_v43.z.string().optional()
906
- })
902
+ import_v43.z.discriminatedUnion("type", [
903
+ import_v43.z.object({
904
+ type: import_v43.z.literal("anthropic"),
905
+ skillId: import_v43.z.string(),
906
+ version: import_v43.z.string().optional()
907
+ }),
908
+ import_v43.z.object({
909
+ type: import_v43.z.literal("custom"),
910
+ providerReference: import_v43.z.record(import_v43.z.string(), import_v43.z.string()),
911
+ version: import_v43.z.string().optional()
912
+ })
913
+ ])
907
914
  ).optional()
908
915
  }).optional(),
909
916
  /**
@@ -3083,7 +3090,10 @@ var AnthropicMessagesLanguageModel = class {
3083
3090
  id: anthropicOptions.container.id,
3084
3091
  skills: anthropicOptions.container.skills.map((skill) => ({
3085
3092
  type: skill.type,
3086
- skill_id: skill.skillId,
3093
+ skill_id: skill.type === "custom" ? (0, import_provider_utils15.resolveProviderReference)({
3094
+ reference: skill.providerReference,
3095
+ provider: "anthropic"
3096
+ }) : skill.skillId,
3087
3097
  version: skill.version
3088
3098
  }))
3089
3099
  }