@core-ai/anthropic-vertex 0.14.0 → 0.16.0

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/README.md CHANGED
@@ -44,12 +44,15 @@ const anthropicVertex = createAnthropicVertex({
44
44
  To authenticate with an explicit service account instead, parse its JSON key and pass it as `credentials`:
45
45
 
46
46
  ```ts
47
+ const rawCredentials = process.env.GOOGLE_APPLICATION_CREDENTIALS_JSON;
48
+ const credentialsJson = rawCredentials?.trim().startsWith('{')
49
+ ? rawCredentials
50
+ : Buffer.from(rawCredentials ?? '', 'base64').toString('utf8');
51
+
47
52
  const anthropicVertex = createAnthropicVertex({
48
53
  projectId: process.env.GOOGLE_VERTEX_PROJECT,
49
54
  region: 'europe-west1',
50
- credentials: JSON.parse(
51
- process.env.GOOGLE_APPLICATION_CREDENTIALS_JSON ?? ''
52
- ),
55
+ credentials: JSON.parse(credentialsJson),
53
56
  });
54
57
  ```
55
58
 
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ type AnthropicVertexProviderOptions = {
8
8
  credentials?: AnthropicVertexServiceAccountCredentials;
9
9
  client?: AnthropicChatClient;
10
10
  defaultMaxTokens?: number;
11
+ useStrictToolSchemas?: boolean;
11
12
  };
12
13
  type AnthropicVertexProvider = {
13
14
  chatModel(modelId: string): ChatModel;
package/dist/index.js CHANGED
@@ -9,8 +9,14 @@ var CLOUD_PLATFORM_AUTH_SCOPE = "https://www.googleapis.com/auth/cloud-platform"
9
9
  function createAnthropicVertex(options = {}) {
10
10
  const client = options.client ?? createAnthropicVertexClient(options);
11
11
  return createAnthropicChatProvider(
12
- { client, defaultMaxTokens: options.defaultMaxTokens },
13
- PROVIDER_ID
12
+ {
13
+ client,
14
+ defaultMaxTokens: options.defaultMaxTokens
15
+ },
16
+ {
17
+ providerId: PROVIDER_ID,
18
+ useStrictToolSchemas: options.useStrictToolSchemas
19
+ }
14
20
  );
15
21
  }
16
22
  function createAnthropicVertexClient(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@core-ai/anthropic-vertex",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Vertex AI Anthropic (Claude) provider package for @core-ai/core-ai",
5
5
  "license": "MIT",
6
6
  "author": "Omnifact (https://omnifact.ai)",
@@ -49,8 +49,8 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@anthropic-ai/vertex-sdk": "^0.19.0",
52
- "@core-ai/anthropic": "^0.14.0",
53
- "@core-ai/core-ai": "^0.14.0",
52
+ "@core-ai/anthropic": "^0.16.0",
53
+ "@core-ai/core-ai": "^0.16.0",
54
54
  "google-auth-library": "^10.2.0"
55
55
  },
56
56
  "peerDependencies": {