@ai-sdk/anthropic 3.0.0-beta.49 → 3.0.0-beta.51
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 +14 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@ai-sdk/provider-utils";
|
|
12
12
|
|
|
13
13
|
// src/version.ts
|
|
14
|
-
var VERSION = true ? "3.0.0-beta.
|
|
14
|
+
var VERSION = true ? "3.0.0-beta.51" : "0.0.0-test";
|
|
15
15
|
|
|
16
16
|
// src/anthropic-messages-language-model.ts
|
|
17
17
|
import {
|
|
@@ -3354,13 +3354,14 @@ var anthropicTools = {
|
|
|
3354
3354
|
|
|
3355
3355
|
// src/anthropic-provider.ts
|
|
3356
3356
|
function createAnthropic(options = {}) {
|
|
3357
|
-
var _a;
|
|
3357
|
+
var _a, _b;
|
|
3358
3358
|
const baseURL = (_a = withoutTrailingSlash(
|
|
3359
3359
|
loadOptionalSetting({
|
|
3360
3360
|
settingValue: options.baseURL,
|
|
3361
3361
|
environmentVariableName: "ANTHROPIC_BASE_URL"
|
|
3362
3362
|
})
|
|
3363
3363
|
)) != null ? _a : "https://api.anthropic.com/v1";
|
|
3364
|
+
const providerName = (_b = options.name) != null ? _b : "anthropic.messages";
|
|
3364
3365
|
const getHeaders = () => withUserAgentSuffix(
|
|
3365
3366
|
{
|
|
3366
3367
|
"anthropic-version": "2023-06-01",
|
|
@@ -3376,7 +3377,7 @@ function createAnthropic(options = {}) {
|
|
|
3376
3377
|
const createChatModel = (modelId) => {
|
|
3377
3378
|
var _a2;
|
|
3378
3379
|
return new AnthropicMessagesLanguageModel(modelId, {
|
|
3379
|
-
provider:
|
|
3380
|
+
provider: providerName,
|
|
3380
3381
|
baseURL,
|
|
3381
3382
|
headers: getHeaders,
|
|
3382
3383
|
fetch: options.fetch,
|