@langchain/google-vertexai-web 2.3.2 → 2.3.4
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 +15 -0
- package/README.md +25 -0
- package/dist/chat_models.cjs +1 -1
- package/dist/chat_models.d.cts +2 -3
- package/dist/chat_models.d.cts.map +1 -1
- package/dist/chat_models.d.ts +2 -3
- package/dist/chat_models.d.ts.map +1 -1
- package/dist/chat_models.js +1 -1
- package/dist/embeddings.d.cts +2 -3
- package/dist/embeddings.d.cts.map +1 -1
- package/dist/embeddings.d.ts +2 -3
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/llms.cjs +1 -1
- package/dist/llms.d.cts +2 -3
- package/dist/llms.d.cts.map +1 -1
- package/dist/llms.d.ts +2 -3
- package/dist/llms.d.ts.map +1 -1
- package/dist/llms.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @langchain/google-vertexai-web
|
|
2
2
|
|
|
3
|
+
## 2.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @langchain/google-webauth@2.3.4
|
|
9
|
+
|
|
10
|
+
## 2.3.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#11988](https://github.com/langchain-ai/langchainjs/pull/11988) [`2a37b67`](https://github.com/langchain-ai/langchainjs/commit/2a37b672115a99136d645c3f96633d00421312d6) Thanks [@jacoblee93](https://github.com/jacoblee93)! - Backport LangSmith gateway routing to `ChatVertexAI` in the Node and web packages through `@langchain/google-common`, including streaming, custom gateway URLs, and explicit regional project configuration. Honor custom endpoints in Vertex Express requests.
|
|
15
|
+
- Updated dependencies []:
|
|
16
|
+
- @langchain/google-webauth@2.3.3
|
|
17
|
+
|
|
3
18
|
## 2.3.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -33,3 +33,28 @@ credentials from the first of the following that apply:
|
|
|
33
33
|
`GOOGLE_WEB_CREDENTIALS`
|
|
34
34
|
5. The Service Account credentials that are saved directly into the
|
|
35
35
|
`GOOGLE_VERTEX_AI_WEB_CREDENTIALS` (deprecated)
|
|
36
|
+
|
|
37
|
+
## LangSmith gateway
|
|
38
|
+
|
|
39
|
+
Set `LANGSMITH_GATEWAY=true` and `LANGSMITH_GATEWAY_API_KEY` to route
|
|
40
|
+
`ChatVertexAI` through the gateway's `/vertex` endpoint. The gateway key falls
|
|
41
|
+
back to `LANGSMITH_API_KEY`. Set `LANGSMITH_GATEWAY` to a custom gateway root URL
|
|
42
|
+
to use a different host or path prefix.
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { ChatVertexAI } from "@langchain/google-vertexai-web";
|
|
46
|
+
|
|
47
|
+
const model = new ChatVertexAI({ model: "gemini-2.5-flash" });
|
|
48
|
+
const response = await model.invoke("Hello!");
|
|
49
|
+
console.log(response.content);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Vertex Express requests do not require Google web credentials when a gateway API
|
|
53
|
+
key is configured. To preserve project and regional routing, pass service-account
|
|
54
|
+
credentials in `authOptions.credentials` and a `location`. The project ID comes
|
|
55
|
+
from those credentials, but requests use the selected API key rather than Google
|
|
56
|
+
OAuth. An explicit `apiKey` takes precedence over the gateway key. An explicit
|
|
57
|
+
`endpoint` opts out of automatic gateway routing and gateway-key selection.
|
|
58
|
+
|
|
59
|
+
Keep gateway API keys in trusted server or edge runtimes, not public browser
|
|
60
|
+
bundles.
|
package/dist/chat_models.cjs
CHANGED
|
@@ -303,7 +303,7 @@ var ChatVertexAI = class extends _langchain_google_webauth.ChatGoogle {
|
|
|
303
303
|
...fields,
|
|
304
304
|
platformType: "gcp"
|
|
305
305
|
});
|
|
306
|
-
this._addVersion("@langchain/google-vertexai-web", "2.3.
|
|
306
|
+
this._addVersion("@langchain/google-vertexai-web", "2.3.4");
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
309
|
//#endregion
|
package/dist/chat_models.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { ChatGoogle, ChatGoogleInput } from "@langchain/google-webauth";
|
|
|
3
3
|
/**
|
|
4
4
|
* Input to a Google Vertex AI chat model class.
|
|
5
5
|
*/
|
|
6
|
-
interface ChatVertexAIInput extends ChatGoogleInput {}
|
|
6
|
+
export interface ChatVertexAIInput extends ChatGoogleInput {}
|
|
7
7
|
/**
|
|
8
8
|
* Integration with Google Vertex AI chat models in web environments.
|
|
9
9
|
*
|
|
@@ -289,12 +289,11 @@ interface ChatVertexAIInput extends ChatGoogleInput {}
|
|
|
289
289
|
*
|
|
290
290
|
* <br />
|
|
291
291
|
*/
|
|
292
|
-
declare class ChatVertexAI extends ChatGoogle {
|
|
292
|
+
export declare class ChatVertexAI extends ChatGoogle {
|
|
293
293
|
lc_namespace: string[];
|
|
294
294
|
static lc_name(): string;
|
|
295
295
|
constructor(model: string, fields?: Omit<ChatVertexAIInput, "model">);
|
|
296
296
|
constructor(fields?: ChatVertexAIInput);
|
|
297
297
|
}
|
|
298
298
|
//#endregion
|
|
299
|
-
export { ChatVertexAI, ChatVertexAIInput };
|
|
300
299
|
//# sourceMappingURL=chat_models.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_models.d.cts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"chat_models.d.cts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;iBAKiB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA+R9B,qBAAqB;EAChC;SAEO;EAIP,YAAY,eAAe,SAAS,KAAK;EACzC,YAAY,SAAS"}
|
package/dist/chat_models.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ChatGoogle, ChatGoogleInput } from "@langchain/google-webauth";
|
|
|
3
3
|
/**
|
|
4
4
|
* Input to a Google Vertex AI chat model class.
|
|
5
5
|
*/
|
|
6
|
-
interface ChatVertexAIInput extends ChatGoogleInput {}
|
|
6
|
+
export interface ChatVertexAIInput extends ChatGoogleInput {}
|
|
7
7
|
/**
|
|
8
8
|
* Integration with Google Vertex AI chat models in web environments.
|
|
9
9
|
*
|
|
@@ -289,12 +289,11 @@ interface ChatVertexAIInput extends ChatGoogleInput {}
|
|
|
289
289
|
*
|
|
290
290
|
* <br />
|
|
291
291
|
*/
|
|
292
|
-
declare class ChatVertexAI extends ChatGoogle {
|
|
292
|
+
export declare class ChatVertexAI extends ChatGoogle {
|
|
293
293
|
lc_namespace: string[];
|
|
294
294
|
static lc_name(): string;
|
|
295
295
|
constructor(model: string, fields?: Omit<ChatVertexAIInput, "model">);
|
|
296
296
|
constructor(fields?: ChatVertexAIInput);
|
|
297
297
|
}
|
|
298
298
|
//#endregion
|
|
299
|
-
export { ChatVertexAI, ChatVertexAIInput };
|
|
300
299
|
//# sourceMappingURL=chat_models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_models.d.ts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"chat_models.d.ts","names":[],"sources":["../src/chat_models.ts"],"mappings":";;;;;iBAKiB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA+R9B,qBAAqB;EAChC;SAEO;EAIP,YAAY,eAAe,SAAS,KAAK;EACzC,YAAY,SAAS"}
|
package/dist/chat_models.js
CHANGED
|
@@ -303,7 +303,7 @@ var ChatVertexAI = class extends ChatGoogle {
|
|
|
303
303
|
...fields,
|
|
304
304
|
platformType: "gcp"
|
|
305
305
|
});
|
|
306
|
-
this._addVersion("@langchain/google-vertexai-web", "2.3.
|
|
306
|
+
this._addVersion("@langchain/google-vertexai-web", "2.3.4");
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
309
|
//#endregion
|
package/dist/embeddings.d.cts
CHANGED
|
@@ -3,15 +3,14 @@ import { GoogleEmbeddings, GoogleEmbeddingsInput } from "@langchain/google-webau
|
|
|
3
3
|
/**
|
|
4
4
|
* Input to a Google Vertex AI embeddings class.
|
|
5
5
|
*/
|
|
6
|
-
interface GoogleVertexAIEmbeddingsInput extends GoogleEmbeddingsInput {}
|
|
6
|
+
export interface GoogleVertexAIEmbeddingsInput extends GoogleEmbeddingsInput {}
|
|
7
7
|
/**
|
|
8
8
|
* Integration with a Google Vertex AI embeddings model using
|
|
9
9
|
* the "@langchain/google-webauth" package for auth.
|
|
10
10
|
*/
|
|
11
|
-
declare class VertexAIEmbeddings extends GoogleEmbeddings {
|
|
11
|
+
export declare class VertexAIEmbeddings extends GoogleEmbeddings {
|
|
12
12
|
static lc_name(): string;
|
|
13
13
|
constructor(fields: GoogleVertexAIEmbeddingsInput);
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { GoogleVertexAIEmbeddingsInput, VertexAIEmbeddings };
|
|
17
16
|
//# sourceMappingURL=embeddings.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.cts","names":[],"sources":["../src/embeddings.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"embeddings.d.cts","names":[],"sources":["../src/embeddings.ts"],"mappings":";;;;;iBAQiB,sCAAsC;;;;;qBAM1C,2BAA2B;SAC/B;EAIP,YAAY,QAAQ"}
|
package/dist/embeddings.d.ts
CHANGED
|
@@ -3,15 +3,14 @@ import { GoogleEmbeddings, GoogleEmbeddingsInput } from "@langchain/google-webau
|
|
|
3
3
|
/**
|
|
4
4
|
* Input to a Google Vertex AI embeddings class.
|
|
5
5
|
*/
|
|
6
|
-
interface GoogleVertexAIEmbeddingsInput extends GoogleEmbeddingsInput {}
|
|
6
|
+
export interface GoogleVertexAIEmbeddingsInput extends GoogleEmbeddingsInput {}
|
|
7
7
|
/**
|
|
8
8
|
* Integration with a Google Vertex AI embeddings model using
|
|
9
9
|
* the "@langchain/google-webauth" package for auth.
|
|
10
10
|
*/
|
|
11
|
-
declare class VertexAIEmbeddings extends GoogleEmbeddings {
|
|
11
|
+
export declare class VertexAIEmbeddings extends GoogleEmbeddings {
|
|
12
12
|
static lc_name(): string;
|
|
13
13
|
constructor(fields: GoogleVertexAIEmbeddingsInput);
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { GoogleVertexAIEmbeddingsInput, VertexAIEmbeddings };
|
|
17
16
|
//# sourceMappingURL=embeddings.d.ts.map
|
package/dist/embeddings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.ts","names":[],"sources":["../src/embeddings.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"embeddings.d.ts","names":[],"sources":["../src/embeddings.ts"],"mappings":";;;;;iBAQiB,sCAAsC;;;;;qBAM1C,2BAA2B;SAC/B;EAIP,YAAY,QAAQ"}
|
package/dist/llms.cjs
CHANGED
|
@@ -18,7 +18,7 @@ var VertexAI = class extends _langchain_google_webauth.GoogleLLM {
|
|
|
18
18
|
...fields,
|
|
19
19
|
platformType: "gcp"
|
|
20
20
|
});
|
|
21
|
-
this._addVersion("@langchain/google-vertexai-web", "2.3.
|
|
21
|
+
this._addVersion("@langchain/google-vertexai-web", "2.3.4");
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
package/dist/llms.d.cts
CHANGED
|
@@ -3,16 +3,15 @@ import { GoogleLLM, GoogleLLMInput } from "@langchain/google-webauth";
|
|
|
3
3
|
/**
|
|
4
4
|
* Input to a Google Vertex LLM class.
|
|
5
5
|
*/
|
|
6
|
-
interface VertexAIInput extends GoogleLLMInput {}
|
|
6
|
+
export interface VertexAIInput extends GoogleLLMInput {}
|
|
7
7
|
/**
|
|
8
8
|
* Integration with a Google Vertex AI LLM using
|
|
9
9
|
* the "@langchain/google-webauth" package for auth.
|
|
10
10
|
*/
|
|
11
|
-
declare class VertexAI extends GoogleLLM {
|
|
11
|
+
export declare class VertexAI extends GoogleLLM {
|
|
12
12
|
lc_namespace: string[];
|
|
13
13
|
static lc_name(): string;
|
|
14
14
|
constructor(fields?: VertexAIInput);
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
export { VertexAI, VertexAIInput };
|
|
18
17
|
//# sourceMappingURL=llms.d.cts.map
|
package/dist/llms.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llms.d.cts","names":[],"sources":["../src/llms.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"llms.d.cts","names":[],"sources":["../src/llms.ts"],"mappings":";;;;;iBAKiB,sBAAsB;;;;;qBAM1B,iBAAiB;EAC5B;SAEO;EAIP,YAAY,SAAS"}
|
package/dist/llms.d.ts
CHANGED
|
@@ -3,16 +3,15 @@ import { GoogleLLM, GoogleLLMInput } from "@langchain/google-webauth";
|
|
|
3
3
|
/**
|
|
4
4
|
* Input to a Google Vertex LLM class.
|
|
5
5
|
*/
|
|
6
|
-
interface VertexAIInput extends GoogleLLMInput {}
|
|
6
|
+
export interface VertexAIInput extends GoogleLLMInput {}
|
|
7
7
|
/**
|
|
8
8
|
* Integration with a Google Vertex AI LLM using
|
|
9
9
|
* the "@langchain/google-webauth" package for auth.
|
|
10
10
|
*/
|
|
11
|
-
declare class VertexAI extends GoogleLLM {
|
|
11
|
+
export declare class VertexAI extends GoogleLLM {
|
|
12
12
|
lc_namespace: string[];
|
|
13
13
|
static lc_name(): string;
|
|
14
14
|
constructor(fields?: VertexAIInput);
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
export { VertexAI, VertexAIInput };
|
|
18
17
|
//# sourceMappingURL=llms.d.ts.map
|
package/dist/llms.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llms.d.ts","names":[],"sources":["../src/llms.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"llms.d.ts","names":[],"sources":["../src/llms.ts"],"mappings":";;;;;iBAKiB,sBAAsB;;;;;qBAM1B,iBAAiB;EAC5B;SAEO;EAIP,YAAY,SAAS"}
|
package/dist/llms.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/google-vertexai-web",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"description": "LangChain.js support for Google Vertex AI Web",
|
|
5
5
|
"author": "LangChain",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/providers/langchain-google-vertexai-web/",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@langchain/google-webauth": "2.3.
|
|
17
|
+
"@langchain/google-webauth": "2.3.4"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@tsconfig/recommended": "^1.0.3",
|
|
21
21
|
"dotenv": "^17.4.2",
|
|
22
22
|
"dpdm": "^4.3.0",
|
|
23
23
|
"typescript": "~7.0.2",
|
|
24
|
-
"vitest": "^
|
|
24
|
+
"vitest": "^5.0.2",
|
|
25
25
|
"zod": "^3.25.76",
|
|
26
|
+
"@langchain/google-common": "2.3.4",
|
|
26
27
|
"@langchain/standard-tests": "0.0.23",
|
|
27
|
-
"@langchain/google-common": "2.3.2",
|
|
28
28
|
"@langchain/tsconfig": "0.0.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|