@ai-sdk/anthropic 2.0.34 → 2.0.36
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 +12 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +8 -0
- package/dist/internal/index.d.ts +8 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,12 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
generateId as generateId2,
|
|
7
7
|
loadApiKey,
|
|
8
|
+
loadOptionalSetting,
|
|
8
9
|
withoutTrailingSlash,
|
|
9
10
|
withUserAgentSuffix
|
|
10
11
|
} from "@ai-sdk/provider-utils";
|
|
11
12
|
|
|
12
13
|
// src/version.ts
|
|
13
|
-
var VERSION = true ? "2.0.
|
|
14
|
+
var VERSION = true ? "2.0.36" : "0.0.0-test";
|
|
14
15
|
|
|
15
16
|
// src/anthropic-messages-language-model.ts
|
|
16
17
|
import {
|
|
@@ -3136,7 +3137,12 @@ var anthropicTools = {
|
|
|
3136
3137
|
// src/anthropic-provider.ts
|
|
3137
3138
|
function createAnthropic(options = {}) {
|
|
3138
3139
|
var _a;
|
|
3139
|
-
const baseURL = (_a = withoutTrailingSlash(
|
|
3140
|
+
const baseURL = (_a = withoutTrailingSlash(
|
|
3141
|
+
loadOptionalSetting({
|
|
3142
|
+
settingValue: options.baseURL,
|
|
3143
|
+
environmentVariableName: "ANTHROPIC_BASE_URL"
|
|
3144
|
+
})
|
|
3145
|
+
)) != null ? _a : "https://api.anthropic.com/v1";
|
|
3140
3146
|
const getHeaders = () => withUserAgentSuffix(
|
|
3141
3147
|
{
|
|
3142
3148
|
"anthropic-version": "2023-06-01",
|