@broberg/ai-sdk 0.78.5 → 0.78.7

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.
@@ -519,6 +519,13 @@ interface SegmentTimestamp {
519
519
  start: number;
520
520
  end: number;
521
521
  }
522
+ /** F102 — one consumer-owned fix applied to a transcript AFTER the provider answered. */
523
+ interface TranscriptCorrection {
524
+ /** What the provider wrote (one spelling or several). Whole word, case-insensitive. */
525
+ from: string | string[];
526
+ /** What it should say, exactly as written here. */
527
+ to: string;
528
+ }
522
529
  interface TranscribeRequest {
523
530
  /** Raw audio bytes (the client resolves a URL to bytes before calling). */
524
531
  audio: Uint8Array;
@@ -526,7 +533,9 @@ interface TranscribeRequest {
526
533
  /** Audio length in seconds — enables per-minute cost (Whisper). Omit → cost 0. */
527
534
  durationSec?: number;
528
535
  /** Bias recognition toward these brand/jargon terms (Azure phraseList, F029.3).
529
- * Providers without biasing support (Voxtral/Whisper) ignore it. */
536
+ * BEST-EFFORT: measured 2026-11-29 it did NOT change the transcript on da-DK (weights 1.5–20)
537
+ * or en-US — the field is sent and accepted, the effect is unproven. Providers without
538
+ * biasing support (Voxtral/Whisper) ignore it. */
530
539
  phrases?: string[];
531
540
  /** Request timestamps (F036). The client normalizes the input to this array.
532
541
  * Adapters without timestamp support ignore it (result omits words/segments). */
@@ -539,6 +548,12 @@ interface TranscribeResult {
539
548
  words?: WordTimestamp[];
540
549
  /** Segment (phrase/sentence) timing — present when any timestamps were requested. */
541
550
  segments?: SegmentTimestamp[];
551
+ /** F102 — present ONLY when a `corrections` entry changed the text: how many times each
552
+ * `to` was written. Lets a changed transcript be read back afterwards. */
553
+ correctionsApplied?: {
554
+ to: string;
555
+ count: number;
556
+ }[];
542
557
  usage: Usage;
543
558
  }
544
559
  interface OcrRequest {
@@ -933,4 +948,4 @@ declare function listLatest(): LatestEntry[];
933
948
  /** The pinned model behind an alias, or undefined if ai-sdk has no such family. */
934
949
  declare function resolveLatest(alias: string): LatestEntry | undefined;
935
950
 
936
- export { type OcrRequest as $, type AnimateResult as A, type BatchRequestItem as B, type CostSink as C, type DialogueRequest as D, type EmbeddingResult as E, type JudgeChoiceAnswer as F, type JudgeNoulAnswer as G, type JudgeQuestion as H, type ImageResult as I, type JudgeResult as J, type JudgeScoreAnswer as K, LATEST as L, type ModerationResult as M, type LatestEntry as N, type OcrResult as O, type PodcastResult as P, type LoraWeight as Q, type Region as R, type Message as S, type Tier as T, type Usage as U, type VectorizeResult as V, type ModelStatus as W, ModelUnavailableError as X, type ModerationItem as Y, type ModerationRequest as Z, type OcrPage as _, type ChatResult as a, type ResolveOptions as a0, type ResolveResult as a1, type Role as a2, type TierDescription as a3, type TrainStyleRequest as a4, type TranscribeRequest as a5, type TtsRequest as a6, type WordTiming as a7, alignWordTimings as a8, classifyRegionName as a9, describeTier as aa, listLatest as ab, listModels as ac, regionOfHost as ad, regionOfProvider as ae, resolveLatest as af, resolveModel as ag, type ChatStreamEvent as b, type TranslateResult as c, type TrainStyleResult as d, type TranscribeResult as e, type TierSpec as f, type BatchJob as g, type BatchResultItem as h, type ProviderAdapter as i, type ToolCall as j, type Tool as k, type Transport as l, type Capability as m, type BudgetConfig as n, type BudgetStore as o, type AlignedWordTimings as p, type AvailabilitySource as q, type AvailabilityStatus as r, type AzureWordBoundary as s, type CallOptions as t, type ChatRequest as u, type ContentPart as v, type DialogueTurn as w, type EmbeddingRequest as x, type ImageRequest as y, type JudgeAnswer as z };
951
+ export { type OcrRequest as $, type AnimateResult as A, type BatchRequestItem as B, type CostSink as C, type DialogueRequest as D, type EmbeddingResult as E, type JudgeChoiceAnswer as F, type JudgeNoulAnswer as G, type JudgeQuestion as H, type ImageResult as I, type JudgeResult as J, type JudgeScoreAnswer as K, LATEST as L, type ModerationResult as M, type LatestEntry as N, type OcrResult as O, type PodcastResult as P, type LoraWeight as Q, type Region as R, type Message as S, type Tier as T, type Usage as U, type VectorizeResult as V, type ModelStatus as W, ModelUnavailableError as X, type ModerationItem as Y, type ModerationRequest as Z, type OcrPage as _, type ChatResult as a, type ResolveOptions as a0, type ResolveResult as a1, type Role as a2, type TierDescription as a3, type TrainStyleRequest as a4, type TranscribeRequest as a5, type TranscriptCorrection as a6, type TtsRequest as a7, type WordTiming as a8, alignWordTimings as a9, classifyRegionName as aa, describeTier as ab, listLatest as ac, listModels as ad, regionOfHost as ae, regionOfProvider as af, resolveLatest as ag, resolveModel as ah, type ChatStreamEvent as b, type TranslateResult as c, type TrainStyleResult as d, type TranscribeResult as e, type TierSpec as f, type BatchJob as g, type BatchResultItem as h, type ProviderAdapter as i, type ToolCall as j, type Tool as k, type Transport as l, type Capability as m, type BudgetConfig as n, type BudgetStore as o, type AlignedWordTimings as p, type AvailabilitySource as q, type AvailabilityStatus as r, type AzureWordBoundary as s, type CallOptions as t, type ChatRequest as u, type ContentPart as v, type DialogueTurn as w, type EmbeddingRequest as x, type ImageRequest as y, type JudgeAnswer as z };
@@ -1 +1 @@
1
- export { q as AvailabilitySource, r as AvailabilityStatus, L as LATEST, N as LatestEntry, W as ModelStatus, X as ModelUnavailableError, a0 as ResolveOptions, a1 as ResolveResult, a3 as TierDescription, aa as describeTier, ab as listLatest, ac as listModels, af as resolveLatest, ag as resolveModel } from './registry-UIY_A6GR.js';
1
+ export { q as AvailabilitySource, r as AvailabilityStatus, L as LATEST, N as LatestEntry, W as ModelStatus, X as ModelUnavailableError, a0 as ResolveOptions, a1 as ResolveResult, a3 as TierDescription, ab as describeTier, ac as listLatest, ad as listModels, ag as resolveLatest, ah as resolveModel } from './registry-C65-nbWA.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broberg/ai-sdk",
3
- "version": "0.78.5",
3
+ "version": "0.78.7",
4
4
  "description": "Unified AI/LLM SDK — one facade, all providers, all capabilities, first-class cost control on every call.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",