@ai-sdk/google-vertex 5.0.0-beta.10 → 5.0.0-beta.109

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +937 -8
  2. package/README.md +65 -2
  3. package/dist/anthropic/edge/index.d.ts +18 -151
  4. package/dist/anthropic/edge/index.js +88 -70
  5. package/dist/anthropic/edge/index.js.map +1 -1
  6. package/dist/anthropic/index.d.ts +18 -151
  7. package/dist/anthropic/index.js +88 -81
  8. package/dist/anthropic/index.js.map +1 -1
  9. package/dist/edge/index.d.ts +58 -29
  10. package/dist/edge/index.js +581 -278
  11. package/dist/edge/index.js.map +1 -1
  12. package/dist/index.d.ts +70 -32
  13. package/dist/index.js +590 -296
  14. package/dist/index.js.map +1 -1
  15. package/dist/maas/edge/index.d.ts +76 -0
  16. package/dist/maas/edge/index.js +209 -0
  17. package/dist/maas/edge/index.js.map +1 -0
  18. package/dist/maas/index.d.ts +60 -0
  19. package/dist/maas/index.js +109 -0
  20. package/dist/maas/index.js.map +1 -0
  21. package/dist/xai/edge/index.d.ts +92 -0
  22. package/dist/xai/edge/index.js +259 -0
  23. package/dist/xai/edge/index.js.map +1 -0
  24. package/dist/xai/index.d.ts +76 -0
  25. package/dist/xai/index.js +159 -0
  26. package/dist/xai/index.js.map +1 -0
  27. package/docs/16-google-vertex.mdx +640 -102
  28. package/maas/edge.d.ts +1 -0
  29. package/maas/index.d.ts +1 -0
  30. package/package.json +49 -24
  31. package/src/anthropic/edge/google-vertex-anthropic-provider-edge.ts +17 -13
  32. package/src/anthropic/edge/index.ts +6 -2
  33. package/src/anthropic/{google-vertex-anthropic-messages-options.ts → google-vertex-anthropic-options.ts} +4 -1
  34. package/src/anthropic/google-vertex-anthropic-provider-node.ts +18 -13
  35. package/src/anthropic/google-vertex-anthropic-provider.ts +68 -19
  36. package/src/anthropic/index.ts +6 -2
  37. package/src/edge/google-vertex-provider-edge.ts +10 -12
  38. package/src/edge/index.ts +8 -1
  39. package/src/google-vertex-auth-google-auth-library.ts +13 -26
  40. package/src/google-vertex-config.ts +2 -2
  41. package/src/{google-vertex-embedding-options.ts → google-vertex-embedding-model-options.ts} +1 -0
  42. package/src/google-vertex-embedding-model.ts +35 -10
  43. package/src/google-vertex-image-model-options.ts +74 -0
  44. package/src/google-vertex-image-model.ts +106 -133
  45. package/src/google-vertex-options.ts +1 -1
  46. package/src/google-vertex-provider-base.ts +311 -0
  47. package/src/google-vertex-provider.ts +43 -233
  48. package/src/google-vertex-speech-model-options.ts +11 -0
  49. package/src/google-vertex-transcription-model-options.ts +46 -0
  50. package/src/google-vertex-transcription-model.ts +231 -0
  51. package/src/google-vertex-video-model-options.ts +49 -0
  52. package/src/google-vertex-video-model.ts +39 -75
  53. package/src/index.ts +20 -5
  54. package/src/maas/edge/google-vertex-maas-provider-edge.ts +64 -0
  55. package/src/maas/edge/index.ts +13 -0
  56. package/src/maas/google-vertex-maas-options.ts +15 -0
  57. package/src/maas/google-vertex-maas-provider-node.ts +65 -0
  58. package/src/maas/google-vertex-maas-provider.ts +122 -0
  59. package/src/maas/index.ts +13 -0
  60. package/src/xai/edge/google-vertex-xai-provider-edge.ts +61 -0
  61. package/src/xai/edge/index.ts +9 -0
  62. package/src/xai/google-vertex-xai-options.ts +7 -0
  63. package/src/xai/google-vertex-xai-provider-node.ts +62 -0
  64. package/src/xai/google-vertex-xai-provider.ts +212 -0
  65. package/src/xai/index.ts +9 -0
  66. package/xai/edge.d.ts +1 -0
  67. package/xai/index.d.ts +1 -0
  68. package/dist/anthropic/edge/index.d.mts +0 -231
  69. package/dist/anthropic/edge/index.mjs +0 -259
  70. package/dist/anthropic/edge/index.mjs.map +0 -1
  71. package/dist/anthropic/index.d.mts +0 -215
  72. package/dist/anthropic/index.mjs +0 -164
  73. package/dist/anthropic/index.mjs.map +0 -1
  74. package/dist/edge/index.d.mts +0 -160
  75. package/dist/edge/index.mjs +0 -1049
  76. package/dist/edge/index.mjs.map +0 -1
  77. package/dist/index.d.mts +0 -219
  78. package/dist/index.mjs +0 -960
  79. package/dist/index.mjs.map +0 -1
  80. package/src/google-vertex-provider-node.ts +0 -49
@@ -0,0 +1,76 @@
1
+ import { GoogleAuthOptions } from 'google-auth-library';
2
+ import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
3
+ import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
4
+
5
+ type GoogleVertexXaiModelId = 'xai/grok-4.20-reasoning' | 'xai/grok-4.20-non-reasoning' | 'xai/grok-4.1-fast-reasoning' | 'xai/grok-4.1-fast-non-reasoning' | (string & {});
6
+
7
+ interface GoogleVertexXaiProvider extends ProviderV4 {
8
+ /**
9
+ * Creates a model for text generation.
10
+ */
11
+ (modelId: GoogleVertexXaiModelId): LanguageModelV4;
12
+ /**
13
+ * Creates a model for text generation.
14
+ */
15
+ languageModel(modelId: GoogleVertexXaiModelId): LanguageModelV4;
16
+ /**
17
+ * Creates a chat model for text generation.
18
+ */
19
+ chatModel(modelId: GoogleVertexXaiModelId): LanguageModelV4;
20
+ /**
21
+ * @deprecated Use `embeddingModel` instead.
22
+ */
23
+ textEmbeddingModel(modelId: string): never;
24
+ }
25
+ interface GoogleVertexXaiProviderSettings$1 {
26
+ /**
27
+ * Google Cloud project ID. Defaults to the value of the `GOOGLE_VERTEX_PROJECT` environment variable.
28
+ */
29
+ project?: string;
30
+ /**
31
+ * Google Cloud location/region. Defaults to the value of the `GOOGLE_VERTEX_LOCATION` environment variable.
32
+ * Use 'global' for the global endpoint.
33
+ */
34
+ location?: string;
35
+ /**
36
+ * Base URL for the API calls. If not provided, will be constructed from project and location.
37
+ */
38
+ baseURL?: string;
39
+ /**
40
+ * Headers to use for requests. Can be:
41
+ * - A headers object
42
+ * - A Promise that resolves to a headers object
43
+ * - A function that returns a headers object
44
+ * - A function that returns a Promise of a headers object
45
+ */
46
+ headers?: Resolvable<Record<string, string | undefined>>;
47
+ /**
48
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
49
+ * or to provide a custom fetch implementation for e.g. testing.
50
+ */
51
+ fetch?: FetchFunction;
52
+ }
53
+
54
+ interface GoogleVertexXaiProviderSettings extends GoogleVertexXaiProviderSettings$1 {
55
+ /**
56
+ * Optional. The Authentication options provided by google-auth-library.
57
+ * Complete list of authentication options is documented in the
58
+ * GoogleAuthOptions interface:
59
+ * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts.
60
+ */
61
+ googleAuthOptions?: GoogleAuthOptions;
62
+ }
63
+ /**
64
+ * Create a Google Vertex AI xAI provider instance for Node.js.
65
+ * Uses the OpenAI-compatible Chat Completions API for Grok partner models.
66
+ * Automatically handles Google Cloud authentication.
67
+ *
68
+ * @see https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/grok
69
+ */
70
+ declare function createGoogleVertexXai(options?: GoogleVertexXaiProviderSettings): GoogleVertexXaiProvider;
71
+ /**
72
+ * Default Google Vertex AI xAI provider instance for Node.js.
73
+ */
74
+ declare const googleVertexXai: GoogleVertexXaiProvider;
75
+
76
+ export { type GoogleVertexXaiModelId, type GoogleVertexXaiProvider, type GoogleVertexXaiProviderSettings, createGoogleVertexXai, googleVertexXai };
@@ -0,0 +1,159 @@
1
+ // src/xai/google-vertex-xai-provider-node.ts
2
+ import { resolve } from "@ai-sdk/provider-utils";
3
+
4
+ // src/google-vertex-auth-google-auth-library.ts
5
+ import { GoogleAuth } from "google-auth-library";
6
+ function createAuthTokenGenerator(options) {
7
+ const auth = new GoogleAuth({
8
+ scopes: ["https://www.googleapis.com/auth/cloud-platform"],
9
+ ...options
10
+ });
11
+ return async function generateAuthToken() {
12
+ var _a;
13
+ const client = await auth.getClient();
14
+ const token = await client.getAccessToken();
15
+ return (_a = token == null ? void 0 : token.token) != null ? _a : null;
16
+ };
17
+ }
18
+
19
+ // src/xai/google-vertex-xai-provider.ts
20
+ import {
21
+ NoSuchModelError
22
+ } from "@ai-sdk/provider";
23
+ import {
24
+ createOpenAICompatible
25
+ } from "@ai-sdk/openai-compatible";
26
+ import {
27
+ loadOptionalSetting,
28
+ loadSetting,
29
+ withoutTrailingSlash
30
+ } from "@ai-sdk/provider-utils";
31
+ function convertGoogleVertexXaiUsage(usage) {
32
+ var _a, _b, _c, _d, _e, _f;
33
+ if (usage == null) {
34
+ return {
35
+ inputTokens: {
36
+ total: void 0,
37
+ noCache: void 0,
38
+ cacheRead: void 0,
39
+ cacheWrite: void 0
40
+ },
41
+ outputTokens: {
42
+ total: void 0,
43
+ text: void 0,
44
+ reasoning: void 0
45
+ },
46
+ raw: void 0
47
+ };
48
+ }
49
+ const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;
50
+ const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;
51
+ const cacheReadTokens = (_d = (_c = usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0;
52
+ const reasoningTokens = (_f = (_e = usage.completion_tokens_details) == null ? void 0 : _e.reasoning_tokens) != null ? _f : 0;
53
+ return {
54
+ inputTokens: {
55
+ total: promptTokens,
56
+ noCache: promptTokens - cacheReadTokens,
57
+ cacheRead: cacheReadTokens,
58
+ cacheWrite: void 0
59
+ },
60
+ outputTokens: {
61
+ total: completionTokens + reasoningTokens,
62
+ text: completionTokens,
63
+ reasoning: reasoningTokens
64
+ },
65
+ raw: usage
66
+ };
67
+ }
68
+ function transformGoogleVertexXaiRequestBody(args) {
69
+ const { reasoning_effort: _reasoningEffort, ...rest } = args;
70
+ return rest;
71
+ }
72
+ function createGoogleVertexXai(options = {}) {
73
+ const loadLocation = () => loadOptionalSetting({
74
+ settingValue: options.location,
75
+ environmentVariableName: "GOOGLE_VERTEX_LOCATION"
76
+ });
77
+ const loadProject = () => loadSetting({
78
+ settingValue: options.project,
79
+ settingName: "project",
80
+ environmentVariableName: "GOOGLE_VERTEX_PROJECT",
81
+ description: "Google Vertex project"
82
+ });
83
+ const constructBaseURL = () => {
84
+ var _a;
85
+ const projectId = loadProject();
86
+ const location = (_a = loadLocation()) != null ? _a : "global";
87
+ return `https://aiplatform.googleapis.com/v1/projects/${projectId}/locations/${location}/endpoints/openapi`;
88
+ };
89
+ const loadBaseURL = () => {
90
+ var _a;
91
+ return withoutTrailingSlash((_a = options.baseURL) != null ? _a : "") || constructBaseURL();
92
+ };
93
+ let cachedProvider;
94
+ const getProvider = () => cachedProvider != null ? cachedProvider : cachedProvider = createOpenAICompatible({
95
+ name: "googleVertex.xai",
96
+ baseURL: loadBaseURL(),
97
+ fetch: options.fetch,
98
+ includeUsage: true,
99
+ supportsStructuredOutputs: true,
100
+ supportedUrls: () => ({
101
+ "image/*": [/^https?:\/\/.*$/]
102
+ }),
103
+ transformRequestBody: transformGoogleVertexXaiRequestBody,
104
+ convertUsage: convertGoogleVertexXaiUsage
105
+ });
106
+ const createChatModel = (modelId) => getProvider().languageModel(modelId);
107
+ const provider = function(modelId) {
108
+ if (new.target) {
109
+ throw new Error(
110
+ "The Google Vertex xAI model function cannot be called with the new keyword."
111
+ );
112
+ }
113
+ return createChatModel(modelId);
114
+ };
115
+ provider.specificationVersion = "v4";
116
+ provider.languageModel = createChatModel;
117
+ provider.chatModel = (modelId) => getProvider().chatModel(modelId);
118
+ provider.embeddingModel = (modelId) => {
119
+ throw new NoSuchModelError({ modelId, modelType: "embeddingModel" });
120
+ };
121
+ provider.textEmbeddingModel = provider.embeddingModel;
122
+ provider.imageModel = (modelId) => {
123
+ throw new NoSuchModelError({ modelId, modelType: "imageModel" });
124
+ };
125
+ return provider;
126
+ }
127
+
128
+ // src/xai/google-vertex-xai-provider-node.ts
129
+ function createGoogleVertexXai2(options = {}) {
130
+ const generateAuthToken = createAuthTokenGenerator(options.googleAuthOptions);
131
+ const customFetch = async (url, init) => {
132
+ var _a;
133
+ const token = await generateAuthToken();
134
+ const resolvedHeaders = await resolve(options.headers);
135
+ const authHeaders = {
136
+ ...resolvedHeaders,
137
+ Authorization: `Bearer ${token}`
138
+ };
139
+ const fetchInit = {
140
+ ...init,
141
+ headers: {
142
+ ...init == null ? void 0 : init.headers,
143
+ ...authHeaders
144
+ }
145
+ };
146
+ return ((_a = options.fetch) != null ? _a : fetch)(url, fetchInit);
147
+ };
148
+ return createGoogleVertexXai({
149
+ ...options,
150
+ fetch: customFetch,
151
+ headers: void 0
152
+ });
153
+ }
154
+ var googleVertexXai = createGoogleVertexXai2();
155
+ export {
156
+ createGoogleVertexXai2 as createGoogleVertexXai,
157
+ googleVertexXai
158
+ };
159
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/xai/google-vertex-xai-provider-node.ts","../../src/google-vertex-auth-google-auth-library.ts","../../src/xai/google-vertex-xai-provider.ts"],"sourcesContent":["import { resolve, type FetchFunction } from '@ai-sdk/provider-utils';\nimport type { GoogleAuthOptions } from 'google-auth-library';\nimport { createAuthTokenGenerator } from '../google-vertex-auth-google-auth-library';\nimport {\n createGoogleVertexXai as createGoogleVertexXaiOriginal,\n type GoogleVertexXaiProvider,\n type GoogleVertexXaiProviderSettings as GoogleVertexXaiProviderSettingsOriginal,\n} from './google-vertex-xai-provider';\nexport type { GoogleVertexXaiProvider };\n\nexport interface GoogleVertexXaiProviderSettings extends GoogleVertexXaiProviderSettingsOriginal {\n /**\n * Optional. The Authentication options provided by google-auth-library.\n * Complete list of authentication options is documented in the\n * GoogleAuthOptions interface:\n * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts.\n */\n googleAuthOptions?: GoogleAuthOptions;\n}\n\n/**\n * Create a Google Vertex AI xAI provider instance for Node.js.\n * Uses the OpenAI-compatible Chat Completions API for Grok partner models.\n * Automatically handles Google Cloud authentication.\n *\n * @see https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/grok\n */\nexport function createGoogleVertexXai(\n options: GoogleVertexXaiProviderSettings = {},\n): GoogleVertexXaiProvider {\n const generateAuthToken = createAuthTokenGenerator(options.googleAuthOptions);\n\n const customFetch: FetchFunction = async (url, init) => {\n const token = await generateAuthToken();\n const resolvedHeaders = await resolve(options.headers);\n const authHeaders = {\n ...resolvedHeaders,\n Authorization: `Bearer ${token}`,\n };\n\n const fetchInit = {\n ...init,\n headers: {\n ...init?.headers,\n ...authHeaders,\n },\n };\n\n return (options.fetch ?? fetch)(url, fetchInit);\n };\n\n return createGoogleVertexXaiOriginal({\n ...options,\n fetch: customFetch,\n headers: undefined,\n });\n}\n\n/**\n * Default Google Vertex AI xAI provider instance for Node.js.\n */\nexport const googleVertexXai = createGoogleVertexXai();\n","import { GoogleAuth, type GoogleAuthOptions } from 'google-auth-library';\n\nexport function createAuthTokenGenerator(options?: GoogleAuthOptions) {\n const auth = new GoogleAuth({\n scopes: ['https://www.googleapis.com/auth/cloud-platform'],\n ...options,\n });\n\n return async function generateAuthToken() {\n const client = await auth.getClient();\n const token = await client.getAccessToken();\n return token?.token ?? null;\n };\n}\n","import {\n NoSuchModelError,\n type LanguageModelV4,\n type LanguageModelV4Usage,\n type ProviderV4,\n} from '@ai-sdk/provider';\nimport {\n createOpenAICompatible,\n type OpenAICompatibleProvider,\n} from '@ai-sdk/openai-compatible';\nimport {\n loadOptionalSetting,\n loadSetting,\n withoutTrailingSlash,\n type FetchFunction,\n type Resolvable,\n} from '@ai-sdk/provider-utils';\nimport type { GoogleVertexXaiModelId } from './google-vertex-xai-options';\n\nexport interface GoogleVertexXaiProvider extends ProviderV4 {\n /**\n * Creates a model for text generation.\n */\n (modelId: GoogleVertexXaiModelId): LanguageModelV4;\n\n /**\n * Creates a model for text generation.\n */\n languageModel(modelId: GoogleVertexXaiModelId): LanguageModelV4;\n\n /**\n * Creates a chat model for text generation.\n */\n chatModel(modelId: GoogleVertexXaiModelId): LanguageModelV4;\n\n /**\n * @deprecated Use `embeddingModel` instead.\n */\n textEmbeddingModel(modelId: string): never;\n}\n\nexport interface GoogleVertexXaiProviderSettings {\n /**\n * Google Cloud project ID. Defaults to the value of the `GOOGLE_VERTEX_PROJECT` environment variable.\n */\n project?: string;\n\n /**\n * Google Cloud location/region. Defaults to the value of the `GOOGLE_VERTEX_LOCATION` environment variable.\n * Use 'global' for the global endpoint.\n */\n location?: string;\n\n /**\n * Base URL for the API calls. If not provided, will be constructed from project and location.\n */\n baseURL?: string;\n\n /**\n * Headers to use for requests. Can be:\n * - A headers object\n * - A Promise that resolves to a headers object\n * - A function that returns a headers object\n * - A function that returns a Promise of a headers object\n */\n headers?: Resolvable<Record<string, string | undefined>>;\n\n /**\n * Custom fetch implementation. You can use it as a middleware to intercept requests,\n * or to provide a custom fetch implementation for e.g. testing.\n */\n fetch?: FetchFunction;\n}\n\ntype GoogleVertexXaiUsage =\n | {\n prompt_tokens?: number | null;\n completion_tokens?: number | null;\n prompt_tokens_details?: {\n cached_tokens?: number | null;\n } | null;\n completion_tokens_details?: {\n reasoning_tokens?: number | null;\n } | null;\n }\n | undefined\n | null;\n\nfunction convertGoogleVertexXaiUsage(\n usage: GoogleVertexXaiUsage,\n): LanguageModelV4Usage {\n if (usage == null) {\n return {\n inputTokens: {\n total: undefined,\n noCache: undefined,\n cacheRead: undefined,\n cacheWrite: undefined,\n },\n outputTokens: {\n total: undefined,\n text: undefined,\n reasoning: undefined,\n },\n raw: undefined,\n };\n }\n\n const promptTokens = usage.prompt_tokens ?? 0;\n const completionTokens = usage.completion_tokens ?? 0;\n const cacheReadTokens = usage.prompt_tokens_details?.cached_tokens ?? 0;\n const reasoningTokens =\n usage.completion_tokens_details?.reasoning_tokens ?? 0;\n\n return {\n inputTokens: {\n total: promptTokens,\n noCache: promptTokens - cacheReadTokens,\n cacheRead: cacheReadTokens,\n cacheWrite: undefined,\n },\n outputTokens: {\n total: completionTokens + reasoningTokens,\n text: completionTokens,\n reasoning: reasoningTokens,\n },\n raw: usage,\n };\n}\n\nfunction transformGoogleVertexXaiRequestBody(args: Record<string, any>) {\n const { reasoning_effort: _reasoningEffort, ...rest } = args;\n return rest;\n}\n\n/**\n * Create a Google Vertex AI xAI provider instance.\n * Uses the OpenAI-compatible Chat Completions API for Grok partner models.\n *\n * @see https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/grok\n */\nexport function createGoogleVertexXai(\n options: GoogleVertexXaiProviderSettings = {},\n): GoogleVertexXaiProvider {\n const loadLocation = () =>\n loadOptionalSetting({\n settingValue: options.location,\n environmentVariableName: 'GOOGLE_VERTEX_LOCATION',\n });\n\n const loadProject = () =>\n loadSetting({\n settingValue: options.project,\n settingName: 'project',\n environmentVariableName: 'GOOGLE_VERTEX_PROJECT',\n description: 'Google Vertex project',\n });\n\n const constructBaseURL = () => {\n const projectId = loadProject();\n const location = loadLocation() ?? 'global';\n\n return `https://aiplatform.googleapis.com/v1/projects/${projectId}/locations/${location}/endpoints/openapi`;\n };\n\n const loadBaseURL = () =>\n withoutTrailingSlash(options.baseURL ?? '') || constructBaseURL();\n\n let cachedProvider:\n | OpenAICompatibleProvider<GoogleVertexXaiModelId, string, string, string>\n | undefined;\n const getProvider = () =>\n (cachedProvider ??= createOpenAICompatible({\n name: 'googleVertex.xai',\n baseURL: loadBaseURL(),\n fetch: options.fetch,\n includeUsage: true,\n supportsStructuredOutputs: true,\n supportedUrls: () => ({\n 'image/*': [/^https?:\\/\\/.*$/],\n }),\n transformRequestBody: transformGoogleVertexXaiRequestBody,\n convertUsage: convertGoogleVertexXaiUsage,\n }));\n\n const createChatModel = (modelId: GoogleVertexXaiModelId) =>\n getProvider().languageModel(modelId);\n\n const provider = function (modelId: GoogleVertexXaiModelId) {\n if (new.target) {\n throw new Error(\n 'The Google Vertex xAI model function cannot be called with the new keyword.',\n );\n }\n\n return createChatModel(modelId);\n };\n\n provider.specificationVersion = 'v4' as const;\n provider.languageModel = createChatModel;\n provider.chatModel = (modelId: GoogleVertexXaiModelId) =>\n getProvider().chatModel(modelId);\n provider.embeddingModel = (modelId: string): never => {\n throw new NoSuchModelError({ modelId, modelType: 'embeddingModel' });\n };\n provider.textEmbeddingModel = provider.embeddingModel;\n provider.imageModel = (modelId: string): never => {\n throw new NoSuchModelError({ modelId, modelType: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