@ai-sdk/google 3.0.101 → 3.0.102

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.
@@ -5034,7 +5034,7 @@ var GoogleInteractionsLanguageModel = class {
5034
5034
  };
5035
5035
  }
5036
5036
  async getArgs(options) {
5037
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
5037
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
5038
5038
  const warnings = [];
5039
5039
  const opts = await parseProviderOptions2({
5040
5040
  provider: "google",
@@ -5042,6 +5042,20 @@ var GoogleInteractionsLanguageModel = class {
5042
5042
  schema: googleInteractionsLanguageModelOptions
5043
5043
  });
5044
5044
  const isAgent = this.agent != null;
5045
+ if (!isAgent) {
5046
+ if (options.frequencyPenalty != null) {
5047
+ warnings.push({
5048
+ type: "unsupported",
5049
+ feature: "frequencyPenalty"
5050
+ });
5051
+ }
5052
+ if (options.presencePenalty != null) {
5053
+ warnings.push({
5054
+ type: "unsupported",
5055
+ feature: "presencePenalty"
5056
+ });
5057
+ }
5058
+ }
5045
5059
  const hasTools = options.tools != null && options.tools.length > 0;
5046
5060
  let toolsForBody;
5047
5061
  let toolChoiceForBody;
@@ -5125,6 +5139,11 @@ var GoogleInteractionsLanguageModel = class {
5125
5139
  const droppedFields = [];
5126
5140
  if (options.temperature != null) droppedFields.push("temperature");
5127
5141
  if (options.topP != null) droppedFields.push("topP");
5142
+ if (options.topK != null) droppedFields.push("topK");
5143
+ if (options.frequencyPenalty != null)
5144
+ droppedFields.push("frequencyPenalty");
5145
+ if (options.presencePenalty != null)
5146
+ droppedFields.push("presencePenalty");
5128
5147
  if (options.seed != null) droppedFields.push("seed");
5129
5148
  if (options.stopSequences != null && options.stopSequences.length > 0) {
5130
5149
  droppedFields.push("stopSequences");
@@ -5147,11 +5166,12 @@ var GoogleInteractionsLanguageModel = class {
5147
5166
  generationConfig = pruneUndefined({
5148
5167
  temperature: (_l = options.temperature) != null ? _l : void 0,
5149
5168
  top_p: (_m = options.topP) != null ? _m : void 0,
5150
- seed: (_n = options.seed) != null ? _n : void 0,
5169
+ top_k: (_n = options.topK) != null ? _n : void 0,
5170
+ seed: (_o = options.seed) != null ? _o : void 0,
5151
5171
  stop_sequences: options.stopSequences != null && options.stopSequences.length > 0 ? options.stopSequences : void 0,
5152
- max_output_tokens: (_o = options.maxOutputTokens) != null ? _o : void 0,
5153
- thinking_level: (_p = opts == null ? void 0 : opts.thinkingLevel) != null ? _p : void 0,
5154
- thinking_summaries: (_q = opts == null ? void 0 : opts.thinkingSummaries) != null ? _q : void 0,
5172
+ max_output_tokens: (_p = options.maxOutputTokens) != null ? _p : void 0,
5173
+ thinking_level: (_q = opts == null ? void 0 : opts.thinkingLevel) != null ? _q : void 0,
5174
+ thinking_summaries: (_r = opts == null ? void 0 : opts.thinkingSummaries) != null ? _r : void 0,
5155
5175
  tool_choice: toolChoiceForBody
5156
5176
  });
5157
5177
  if ((opts == null ? void 0 : opts.imageConfig) != null) {
@@ -5178,9 +5198,9 @@ var GoogleInteractionsLanguageModel = class {
5178
5198
  if (ac.type === "deep-research") {
5179
5199
  agentConfig = pruneUndefined({
5180
5200
  type: "deep-research",
5181
- thinking_summaries: (_r = ac.thinkingSummaries) != null ? _r : void 0,
5182
- visualization: (_s = ac.visualization) != null ? _s : void 0,
5183
- collaborative_planning: (_t = ac.collaborativePlanning) != null ? _t : void 0
5201
+ thinking_summaries: (_s = ac.thinkingSummaries) != null ? _s : void 0,
5202
+ visualization: (_t = ac.visualization) != null ? _t : void 0,
5203
+ collaborative_planning: (_u = ac.collaborativePlanning) != null ? _u : void 0
5184
5204
  });
5185
5205
  } else if (ac.type === "dynamic") {
5186
5206
  agentConfig = { type: "dynamic" };
@@ -5197,7 +5217,7 @@ var GoogleInteractionsLanguageModel = class {
5197
5217
  environment = opts.environment;
5198
5218
  } else {
5199
5219
  const env = opts.environment;
5200
- const sources = (_u = env.sources) == null ? void 0 : _u.map((s) => {
5220
+ const sources = (_v = env.sources) == null ? void 0 : _v.map((s) => {
5201
5221
  var _a2;
5202
5222
  if (s.type === "inline") {
5203
5223
  return {
@@ -5242,20 +5262,20 @@ var GoogleInteractionsLanguageModel = class {
5242
5262
  tools: toolsForBody,
5243
5263
  response_format: responseFormatEntries.length > 0 ? responseFormatEntries : void 0,
5244
5264
  response_modalities: (opts == null ? void 0 : opts.responseModalities) != null ? opts.responseModalities : void 0,
5245
- previous_interaction_id: (_v = opts == null ? void 0 : opts.previousInteractionId) != null ? _v : void 0,
5246
- service_tier: (_w = opts == null ? void 0 : opts.serviceTier) != null ? _w : void 0,
5247
- store: (_x = opts == null ? void 0 : opts.store) != null ? _x : void 0,
5265
+ previous_interaction_id: (_w = opts == null ? void 0 : opts.previousInteractionId) != null ? _w : void 0,
5266
+ service_tier: (_x = opts == null ? void 0 : opts.serviceTier) != null ? _x : void 0,
5267
+ store: (_y = opts == null ? void 0 : opts.store) != null ? _y : void 0,
5248
5268
  generation_config: generationConfig != null && Object.keys(generationConfig).length > 0 ? generationConfig : void 0,
5249
5269
  agent_config: agentConfig,
5250
5270
  environment,
5251
- background: (_y = opts == null ? void 0 : opts.background) != null ? _y : void 0
5271
+ background: (_z = opts == null ? void 0 : opts.background) != null ? _z : void 0
5252
5272
  });
5253
5273
  return {
5254
5274
  args,
5255
5275
  warnings,
5256
5276
  isAgent,
5257
5277
  isBackground: (opts == null ? void 0 : opts.background) === true,
5258
- pollingTimeoutMs: (_z = opts == null ? void 0 : opts.pollingTimeoutMs) != null ? _z : void 0
5278
+ pollingTimeoutMs: (_A = opts == null ? void 0 : opts.pollingTimeoutMs) != null ? _A : void 0
5259
5279
  };
5260
5280
  }
5261
5281
  async doGenerate(options) {