@ai-sdk/google 4.0.82 → 4.0.83

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 4.0.83
4
+
5
+ ### Patch Changes
6
+
7
+ - 32cf2f6: fix(google): send the default Gemini Live `thinkingLevel` when `thinkingConfig` sets neither `thinkingLevel` nor `thinkingBudget`, and stop overwriting a raw `generationConfig.thinkingConfig`
8
+ - 525efc5: feat(provider): advertise image model file and mask input support
9
+
10
+ Use confirmed model IDs for capability declarations so unrecognized model names
11
+ remain unknown. Include Together AI FLUX.2 Pro and Flex single-image editing, and
12
+ allow asynchronous capability lookups and middleware overrides to resolve to
13
+ unknown.
14
+
15
+ Advertise QuiverAI Arrow 2 and Arrow 2 Telos file-input support, and mark Together
16
+ AI Gemini image inputs unsupported by the current single-image request mapping.
17
+
18
+ - Updated dependencies [e3605f6]
19
+ - Updated dependencies [525efc5]
20
+ - @ai-sdk/provider-utils@5.0.50
21
+ - @ai-sdk/provider@4.0.19
22
+
3
23
  ## 4.0.82
4
24
 
5
25
  ### Patch Changes
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  import { Experimental_EvaluationLanguageModel as EvaluationLanguageModel } from "@ai-sdk/provider-utils/experimental-evaluation";
9
9
 
10
10
  // src/version.ts
11
- var VERSION = true ? "4.0.82" : "0.0.0-test";
11
+ var VERSION = true ? "4.0.83" : "0.0.0-test";
12
12
 
13
13
  // src/google-embedding-model.ts
14
14
  import {
@@ -3912,6 +3912,11 @@ import {
3912
3912
  WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE3,
3913
3913
  WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE3
3914
3914
  } from "@ai-sdk/provider-utils";
3915
+ var googleImageModelsWithFileInputSupport = /* @__PURE__ */ new Set([
3916
+ "gemini-2.5-flash-image",
3917
+ "gemini-3-pro-image-preview",
3918
+ "gemini-3.1-flash-image-preview"
3919
+ ]);
3915
3920
  var GoogleImageModel = class _GoogleImageModel {
3916
3921
  constructor(modelId, settings, config) {
3917
3922
  this.modelId = modelId;
@@ -3934,6 +3939,12 @@ var GoogleImageModel = class _GoogleImageModel {
3934
3939
  }
3935
3940
  return 1;
3936
3941
  }
3942
+ get supportsFileInputs() {
3943
+ return googleImageModelsWithFileInputSupport.has(this.modelId) ? true : void 0;
3944
+ }
3945
+ get supportsMaskInputs() {
3946
+ return this.supportsFileInputs === true ? false : void 0;
3947
+ }
3937
3948
  get provider() {
3938
3949
  return this.config.provider;
3939
3950
  }
@@ -8405,7 +8416,9 @@ function buildGoogleSessionConfig(config, modelId) {
8405
8416
  if (config?.outputAudioTranscription != null) {
8406
8417
  setup.outputAudioTranscription = {};
8407
8418
  }
8408
- const thinkingConfig = googleOptions?.thinkingConfig ?? (isThinkingLiveModel(modelId) ? { thinkingLevel: "low" } : void 0);
8419
+ const rawGenerationConfig = restProviderOptions.generationConfig;
8420
+ const explicitThinkingConfig = googleOptions?.thinkingConfig ?? (isRecord(rawGenerationConfig) && isRecord(rawGenerationConfig.thinkingConfig) ? rawGenerationConfig.thinkingConfig : void 0);
8421
+ const thinkingConfig = isThinkingLiveModel(modelId) && explicitThinkingConfig?.thinkingLevel == null && explicitThinkingConfig?.thinkingBudget == null ? { ...explicitThinkingConfig, thinkingLevel: "low" } : googleOptions?.thinkingConfig;
8409
8422
  const applyThinkingConfig = () => {
8410
8423
  if (thinkingConfig == null) return;
8411
8424
  const target = isRecord(setup.generationConfig) ? setup.generationConfig : generationConfig;