@ai-sdk/google-vertex 5.0.98 → 5.0.99
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 +13 -0
- package/dist/anthropic/edge/index.d.ts +84 -80
- package/dist/anthropic/edge/index.d.ts.map +1 -0
- package/dist/anthropic/edge/index.js +232 -272
- package/dist/anthropic/edge/index.js.map +1 -1
- package/dist/anthropic/index.d.ts +69 -66
- package/dist/anthropic/index.d.ts.map +1 -0
- package/dist/anthropic/index.js +166 -177
- package/dist/anthropic/index.js.map +1 -1
- package/dist/edge/index.d.ts +206 -194
- package/dist/edge/index.d.ts.map +1 -0
- package/dist/edge/index.js +1408 -1846
- package/dist/edge/index.js.map +1 -1
- package/dist/index.d.ts +265 -252
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1349 -1761
- package/dist/index.js.map +1 -1
- package/dist/maas/edge/index.d.ts +62 -59
- package/dist/maas/edge/index.d.ts.map +1 -0
- package/dist/maas/edge/index.js +166 -196
- package/dist/maas/edge/index.js.map +1 -1
- package/dist/maas/index.d.ts +47 -45
- package/dist/maas/index.d.ts.map +1 -0
- package/dist/maas/index.js +101 -102
- package/dist/maas/index.js.map +1 -1
- package/dist/xai/edge/index.d.ts +77 -73
- package/dist/xai/edge/index.d.ts.map +1 -0
- package/dist/xai/edge/index.js +203 -235
- package/dist/xai/edge/index.js.map +1 -1
- package/dist/xai/index.d.ts +62 -59
- package/dist/xai/index.d.ts.map +1 -0
- package/dist/xai/index.js +138 -141
- package/dist/xai/index.js.map +1 -1
- package/docs/16-google-vertex.mdx +3 -3
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/google-vertex
|
|
2
2
|
|
|
3
|
+
## 5.0.99
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ede5b89: chore: migrate package builds from tsup to tsdown
|
|
8
|
+
- Updated dependencies [ede5b89]
|
|
9
|
+
- Updated dependencies [a587f55]
|
|
10
|
+
- @ai-sdk/anthropic@4.0.69
|
|
11
|
+
- @ai-sdk/google@4.0.86
|
|
12
|
+
- @ai-sdk/openai-compatible@3.0.60
|
|
13
|
+
- @ai-sdk/provider@4.0.20
|
|
14
|
+
- @ai-sdk/provider-utils@5.0.52
|
|
15
|
+
|
|
3
16
|
## 5.0.98
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { anthropicTools } from
|
|
4
|
-
|
|
1
|
+
import { FetchFunction, Resolvable } from "@ai-sdk/provider-utils";
|
|
2
|
+
import { LanguageModelV4, ProviderV4 } from "@ai-sdk/provider";
|
|
3
|
+
import { anthropicTools } from "@ai-sdk/anthropic/internal";
|
|
4
|
+
//#region src/edge/google-vertex-auth-edge.d.ts
|
|
5
5
|
interface GoogleCredentials {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
/**
|
|
7
|
+
* The client email for the Google Cloud service account. Defaults to the
|
|
8
|
+
* value of the `GOOGLE_CLIENT_EMAIL` environment variable.
|
|
9
|
+
*/
|
|
10
|
+
clientEmail: string;
|
|
11
|
+
/**
|
|
12
|
+
* The private key for the Google Cloud service account. Defaults to the
|
|
13
|
+
* value of the `GOOGLE_PRIVATE_KEY` environment variable.
|
|
14
|
+
*/
|
|
15
|
+
privateKey: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional. The private key ID for the Google Cloud service account. Defaults
|
|
18
|
+
* to the value of the `GOOGLE_PRIVATE_KEY_ID` environment variable.
|
|
19
|
+
*/
|
|
20
|
+
privateKeyId?: string;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/anthropic/google-vertex-anthropic-options.d.ts
|
|
23
24
|
type GoogleVertexAnthropicModelId = 'claude-sonnet-5' | 'claude-sonnet-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-opus-4-5@20251101' | 'claude-sonnet-4-5@20250929' | 'claude-opus-4-1@20250805' | 'claude-opus-4@20250514' | 'claude-sonnet-4@20250514' | 'claude-3-7-sonnet@20250219' | 'claude-3-5-sonnet-v2@20241022' | 'claude-3-5-haiku@20241022' | 'claude-3-5-sonnet@20240620' | 'claude-3-haiku@20240307' | 'claude-3-sonnet@20240229' | 'claude-3-opus@20240229' | (string & {});
|
|
24
|
-
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/anthropic/google-vertex-anthropic-provider.d.ts
|
|
25
27
|
type GoogleVertexAnthropicTools = Pick<typeof anthropicTools, 'bash_20241022' | 'bash_20250124' | 'textEditor_20241022' | 'textEditor_20250124' | 'textEditor_20250429' | 'textEditor_20250728' | 'computer_20241022' | 'webSearch_20250305' | 'toolSearchRegex_20251119' | 'toolSearchBm25_20251119'>;
|
|
26
28
|
/**
|
|
27
29
|
* Tools supported by Google Vertex Anthropic.
|
|
@@ -29,70 +31,72 @@ type GoogleVertexAnthropicTools = Pick<typeof anthropicTools, 'bash_20241022' |
|
|
|
29
31
|
*/
|
|
30
32
|
declare const googleVertexAnthropicTools: GoogleVertexAnthropicTools;
|
|
31
33
|
interface GoogleVertexAnthropicProvider extends ProviderV4 {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Creates a model for text generation.
|
|
36
|
+
*/
|
|
37
|
+
(modelId: GoogleVertexAnthropicModelId): LanguageModelV4;
|
|
38
|
+
/**
|
|
39
|
+
* Creates a model for text generation.
|
|
40
|
+
*/
|
|
41
|
+
languageModel(modelId: GoogleVertexAnthropicModelId): LanguageModelV4;
|
|
42
|
+
/**
|
|
43
|
+
* Anthropic tools supported by Google Vertex.
|
|
44
|
+
* Note: Only a subset of Anthropic tools are available on Vertex.
|
|
45
|
+
* Supported tools: bash_20241022, bash_20250124, textEditor_20241022,
|
|
46
|
+
* textEditor_20250124, textEditor_20250429, textEditor_20250728,
|
|
47
|
+
* computer_20241022, webSearch_20250305, toolSearchRegex_20251119,
|
|
48
|
+
* toolSearchBm25_20251119
|
|
49
|
+
*/
|
|
50
|
+
tools: typeof googleVertexAnthropicTools;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated Use `embeddingModel` instead.
|
|
53
|
+
*/
|
|
54
|
+
textEmbeddingModel(modelId: string): never;
|
|
53
55
|
}
|
|
54
56
|
interface GoogleVertexAnthropicProviderSettings$1 {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Google Cloud project ID. Defaults to the value of the `GOOGLE_VERTEX_PROJECT` environment variable.
|
|
59
|
+
*/
|
|
60
|
+
project?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Google Cloud region. Defaults to the value of the `GOOGLE_VERTEX_LOCATION` environment variable.
|
|
63
|
+
*/
|
|
64
|
+
location?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Use a different URL prefix for API calls, e.g. to use proxy servers.
|
|
67
|
+
* The default prefix is `https://api.anthropic.com/v1`.
|
|
68
|
+
*/
|
|
69
|
+
baseURL?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Custom headers to include in the requests.
|
|
72
|
+
*/
|
|
73
|
+
headers?: Resolvable<Record<string, string | undefined>>;
|
|
74
|
+
/**
|
|
75
|
+
* Custom fetch implementation. You can use it as a middleware to intercept requests,
|
|
76
|
+
* or to provide a custom fetch implementation for e.g. testing.
|
|
77
|
+
*/
|
|
78
|
+
fetch?: FetchFunction;
|
|
77
79
|
}
|
|
78
|
-
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/anthropic/edge/google-vertex-anthropic-provider-edge.d.ts
|
|
79
82
|
interface GoogleVertexAnthropicProviderSettings extends GoogleVertexAnthropicProviderSettings$1 {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Optional. The Google credentials for the Google Cloud service account. If
|
|
85
|
+
* not provided, the Google Vertex provider will use environment variables to
|
|
86
|
+
* load the credentials.
|
|
87
|
+
*/
|
|
88
|
+
googleCredentials?: GoogleCredentials;
|
|
89
|
+
/**
|
|
90
|
+
* Optional. Override the Bearer token generator. Defaults to OAuth exchange
|
|
91
|
+
* with `googleCredentials`.
|
|
92
|
+
*/
|
|
93
|
+
generateAuthToken?: () => Promise<string>;
|
|
91
94
|
}
|
|
92
|
-
declare function createGoogleVertexAnthropic(options?: GoogleVertexAnthropicProviderSettings): GoogleVertexAnthropicProvider;
|
|
95
|
+
export declare function createGoogleVertexAnthropic(options?: GoogleVertexAnthropicProviderSettings): GoogleVertexAnthropicProvider;
|
|
93
96
|
/**
|
|
94
97
|
* Default Google Vertex AI Anthropic provider instance.
|
|
95
98
|
*/
|
|
96
|
-
declare const googleVertexAnthropic: GoogleVertexAnthropicProvider;
|
|
97
|
-
|
|
98
|
-
export { type GoogleVertexAnthropicProvider, type GoogleVertexAnthropicProviderSettings, createGoogleVertexAnthropic
|
|
99
|
+
export declare const googleVertexAnthropic: GoogleVertexAnthropicProvider;
|
|
100
|
+
//#endregion
|
|
101
|
+
export { type GoogleVertexAnthropicProvider, type GoogleVertexAnthropicProviderSettings, createGoogleVertexAnthropic as createVertexAnthropic, googleVertexAnthropic as vertexAnthropic };
|
|
102
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["GoogleVertexAnthropicProviderSettings","GoogleVertexAnthropicProviderSettingsOriginal"],"sources":["../../../src/edge/google-vertex-auth-edge.ts","../../../src/anthropic/google-vertex-anthropic-options.ts","../../../src/anthropic/google-vertex-anthropic-provider.ts","../../../src/anthropic/edge/google-vertex-anthropic-provider-edge.ts"],"mappings":";;;;UAQiB;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;KCxBU;;;KCgBP,6BAA6B,YACzB;;;;;cAiBI,4BAA4B;UAkFxB,sCAAsC;;;;GAIpD,SAAS,+BAA+B;;;;EAKzC,cAAc,SAAS,+BAA+B;;;;;;;;;EAUtD,cAAc;;;;EAKd,mBAAmB;;UAGJA;;;;EAIf;;;;EAKA;;;;;EAMA;;;;EAKA,UAAU,WAAW;;;;;EAMrB,QAAQ;;;;UC9JO,8CAA8CC;;;;;;EAM7D,oBAAoB;;;;;EAKpB,0BAA0B;;wBAGZ,4BACd,UAAS,wCACR;;;;qBAgBU,uBAAqB"}
|