@mastra/ai-sdk 1.11.2 → 1.11.3

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.
@@ -315,6 +315,7 @@ declare namespace _ai_sdk_provider_utils {
315
315
  delay,
316
316
  downloadBlob,
317
317
  dynamicTool,
318
+ encodePathSegment,
318
319
  executeTool,
319
320
  extractResponseHeaders,
320
321
  fetchWithValidatedEndpoint,
@@ -395,6 +396,36 @@ export declare class AISDKError extends Error {
395
396
  protected static hasMarker(error: unknown, marker: string): boolean;
396
397
  }
397
398
 
399
+ /**
400
+ * AnyValue can be:
401
+ * - a string, number, boolean value
402
+ * - a byte array (Uint8Array)
403
+ * - array of any value
404
+ * - map from string to any value (a plain Object)
405
+ * - null (an empty value)
406
+ *
407
+ * https://opentelemetry.io/docs/specs/otel/common/#anyvalue
408
+ *
409
+ * Notable JavaScript types that are excluded:
410
+ * - `undefined` - Excluding this means the common practice in instrumentations,
411
+ * using `undefined` to mean "no value for this optional attribute", can
412
+ * remain supported.
413
+ * - `BigInt`
414
+ * - TypedArrays other than `Uint8Array`
415
+ * - subclasses of Object, e.g. Date, Error
416
+ *
417
+ * The TypeScript type `unknown` is used for `AnyValue`. This has some
418
+ * implications:
419
+ * - Callers of `@opentelemetry/api` APIs using `AnyValue` can pass in
420
+ * whatever type. This was always the case for (untyped) JavaScript usage.
421
+ * - SDK implementations of `@opentelemetry/api` need to document if/when they
422
+ * support a subset of AnyValue types.
423
+ * - Using `unknown` allows future changes to support more types (e.g. BigInt).
424
+ *
425
+ * @since 1.10.0
426
+ */
427
+ declare type AnyValue = unknown;
428
+
398
429
  export declare class APICallError extends AISDKError {
399
430
  private readonly [symbol$c];
400
431
  readonly url: string;
@@ -452,24 +483,20 @@ declare type asUITool<TOOL extends UITool | Tool> = TOOL extends Tool ? InferUIT
452
483
  export declare type AsyncIterableStream<T> = AsyncIterable<T> & ReadableStream<T>;
453
484
 
454
485
  /**
455
- * Attributes is a map from string to attribute values.
486
+ * Attributes is a mapping from string to attribute values.
487
+ * https://opentelemetry.io/docs/specs/otel/common/#attribute-collections
456
488
  *
457
- * Note: only the own enumerable keys are counted as valid attribute keys.
458
- *
459
- * @since 1.3.0
489
+ * @since 1.1.0
460
490
  */
461
491
  declare interface Attributes {
462
- [attributeKey: string]: AttributeValue | undefined;
492
+ [attributeKey: string]: AnyValue;
463
493
  }
464
494
 
465
495
  /**
466
- * Attribute values may be any non-nullish primitive value except an object.
467
- *
468
- * null or undefined attribute values are invalid and will result in undefined behavior.
469
- *
470
- * @since 1.3.0
496
+ * @since 1.1.0
497
+ * @deprecated use AnyValue
471
498
  */
472
- declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
499
+ declare type AttributeValue = AnyValue;
473
500
 
474
501
  declare type BaseToolCall = {
475
502
  type: 'tool-call';
@@ -2349,7 +2376,16 @@ export declare class EmptyResponseBodyError extends AISDKError {
2349
2376
  static isInstance(error: unknown): error is EmptyResponseBodyError;
2350
2377
  }
2351
2378
 
2379
+ /**
2380
+ * Encodes a raw identifier as one URL path segment, including standalone dot
2381
+ * segments that URL parsers would otherwise normalize. Pass unencoded values;
2382
+ * for resource paths with intentional slashes, encode each segment separately.
2383
+ */
2384
+ declare function encodePathSegment(value: string): string;
2385
+
2352
2386
  declare type EnforcedToolChoice = Extract<LanguageModelV3ToolChoice, {
2387
+ type: 'none';
2388
+ } | {
2353
2389
  type: 'required';
2354
2390
  } | {
2355
2391
  type: 'tool';
@@ -2401,7 +2437,7 @@ declare interface EventSourceMessage {
2401
2437
  * const eventStream =
2402
2438
  * response.body
2403
2439
  * .pipeThrough(new TextDecoderStream())
2404
- * .pipeThrough(new EventSourceParserStream({terminateOnError: true}))
2440
+ * .pipeThrough(new EventSourceParserStream({onError: 'terminate'}))
2405
2441
  * ```
2406
2442
  *
2407
2443
  * @public
@@ -2410,7 +2446,7 @@ declare class EventSourceParserStream extends TransformStream<
2410
2446
  string,
2411
2447
  EventSourceMessage
2412
2448
  > {
2413
- constructor({ onError, onRetry, onComment }?: StreamOptions);
2449
+ constructor({ onError, onRetry, onComment, maxBufferSize }?: StreamOptions);
2414
2450
  }
2415
2451
 
2416
2452
  declare type ExaSearchCategory = 'company' | 'people' | 'research paper' | 'news' | 'personal site' | 'financial report';
@@ -3215,7 +3251,7 @@ declare interface GatewayGenerationInfoParams {
3215
3251
  id: string;
3216
3252
  }
3217
3253
 
3218
- declare type GatewayImageModelId = 'bfl/flux-2-flex' | 'bfl/flux-2-klein-4b' | 'bfl/flux-2-klein-9b' | 'bfl/flux-2-max' | 'bfl/flux-2-pro' | 'bfl/flux-3-image' | 'bfl/flux-kontext-max' | 'bfl/flux-kontext-pro' | 'bfl/flux-pro-1.0-fill' | 'bfl/flux-pro-1.1' | 'bfl/flux-pro-1.1-ultra' | 'bytedance/seedream-4.0' | 'bytedance/seedream-4.5' | 'bytedance/seedream-5.0-lite' | 'bytedance/seedream-5.0-pro' | 'meta/muse-image-1.0' | 'microsoft/mai-image-2.6' | 'microsoft/mai-image-2.6-flash' | 'openai/gpt-image-1' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | 'openai/gpt-image-2.5-flare' | 'openai/gpt-image-2.5-sunburst' | 'prodia/flux-fast-schnell' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | 'recraft/recraft-v4.1-flash' | 'recraft/recraft-v4.1-pro' | 'recraft/recraft-v4.1-utility' | 'recraft/recraft-v4.1-utility-pro' | 'spacexai/grok-imagine-image' | 'spacexai/grok-imagine-image-2.0' | 'topaz/wonder-3.5' | (string & {});
3254
+ declare type GatewayImageModelId = 'bfl/flux-2-flex' | 'bfl/flux-2-klein-4b' | 'bfl/flux-2-klein-9b' | 'bfl/flux-2-max' | 'bfl/flux-2-pro' | 'bfl/flux-3-image' | 'bfl/flux-3-image-klein' | 'bfl/flux-kontext-max' | 'bfl/flux-kontext-pro' | 'bfl/flux-pro-1.0-fill' | 'bfl/flux-pro-1.1' | 'bfl/flux-pro-1.1-ultra' | 'bytedance/seedream-4.0' | 'bytedance/seedream-4.5' | 'bytedance/seedream-5.0-lite' | 'bytedance/seedream-5.0-pro' | 'meta/muse-image-1.0' | 'microsoft/mai-image-2.6' | 'microsoft/mai-image-2.6-flash' | 'openai/gpt-image-1-mini' | 'openai/gpt-image-1.5' | 'openai/gpt-image-2' | 'openai/gpt-image-2.5-flare' | 'openai/gpt-image-2.5-sunburst' | 'prodia/flux-fast-schnell' | 'recraft/recraft-v2' | 'recraft/recraft-v3' | 'recraft/recraft-v4' | 'recraft/recraft-v4-pro' | 'recraft/recraft-v4.1' | 'recraft/recraft-v4.1-flash' | 'recraft/recraft-v4.1-pro' | 'recraft/recraft-v4.1-utility' | 'recraft/recraft-v4.1-utility-pro' | 'spacexai/grok-imagine-image' | 'spacexai/grok-imagine-image-2.0' | 'topaz/wonder-3.5' | (string & {});
3219
3255
 
3220
3256
  declare interface GatewayLanguageModelEntry {
3221
3257
  /**
@@ -3266,7 +3302,7 @@ declare interface GatewayLanguageModelEntry {
3266
3302
 
3267
3303
  declare type GatewayLanguageModelSpecification = Pick<LanguageModelV3, 'specificationVersion' | 'provider' | 'modelId'>;
3268
3304
 
3269
- export declare type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-flash' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'alibaba/qwen3.8-2.4t-a95b' | 'alibaba/qwen3.8-27b' | 'alibaba/qwen3.8-flash' | 'alibaba/qwen3.8-max' | 'alibaba/qwen3.8-max-0902' | 'alibaba/qwen3.8-max-prime' | 'alibaba/qwen3.8-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5-batch' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5.1-batch' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-haiku-4.5-batch' | 'anthropic/claude-haiku-5.5' | 'anthropic/claude-haiku-5.5-batch' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.5-batch' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.6-batch' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.7-batch' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-batch' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-batch' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-batch' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.5-batch' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-4.6-batch' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-5-batch' | 'anthropic/claude-sonnet-5.5' | 'anthropic/claude-sonnet-5.5-batch' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'callstack/apex' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'deepseek/deepseek-v4.1-flash-fast' | 'fireworks/ember-1' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-batch' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-flash-lite-batch' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-pro-batch' | 'google/gemini-3-flash' | 'google/gemini-3-flash-batch' | 'google/gemini-3-pro-image' | 'google/gemini-3.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-batch' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-pro-preview-batch' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-batch' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.5-flash-lite-batch' | 'google/gemini-3.6-flash' | 'google/gemini-3.6-flash-batch' | 'google/gemini-3.7-flash' | 'google/gemini-3.7-flash-batch' | 'google/gemini-3.8-flash' | 'google/gemini-4-argon' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-2.5' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'inclusionai/ling-3.0-flash-fin' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-vl' | 'inclusionai/ling-3.1-flash' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5-preview' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | 'meta/muse-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-contributor' | 'meta/muse-spark-1.3' | 'meta/muse-spark-1.3-contributor' | 'meta/muse-spark-open' | 'meta/muse-wonder-1.0' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'minimax/minimax-m2.1-lightning' | 'minimax/minimax-m2.5' | 'minimax/minimax-m2.5-highspeed' | 'minimax/minimax-m2.7' | 'minimax/minimax-m2.7-highspeed' | 'minimax/minimax-m3' | 'mistral/codestral' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-large-4' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-super-120b-a12b' | 'nvidia/nemotron-3-ultra-550b-a55b' | 'nvidia/nemotron-3.5-lightning' | 'nvidia/nemotron-3.5-lightning-free' | 'nvidia/nemotron-3.5-super-vl' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-3.5-turbo' | 'openai/gpt-4-turbo' | 'openai/gpt-4.1' | 'openai/gpt-4.1-batch' | 'openai/gpt-4.1-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-batch' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4.1-nano-batch' | 'openai/gpt-4.1-nano-fast' | 'openai/gpt-4o' | 'openai/gpt-4o-batch' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-batch' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-batch' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-batch' | 'openai/gpt-5-mini-fast' | 'openai/gpt-5-nano' | 'openai/gpt-5-nano-batch' | 'openai/gpt-5-pro' | 'openai/gpt-5-pro-batch' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | 'openai/gpt-5.2-batch' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-fast' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.3-codex-fast' | 'openai/gpt-5.4' | 'openai/gpt-5.4-batch' | 'openai/gpt-5.4-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-batch' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-nano-batch' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-batch' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.5-pro-batch' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-batch' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-batch' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-batch' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-batch' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-batch' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-sol-batch' | 'openai/gpt-6-sol-fast' | 'openai/gpt-6.1-sol' | 'openai/gpt-6.1-sol-batch' | 'openai/gpt-6.1-sol-fast' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-120b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-fast' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'openai/o4-mini-fast' | 'perplexity/sonar' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'spacexai/grok-4.1-fast-non-reasoning' | 'spacexai/grok-4.1-fast-reasoning' | 'spacexai/grok-4.20-multi-agent' | 'spacexai/grok-4.20-multi-agent-batch' | 'spacexai/grok-4.20-multi-agent-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-batch' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-batch' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.3-batch' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stealth/cat-jam' | 'stealth/glyph-cluster' | 'stepfun/step-3.7-flash' | 'stepfun/step-5-preview' | 'tencent/hy-mt2-lite' | 'tencent/hy-mt2-plus' | 'tencent/hy-mt2-pro' | 'tencent/hy3' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'xiaomi/mimo-v2.6-flash' | 'xiaomi/mimo-v2.6-pro' | 'xiaomi/mimo-v2.6-pro-ultraspeed' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.7' | 'zai/glm-4.7-flash' | 'zai/glm-4.7-flashx' | 'zai/glm-5' | 'zai/glm-5-turbo' | 'zai/glm-5.1' | 'zai/glm-5.2' | 'zai/glm-5.2-fast' | 'zai/glm-5.3' | 'zai/glm-5.3-fast' | 'zai/glm-5.3-flash' | 'zai/glm-5.3-flashx' | 'zai/glm-5v-turbo' | (string & {});
3305
+ export declare type GatewayModelId = 'alibaba/qwen-3-14b' | 'alibaba/qwen-3-235b' | 'alibaba/qwen-3-30b' | 'alibaba/qwen-3-32b' | 'alibaba/qwen3-coder' | 'alibaba/qwen3-coder-30b-a3b' | 'alibaba/qwen3-coder-next' | 'alibaba/qwen3-max-thinking' | 'alibaba/qwen3-next-80b-a3b-instruct' | 'alibaba/qwen3-next-80b-a3b-thinking' | 'alibaba/qwen3-vl-instruct' | 'alibaba/qwen3.5-flash' | 'alibaba/qwen3.5-plus' | 'alibaba/qwen3.6-27b' | 'alibaba/qwen3.6-plus' | 'alibaba/qwen3.7-flash' | 'alibaba/qwen3.7-max' | 'alibaba/qwen3.7-plus' | 'alibaba/qwen3.8-2.4t-a95b' | 'alibaba/qwen3.8-27b' | 'alibaba/qwen3.8-flash' | 'alibaba/qwen3.8-max' | 'alibaba/qwen3.8-max-0902' | 'alibaba/qwen3.8-max-prime' | 'alibaba/qwen3.8-omni-flash' | 'amazon/nova-2-lite' | 'amazon/nova-lite' | 'amazon/nova-micro' | 'amazon/nova-pro' | 'anthropic/claude-fable-5' | 'anthropic/claude-fable-5-batch' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5.1-batch' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-haiku-4.5-batch' | 'anthropic/claude-haiku-5.5' | 'anthropic/claude-haiku-5.5-batch' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-opus-4.5-batch' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-opus-4.6-batch' | 'anthropic/claude-opus-4.7' | 'anthropic/claude-opus-4.7-batch' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.8-batch' | 'anthropic/claude-opus-4.8-fast' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-5-batch' | 'anthropic/claude-opus-5-fast' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5.5-batch' | 'anthropic/claude-opus-5.5-fast' | 'anthropic/claude-sonnet-4.5' | 'anthropic/claude-sonnet-4.5-batch' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-sonnet-4.6-batch' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-5-batch' | 'anthropic/claude-sonnet-5.5' | 'anthropic/claude-sonnet-5.5-batch' | 'arcee-ai/trinity-large-thinking' | 'bytedance/seed-1.6' | 'bytedance/seed-1.8' | 'bytedance/seed-2.1-turbo' | 'callstack/apex' | 'cohere/command-a' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-v3.1' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-thinking' | 'deepseek/deepseek-v4-flash' | 'deepseek/deepseek-v4-flash-0731' | 'deepseek/deepseek-v4-flash-vision-exp' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-pro-0813' | 'deepseek/deepseek-v4.1-flash' | 'deepseek/deepseek-v4.1-flash-1017' | 'deepseek/deepseek-v4.1-flash-1017-fast' | 'deepseek/deepseek-v4.1-flash-fast' | 'elorian/glimpse' | 'fireworks/ember-1' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-batch' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-flash-lite-batch' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-pro-batch' | 'google/gemini-3-flash' | 'google/gemini-3-flash-batch' | 'google/gemini-3-pro-image' | 'google/gemini-3.1-flash-image' | 'google/gemini-3.1-flash-image-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3.1-flash-lite-batch' | 'google/gemini-3.1-flash-lite-image' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-pro-preview-batch' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-batch' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.5-flash-lite-batch' | 'google/gemini-3.6-flash' | 'google/gemini-3.6-flash-batch' | 'google/gemini-3.7-flash' | 'google/gemini-3.7-flash-batch' | 'google/gemini-3.8-flash' | 'google/gemini-4-argon' | 'google/gemini-nano-banana-2.1' | 'google/gemini-omni-flash-preview' | 'google/gemma-4-26b-a4b-it' | 'google/gemma-4-31b-it' | 'inception/mercury-2' | 'inception/mercury-2.5' | 'inception/mercury-3' | 'inception/mercury-coder-small' | 'inclusionai/ling-3.0-flash' | 'inclusionai/ling-3.0-flash-fin' | 'inclusionai/ling-3.0-flash-sante' | 'inclusionai/ling-3.0-flash-vl' | 'inclusionai/ling-3.1-flash' | 'inference-net/schematron-v2-small' | 'inference-net/schematron-v2-turbo' | 'interfaze/interfaze-beta' | 'liquid/lfm2.5-24b-a2b' | 'meituan/longcat-2.5-preview' | 'meta/llama-3.1-70b' | 'meta/llama-3.1-8b' | 'meta/llama-3.3-70b' | 'meta/llama-4-maverick' | 'meta/llama-4-scout' | 'meta/muse-glimmer-30b' | 'meta/muse-spark-1.1' | 'meta/muse-spark-1.2' | 'meta/muse-spark-1.2-contributor' | 'meta/muse-spark-1.3' | 'meta/muse-spark-1.3-contributor' | 'meta/muse-spark-open' | 'meta/muse-wonder-1.0' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'minimax/minimax-m2.1-lightning' | 'minimax/minimax-m2.5' | 'minimax/minimax-m2.5-highspeed' | 'minimax/minimax-m2.7' | 'minimax/minimax-m2.7-highspeed' | 'minimax/minimax-m3' | 'minimax/minimax-m3.1-flash' | 'mistral/codestral' | 'mistral/ministral-14b' | 'mistral/ministral-3b' | 'mistral/ministral-8b' | 'mistral/mistral-large-3' | 'mistral/mistral-large-4' | 'mistral/mistral-medium-3.5' | 'mistral/mistral-nemo' | 'mistral/mistral-small' | 'mixedbread/toast-1' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2.5' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.7-code' | 'moonshotai/kimi-k2.7-code-highspeed' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k3-fast' | 'moonshotai/kimi-k3.1-pro' | 'moonshotai/kimi-k3.1-pro-highspeed' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-super-120b-a12b' | 'nvidia/nemotron-3-ultra-550b-a55b' | 'nvidia/nemotron-3.5-lightning' | 'nvidia/nemotron-3.5-lightning-free' | 'nvidia/nemotron-3.5-super-vl' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-9b-v2' | 'openai/gpt-4.1' | 'openai/gpt-4.1-batch' | 'openai/gpt-4.1-fast' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-mini-batch' | 'openai/gpt-4.1-mini-fast' | 'openai/gpt-4.1-nano' | 'openai/gpt-4o' | 'openai/gpt-4o-batch' | 'openai/gpt-4o-fast' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-batch' | 'openai/gpt-4o-mini-fast' | 'openai/gpt-5' | 'openai/gpt-5-batch' | 'openai/gpt-5-codex' | 'openai/gpt-5-fast' | 'openai/gpt-5-mini' | 'openai/gpt-5-mini-batch' | 'openai/gpt-5-mini-fast' | 'openai/gpt-5-nano' | 'openai/gpt-5-nano-batch' | 'openai/gpt-5-pro' | 'openai/gpt-5-pro-batch' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.1-thinking' | 'openai/gpt-5.1-thinking-fast' | 'openai/gpt-5.2' | 'openai/gpt-5.2-batch' | 'openai/gpt-5.2-codex' | 'openai/gpt-5.2-fast' | 'openai/gpt-5.2-pro' | 'openai/gpt-5.3-codex' | 'openai/gpt-5.3-codex-fast' | 'openai/gpt-5.4' | 'openai/gpt-5.4-batch' | 'openai/gpt-5.4-fast' | 'openai/gpt-5.4-mini' | 'openai/gpt-5.4-mini-batch' | 'openai/gpt-5.4-mini-fast' | 'openai/gpt-5.4-nano' | 'openai/gpt-5.4-nano-batch' | 'openai/gpt-5.4-pro' | 'openai/gpt-5.5' | 'openai/gpt-5.5-batch' | 'openai/gpt-5.5-fast' | 'openai/gpt-5.5-pro' | 'openai/gpt-5.5-pro-batch' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.6-luna-batch' | 'openai/gpt-5.6-luna-fast' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-sol-batch' | 'openai/gpt-5.6-sol-fast' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-terra-batch' | 'openai/gpt-5.6-terra-fast' | 'openai/gpt-6-astra' | 'openai/gpt-6-astra-batch' | 'openai/gpt-6-astra-fast' | 'openai/gpt-6-luna' | 'openai/gpt-6-luna-batch' | 'openai/gpt-6-luna-fast' | 'openai/gpt-6-sol' | 'openai/gpt-6-sol-batch' | 'openai/gpt-6-sol-fast' | 'openai/gpt-6.1-sol' | 'openai/gpt-6.1-sol-batch' | 'openai/gpt-6.1-sol-fast' | 'openai/gpt-6.1-terra' | 'openai/gpt-6.1-terra-fast' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-safeguard-120b' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o3' | 'openai/o3-fast' | 'openai/o3-mini' | 'openai/o3-pro' | 'openai/o4-mini' | 'perplexity/sonar' | 'poolside/laguna-s-2.1' | 'poolside/laguna-s-2.1-free' | 'quiverai/arrow-2' | 'quiverai/arrow-2-telos' | 'reflection/beam' | 'reflection/beam-free' | 'sakana/fugu-max' | 'sakana/fugu-ultra' | 'sakana/fugu-ultra-v2' | 'sakana/namazu' | 'scaledown/scaledown-extract-1' | 'scaledown/scaledown-summarize-1' | 'spacexai/grok-4.20-multi-agent' | 'spacexai/grok-4.20-multi-agent-batch' | 'spacexai/grok-4.20-multi-agent-beta' | 'spacexai/grok-4.20-non-reasoning' | 'spacexai/grok-4.20-non-reasoning-batch' | 'spacexai/grok-4.20-non-reasoning-beta' | 'spacexai/grok-4.20-reasoning' | 'spacexai/grok-4.20-reasoning-batch' | 'spacexai/grok-4.20-reasoning-beta' | 'spacexai/grok-4.3' | 'spacexai/grok-4.3-batch' | 'spacexai/grok-4.5' | 'spacexai/grok-4.6' | 'spacexai/grok-4.7' | 'spacexai/grok-build-0.1' | 'stealth/glyph-cluster' | 'stepfun/step-3.7-flash' | 'stepfun/step-5-preview' | 'tencent/hy-mt2-lite' | 'tencent/hy-mt2-plus' | 'tencent/hy-mt2-pro' | 'tencent/hy3' | 'tencent/hy4-preview' | 'thinkingmachines/inkling' | 'thinkingmachines/inkling-small' | 'xiaomi/mimo-v2.5' | 'xiaomi/mimo-v2.5-pro' | 'xiaomi/mimo-v2.6-flash' | 'xiaomi/mimo-v2.6-pro' | 'xiaomi/mimo-v2.6-pro-ultraspeed' | 'zai/glm-4.5' | 'zai/glm-4.5-air' | 'zai/glm-4.5v' | 'zai/glm-4.6' | 'zai/glm-4.7' | 'zai/glm-4.7-flash' | 'zai/glm-4.7-flashx' | 'zai/glm-5' | 'zai/glm-5-turbo' | 'zai/glm-5.1' | 'zai/glm-5.2' | 'zai/glm-5.2-fast' | 'zai/glm-5.3' | 'zai/glm-5.3-fast' | 'zai/glm-5.3-flash' | 'zai/glm-5.3-flashx' | 'zai/glm-5v-turbo' | (string & {});
3270
3306
 
3271
3307
  declare interface GatewayProvider extends ProviderV3 {
3272
3308
  (modelId: GatewayModelId): LanguageModelV3;
@@ -3378,9 +3414,9 @@ declare interface GatewayProviderSettings {
3378
3414
  metadataCacheRefreshMillis?: number;
3379
3415
  }
3380
3416
 
3381
- declare type GatewayRerankingModelId = 'cohere/rerank-v3.5' | 'cohere/rerank-v4-fast' | 'cohere/rerank-v4-pro' | 'voyage/rerank-2.5' | 'voyage/rerank-2.5-lite' | 'voyage/rerank-3' | 'voyage/rerank-3-lite' | (string & {});
3417
+ declare type GatewayRerankingModelId = 'cohere/rerank-v3.5' | 'cohere/rerank-v4-fast' | 'cohere/rerank-v4-pro' | 'cohere/rerank-v5-fast' | 'cohere/rerank-v5-pro' | 'voyage/rerank-2.5' | 'voyage/rerank-2.5-lite' | 'voyage/rerank-3' | 'voyage/rerank-3-lite' | (string & {});
3382
3418
 
3383
- declare type GatewaySpeechModelId = 'fish-audio/drama-3' | 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'google/gemini-3.8-flash-lite-tts' | 'google/gemini-3.8-flash-tts' | 'microsoft/mai-voice-2' | 'microsoft/mai-voice-2-flash' | 'microsoft/mai-voice-2.1' | 'microsoft/mai-voice-2.1-flash' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
3419
+ declare type GatewaySpeechModelId = 'fish-audio/drama-3' | 'fish-audio/s1' | 'fish-audio/s2-pro' | 'fish-audio/s2.1-pro' | 'google/gemini-3.8-flash-lite-tts' | 'google/gemini-3.8-flash-tts' | 'microsoft/mai-voice-2' | 'microsoft/mai-voice-2-flash' | 'microsoft/mai-voice-2.1' | 'microsoft/mai-voice-2.1-flash' | 'mistral/voxtral-mini-tts-3' | 'openai/tts-1' | 'openai/tts-1-hd' | 'spacexai/grok-tts' | (string & {});
3384
3420
 
3385
3421
  declare interface GatewaySpendReportParams {
3386
3422
  /** Start date in YYYY-MM-DD format (inclusive) */
@@ -3494,7 +3530,7 @@ declare const gatewayTools: {
3494
3530
  takoSearch: (config?: TakoSearchConfig) => ReturnType<typeof takoSearchToolFactory>;
3495
3531
  };
3496
3532
 
3497
- declare type GatewayTranscriptionModelId = 'fish-audio/transcribe-1' | 'google/gemini-3.5-transcribe' | 'google/gemini-3.5-transcribe-live' | 'microsoft/mai-transcribe-2' | 'microsoft/mai-transcribe-2-streaming' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
3533
+ declare type GatewayTranscriptionModelId = 'fish-audio/transcribe-1' | 'google/gemini-3.5-transcribe' | 'google/gemini-3.5-transcribe-live' | 'microsoft/mai-transcribe-2' | 'microsoft/mai-transcribe-2-streaming' | 'mistral/voxtral-mini-transcribe-3' | 'mistral/voxtral-small-transcribe-3' | 'openai/gpt-4o-mini-transcribe' | 'openai/gpt-4o-transcribe' | 'openai/gpt-realtime-whisper' | 'openai/whisper-1' | 'spacexai/grok-stt' | (string & {});
3498
3534
 
3499
3535
  declare type GatewayVideoModelId = 'alibaba/wan-v2.5-t2v-preview' | 'alibaba/wan-v2.6-i2v' | 'alibaba/wan-v2.6-i2v-flash' | 'alibaba/wan-v2.6-r2v' | 'alibaba/wan-v2.6-r2v-flash' | 'alibaba/wan-v2.6-t2v' | 'alibaba/wan-v2.7-r2v' | 'alibaba/wan-v2.7-t2v' | 'alibaba/wan-v3.0-video' | 'alibaba/wan-v3.0-video-prime' | 'bfl/flux-3-video' | 'bytedance/seedance-2.0' | 'bytedance/seedance-2.0-fast' | 'bytedance/seedance-2.0-mini' | 'bytedance/seedance-2.5' | 'bytedance/seedance-v1.0-pro' | 'bytedance/seedance-v1.0-pro-fast' | 'bytedance/seedance-v1.5-pro' | 'google/veo-3.0-fast-generate-001' | 'google/veo-3.0-generate-001' | 'google/veo-3.1-fast-generate-001' | 'google/veo-3.1-generate-001' | 'google/veo-3.1-lite-generate-001' | 'heygen/heygen-video-1' | 'klingai/kling-v2.5-turbo-i2v' | 'klingai/kling-v2.5-turbo-t2v' | 'klingai/kling-v2.6-i2v' | 'klingai/kling-v2.6-motion-control' | 'klingai/kling-v2.6-t2v' | 'klingai/kling-v3.0-i2v' | 'klingai/kling-v3.0-motion-control' | 'klingai/kling-v3.0-t2v' | 'minimax/minimax-h3' | 'minimax/minimax-h3-max' | 'spacexai/grok-imagine-video' | 'spacexai/grok-imagine-video-1.5' | 'spacexai/grok-imagine-video-1.5-lite' | 'topaz/proteus' | 'topaz/starlight-precise-2.6' | (string & {});
3500
3536
 
@@ -7303,7 +7339,11 @@ declare interface Link {
7303
7339
  context: SpanContext;
7304
7340
  /** A set of {@link SpanAttributes} on the link. */
7305
7341
  attributes?: SpanAttributes;
7306
- /** Count of attributes of the link that were dropped due to collection limits */
7342
+ /**
7343
+ * Count of attributes of the link that were dropped due to collection limits
7344
+ *
7345
+ * @since 1.4.1
7346
+ */
7307
7347
  droppedAttributesCount?: number;
7308
7348
  }
7309
7349
 
@@ -7911,11 +7951,9 @@ export declare interface OutputInterface<OUTPUT = any, PARTIAL = any, ELEMENT =
7911
7951
 
7912
7952
  declare interface ParallelSearchConfig {
7913
7953
  /**
7914
- * Mode preset for different use cases:
7915
- * - "one-shot": Comprehensive results with longer excerpts for single-response answers (default)
7916
- * - "agentic": Concise, token-efficient results for multi-step agentic workflows
7954
+ * Search mode. Defaults to `basic`.
7917
7955
  */
7918
- mode?: 'one-shot' | 'agentic';
7956
+ mode?: ParallelSearchMode;
7919
7957
  /**
7920
7958
  * Default maximum number of results to return (1-20).
7921
7959
  * Defaults to 10 if not specified.
@@ -7929,15 +7967,24 @@ declare interface ParallelSearchConfig {
7929
7967
  * Default excerpt configuration for controlling result length.
7930
7968
  */
7931
7969
  excerpts?: ParallelSearchExcerpts;
7970
+ /**
7971
+ * Maximum total characters across all result excerpts.
7972
+ */
7973
+ maxCharsTotal?: number;
7932
7974
  /**
7933
7975
  * Default fetch policy for controlling content freshness.
7934
7976
  */
7935
7977
  fetchPolicy?: ParallelSearchFetchPolicy;
7978
+ /**
7979
+ * ISO 3166-1 alpha-2 country code to localize results, e.g. 'us'.
7980
+ * Invalid codes are ignored with a warning.
7981
+ */
7982
+ location?: string;
7936
7983
  }
7937
7984
 
7938
7985
  declare interface ParallelSearchError {
7939
7986
  /** Error type */
7940
- error: 'api_error' | 'rate_limit' | 'timeout' | 'invalid_input' | 'configuration_error' | 'unknown';
7987
+ error: 'api_error' | 'configuration_error' | 'execution_error' | 'gateway_rate_limit' | 'invalid_input' | 'rate_limit' | 'timeout' | 'unknown' | 'unknown_tool';
7941
7988
  /** HTTP status code if applicable */
7942
7989
  statusCode?: number;
7943
7990
  /** Human-readable error message */
@@ -7951,16 +7998,27 @@ declare interface ParallelSearchExcerpts {
7951
7998
  maxCharsPerResult?: number;
7952
7999
  /**
7953
8000
  * Maximum total characters across all results.
8001
+ * @deprecated Use the top-level `maxCharsTotal` option instead.
7954
8002
  */
7955
8003
  maxCharsTotal?: number;
7956
8004
  }
7957
8005
 
7958
8006
  declare interface ParallelSearchFetchPolicy {
7959
8007
  /**
7960
- * Maximum age in seconds for cached content.
7961
- * Set to 0 to always fetch fresh content.
8008
+ * Maximum age in seconds of cached content before a live fetch is attempted.
8009
+ * Minimum 600; lower values are raised to 600.
7962
8010
  */
7963
8011
  maxAgeSeconds?: number;
8012
+ /**
8013
+ * Timeout in seconds for a live fetch when content is not cached.
8014
+ * The gateway caps it to stay within its own tool timeout.
8015
+ */
8016
+ timeoutSeconds?: number;
8017
+ /**
8018
+ * Return an error instead of falling back to older cached content when a
8019
+ * live fetch fails or times out. Defaults to false.
8020
+ */
8021
+ disableCacheFallback?: boolean;
7964
8022
  }
7965
8023
 
7966
8024
  declare interface ParallelSearchInput {
@@ -7971,16 +8029,13 @@ declare interface ParallelSearchInput {
7971
8029
  */
7972
8030
  objective: string;
7973
8031
  /**
7974
- * Optional search queries to supplement the objective.
7975
- * Maximum 200 characters per query.
8032
+ * 2-3 concise keyword queries, 3-6 words each (max 5, 200 characters each).
7976
8033
  */
7977
8034
  search_queries?: string[];
7978
8035
  /**
7979
- * Mode preset for different use cases:
7980
- * - "one-shot": Comprehensive results with longer excerpts
7981
- * - "agentic": Concise, token-efficient results for multi-step workflows
8036
+ * Search mode. Defaults to `basic`.
7982
8037
  */
7983
- mode?: 'one-shot' | 'agentic';
8038
+ mode?: ParallelSearchMode;
7984
8039
  /**
7985
8040
  * Maximum number of results to return (1-20).
7986
8041
  * Defaults to 10 if not specified.
@@ -7999,51 +8054,75 @@ declare interface ParallelSearchInput {
7999
8054
  */
8000
8055
  excerpts?: {
8001
8056
  max_chars_per_result?: number;
8057
+ /** @deprecated Use the top-level `max_chars_total` instead. */
8002
8058
  max_chars_total?: number;
8003
8059
  };
8060
+ /**
8061
+ * Maximum total characters across all result excerpts.
8062
+ */
8063
+ max_chars_total?: number;
8004
8064
  /**
8005
8065
  * Fetch policy for controlling content freshness.
8006
8066
  */
8007
8067
  fetch_policy?: {
8008
8068
  max_age_seconds?: number;
8069
+ timeout_seconds?: number;
8070
+ disable_cache_fallback?: boolean;
8009
8071
  };
8072
+ /**
8073
+ * ISO 3166-1 alpha-2 country code to localize results.
8074
+ */
8075
+ location?: string;
8010
8076
  }
8011
8077
 
8078
+ /**
8079
+ * Search mode. `turbo` and `fast` trade excerpt depth for latency (`turbo` is
8080
+ * English and Japanese only), `basic` is balanced, `advanced` is the most thorough.
8081
+ * Deprecated: `one-shot` (runs as `basic`) and `agentic` (runs as `advanced`).
8082
+ */
8083
+ declare type ParallelSearchMode = (typeof parallelSearchModes)[number];
8084
+
8085
+ declare const parallelSearchModes: readonly ["turbo", "fast", "basic", "advanced", "one-shot", "agentic"];
8086
+
8012
8087
  declare type ParallelSearchOutput = ParallelSearchResponse | ParallelSearchError;
8013
8088
 
8014
8089
  declare interface ParallelSearchResponse {
8015
8090
  /** Unique identifier for this search request */
8016
- searchId: string;
8017
- /** Array of search results */
8091
+ search_id: string;
8092
+ /** Search results, ordered by decreasing relevance */
8018
8093
  results: ParallelSearchResult[];
8094
+ /** Non-fatal issues with the request, such as an ignored `location` */
8095
+ warnings?: ParallelSearchWarning[] | null;
8096
+ /** Usage reported by Parallel for this search */
8097
+ usage?: ParallelSearchUsage[] | null;
8098
+ /** Session identifier shared by the searches made during one request */
8099
+ session_id?: string;
8019
8100
  }
8020
8101
 
8021
8102
  declare interface ParallelSearchResult {
8022
8103
  /** URL of the search result */
8023
8104
  url: string;
8024
- /** Title of the search result */
8025
- title: string;
8026
- /** Extracted text excerpt/content from the page */
8027
- excerpt: string;
8028
- /** Publication date of the content (may be null) */
8029
- publishDate?: string | null;
8030
- /** Relevance score for the result */
8031
- relevanceScore?: number;
8105
+ /** Title of the page, if available */
8106
+ title?: string | null;
8107
+ /** Publication date of the page (YYYY-MM-DD), if available */
8108
+ publish_date?: string | null;
8109
+ /** Relevant excerpts from the page, formatted as markdown */
8110
+ excerpts: string[];
8032
8111
  }
8033
8112
 
8034
8113
  declare interface ParallelSearchSourcePolicy {
8035
8114
  /**
8036
- * List of domains to include in search results.
8037
- * Example: ['wikipedia.org', 'nature.com']
8115
+ * Domains or domain/path prefixes to restrict results to. When set,
8116
+ * `excludeDomains` is ignored. Example: ['wikipedia.org', 'docs.python.org/3']
8038
8117
  */
8039
8118
  includeDomains?: string[];
8040
8119
  /**
8041
- * List of domains to exclude from search results.
8042
- * Example: ['reddit.com', 'twitter.com']
8120
+ * Domains or domain/path prefixes to exclude from results.
8121
+ * Example: ['reddit.com']
8043
8122
  */
8044
8123
  excludeDomains?: string[];
8045
8124
  /**
8046
- * Only include results published after this date (ISO 8601 format).
8125
+ * Only include results published on or after this date (YYYY-MM-DD).
8047
8126
  * Example: '2024-01-01'
8048
8127
  */
8049
8128
  afterDate?: string;
@@ -8051,6 +8130,22 @@ declare interface ParallelSearchSourcePolicy {
8051
8130
 
8052
8131
  declare const parallelSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<ParallelSearchInput, ParallelSearchOutput, ParallelSearchConfig>;
8053
8132
 
8133
+ declare interface ParallelSearchUsage {
8134
+ /** Usage item name, e.g. 'sku_search' */
8135
+ name: string;
8136
+ /** Count for the usage item */
8137
+ count?: number;
8138
+ }
8139
+
8140
+ declare interface ParallelSearchWarning {
8141
+ /** Warning type, e.g. 'input_validation_warning'. New types may be added. */
8142
+ type: string;
8143
+ /** Human-readable message */
8144
+ message: string;
8145
+ /** Optional detail supporting the warning */
8146
+ detail?: Record<string, unknown> | null;
8147
+ }
8148
+
8054
8149
  /**
8055
8150
  * Parses a JSON string into an unknown object.
8056
8151
  *
@@ -9646,6 +9741,8 @@ declare interface Span {
9646
9741
  * It is preferred span links be added at span creation.
9647
9742
  *
9648
9743
  * @param link the link to add.
9744
+ *
9745
+ * @since 1.9.0
9649
9746
  */
9650
9747
  addLink(link: Link): this;
9651
9748
  /**
@@ -9655,6 +9752,8 @@ declare interface Span {
9655
9752
  * It is preferred span links be added at span creation.
9656
9753
  *
9657
9754
  * @param links the links to add.
9755
+ *
9756
+ * @since 1.9.0
9658
9757
  */
9659
9758
  addLinks(links: Link[]): this;
9660
9759
  /**
@@ -10827,6 +10926,16 @@ declare interface StreamOptions {
10827
10926
  * @param comment - The comment encountered in the stream.
10828
10927
  */
10829
10928
  onComment?: ((comment: string) => void) | undefined;
10929
+ /**
10930
+ * Maximum number of characters the parser is allowed to buffer across calls to `feed()`.
10931
+ * See {@link ParserConfig.maxBufferSize} for details.
10932
+ *
10933
+ * When the limit is exceeded, the stream is always errored (regardless of the `onError`
10934
+ * setting) since the underlying parser is unrecoverable without a `reset()`.
10935
+ *
10936
+ * @defaultValue `undefined` (unbounded)
10937
+ */
10938
+ maxBufferSize?: number | undefined;
10830
10939
  }
10831
10940
 
10832
10941
  /**
@@ -12866,6 +12975,11 @@ declare interface Tracer {
12866
12975
  * Additionally the new span gets set in context and this context is activated
12867
12976
  * for the duration of the function call.
12868
12977
  *
12978
+ * **Important**: The callback function is responsible for calling `span.end()`
12979
+ * to finish the span. Unlike some other OpenTelemetry implementations, the span
12980
+ * is NOT automatically ended when the callback returns. If `span.end()` is not
12981
+ * called, the span will never be exported and will be silently lost.
12982
+ *
12869
12983
  * @param name The name of the span
12870
12984
  * @param [options] SpanOptions used for span creation
12871
12985
  * @param [context] Context to use to extract parent