@broberg/ai-sdk 0.69.3 → 0.69.4

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/dist/index.d.ts CHANGED
@@ -441,6 +441,8 @@ declare const visionInputSchema: z.ZodObject<{
441
441
  medium: "medium";
442
442
  high: "high";
443
443
  }>>;
444
+ maxTokens: z.ZodOptional<z.ZodNumber>;
445
+ temperature: z.ZodOptional<z.ZodNumber>;
444
446
  }, z.core.$strip>;
445
447
  declare const videoInputSchema: z.ZodObject<{
446
448
  tier: z.ZodOptional<z.ZodEnum<{
@@ -1445,8 +1447,8 @@ declare const falStubAdapter: ProviderAdapter;
1445
1447
  * wires the live adapters. */
1446
1448
  declare const stubProviders: Record<string, ProviderAdapter>;
1447
1449
 
1448
- declare const VERSION: "0.69.3";
1449
- declare const SDK_TAG: "@broberg/ai-sdk@0.69.3";
1450
+ declare const VERSION: "0.69.4";
1451
+ declare const SDK_TAG: "@broberg/ai-sdk@0.69.4";
1450
1452
 
1451
1453
  /** Built-in defaults. Every entry is overridable via AiConfig.defaults or a
1452
1454
  * per-call override.
package/dist/index.js CHANGED
@@ -3990,6 +3990,10 @@ var visionInputSchema = z.object({
3990
3990
  system: z.string().optional(),
3991
3991
  /** F085.5 — as on chat: Mistral reasoning effort (Large 4). Mistral only. */
3992
3992
  reasoningEffort: z.enum(["none", "low", "medium", "high"]).optional(),
3993
+ /** F087 — as on chat. Without it the adapter's default applies: Anthropic stops at
3994
+ * 1024 output tokens (measured 2026-10-31: a vision SVG cut off mid-path). */
3995
+ maxTokens: z.number().int().positive().optional(),
3996
+ temperature: z.number().min(0).max(2).optional(),
3993
3997
  ...callOptions
3994
3998
  });
3995
3999
  var videoInputSchema = z.object({
@@ -4203,8 +4207,8 @@ var aiConfigSchema = z.object({
4203
4207
  import { randomUUID } from "crypto";
4204
4208
 
4205
4209
  // src/version.ts
4206
- var VERSION = "0.69.3";
4207
- var SDK_TAG = "@broberg/ai-sdk@0.69.3";
4210
+ var VERSION = "0.69.4";
4211
+ var SDK_TAG = "@broberg/ai-sdk@0.69.4";
4208
4212
 
4209
4213
  // src/cost/sinks/upmetrics.ts
4210
4214
  function isRetryableStatus(status) {
@@ -4835,11 +4839,11 @@ function createAI(config = {}) {
4835
4839
  allowFloating: input.allowFloating,
4836
4840
  estIn: estTokens(input.prompt) + 1e3,
4837
4841
  // prompt + ~1k image payload
4838
- estOut: 512,
4842
+ estOut: input.maxTokens ?? 512,
4839
4843
  invoke: async (spec) => {
4840
4844
  const adapter = pickProvider(spec.provider);
4841
4845
  if (!adapter.vision) throw new Error(`createAI: provider "${spec.provider}" does not support vision`);
4842
- return adapter.vision({ messages, spec, reasoningEffort: input.reasoningEffort });
4846
+ return adapter.vision({ messages, spec, reasoningEffort: input.reasoningEffort, maxTokens: input.maxTokens, temperature: input.temperature });
4843
4847
  }
4844
4848
  });
4845
4849
  },