@ai-sdk/google-vertex 5.0.132 → 5.0.133

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.
@@ -1,3 +1,4 @@
1
+ import { getGoogleVertexRequestConfig } from '../google-vertex-model-catalog-config';
1
2
  import { InvalidArgumentError } from '@ai-sdk/provider';
2
3
  import {
3
4
  createOpenAICompatible,
@@ -13,13 +14,9 @@ import {
13
14
  } from '@ai-sdk/provider-utils';
14
15
  import type { GoogleVertexMaasModelId } from './google-vertex-maas-options';
15
16
 
16
- const maxOutputTokensByModel: Record<string, number | undefined> = {
17
- 'meta/llama-4-maverick-17b-128e-instruct-maas': 8192,
18
- 'meta/llama-4-scout-17b-16e-instruct-maas': 8192,
19
- };
20
-
21
17
  function transformGoogleVertexMaasRequestBody(args: Record<string, any>) {
22
- const maxOutputTokens = maxOutputTokensByModel[args.model];
18
+ const maxOutputTokens = getGoogleVertexRequestConfig(args.model).language
19
+ ?.maxOutputTokens;
23
20
 
24
21
  return maxOutputTokens != null && args.max_tokens === undefined
25
22
  ? { ...args, max_tokens: maxOutputTokens }