@ai-sdk/anthropic 4.0.12 → 4.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/anthropic",
3
- "version": "4.0.12",
3
+ "version": "4.0.15",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@ai-sdk/provider": "4.0.3",
39
- "@ai-sdk/provider-utils": "5.0.7"
39
+ "@ai-sdk/provider-utils": "5.0.10"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "22.19.19",
@@ -10,6 +10,7 @@ import {
10
10
  generateId,
11
11
  loadApiKey,
12
12
  loadOptionalSetting,
13
+ validateBaseURL,
13
14
  withoutTrailingSlash,
14
15
  withUserAgentSuffix,
15
16
  type FetchFunction,
@@ -25,7 +26,9 @@ const ANTHROPIC_API_URL = 'https://api.anthropic.com';
25
26
  const ANTHROPIC_API_VERSIONED_URL = `${ANTHROPIC_API_URL}/v1`;
26
27
 
27
28
  function normalizeBaseURL(baseURL: string | undefined): string | undefined {
28
- const baseURLWithoutTrailingSlash = withoutTrailingSlash(baseURL);
29
+ const baseURLWithoutTrailingSlash = withoutTrailingSlash(
30
+ validateBaseURL(baseURL),
31
+ );
29
32
 
30
33
  return baseURLWithoutTrailingSlash === ANTHROPIC_API_URL
31
34
  ? ANTHROPIC_API_VERSIONED_URL
@@ -48,6 +48,7 @@ export class AnthropicSkills implements SkillsV4 {
48
48
  }): Promise<{ name?: string; description?: string }> {
49
49
  const { value: versionResponse } = await getFromApi({
50
50
  url: `${this.config.baseURL}/skills/${skillId}/versions/${version}`,
51
+ validateUrl: false,
51
52
  headers,
52
53
  failedResponseHandler: anthropicFailedResponseHandler,
53
54
  successfulResponseHandler: createJsonResponseHandler(