@mux/ai 0.47.0 → 0.48.0

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/README.md CHANGED
@@ -10,6 +10,11 @@ Easy to use, purpose-driven, cost effective, configurable **_workflow functions_
10
10
 
11
11
  Turn your Mux video and audio assets into structured, actionable data — summaries, chapters, moderation scores, translations, embeddings, and more — with a single function call. `@mux/ai` handles fetching media data from Mux, formatting it for AI providers, and returning typed results so you can focus on building your product instead of wrangling prompts and media pipelines.
12
12
 
13
+ > [!TIP]
14
+ > **🤖 Beep boop! And now a word from our sponsors:** [Mux Robots](https://www.mux.com/robots) gives you hosted versions of these workflows behind a single API request, with no pipeline to build or run and no need to BYO LLM. It also goes further than this SDK, with premium caption generation, key moment detection, thumbnail ranking, scene segmentation and more. The first 100,000 units each month are free.
15
+ >
16
+ > `@mux/ai` is the open-source part. We develop and maintain it in public, and it's the right choice when you want full control over prompts, providers and models, or need to build your own workflows from the primitives.
17
+
13
18
  ## Quick Start
14
19
 
15
20
  ### Install
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import '@ai-sdk/google';
10
10
  import '@ai-sdk/openai';
11
11
  import '@mux/ts';
12
12
 
13
- var version = "0.47.0";
13
+ var version = "0.48.0";
14
14
 
15
15
  type MuxAiErrorType = "validation_error" | "processing_error" | "timeout_error" | "content_policy_error";
16
16
  /**
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // package.json
8
- var version = "0.47.0";
8
+ var version = "0.48.0";
9
9
 
10
10
  // src/lib/language-codes.ts
11
11
  var ISO639_1_TO_3 = {
@@ -2325,17 +2325,15 @@ async function transformShotsResponse(data) {
2325
2325
  status: "pending",
2326
2326
  createdAt: data.created_at
2327
2327
  };
2328
- case "errored": {
2329
- const details = data.errors ?? data.error;
2328
+ case "errored":
2330
2329
  return {
2331
2330
  status: "errored",
2332
2331
  createdAt: data.created_at,
2333
2332
  error: {
2334
- type: details?.type ?? "unknown",
2335
- messages: details?.messages ?? []
2333
+ type: data.errors?.type ?? "unknown",
2334
+ messages: data.errors?.messages ?? []
2336
2335
  }
2337
2336
  };
2338
- }
2339
2337
  case "completed":
2340
2338
  if (!data.shots_manifest_url) {
2341
2339
  throw new Error("Completed shots response is missing shots_manifest_url");