@mux/ai 0.38.0 → 0.39.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.
@@ -267,6 +267,14 @@ interface EmbeddingModelIdByProvider {
267
267
  * asynchronous job failure.
268
268
  */
269
269
  declare const ASK_QUESTIONS_MAX_QUESTION_LENGTH = 600;
270
+ /**
271
+ * Maximum number of questions allowed in a single call. Not configurable.
272
+ *
273
+ * Exported so API layers wrapping this workflow can mirror the limit in
274
+ * their own request validation instead of surfacing it as an
275
+ * asynchronous job failure.
276
+ */
277
+ declare const ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL = 50;
270
278
  /**
271
279
  * Default for {@link AskQuestionsOptions.maxAnswerOptionLength}.
272
280
  *
@@ -1519,6 +1527,7 @@ declare function translateCaptions<P extends SupportedProvider = SupportedProvid
1519
1527
 
1520
1528
  declare const index_ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH: typeof ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH;
1521
1529
  declare const index_ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH: typeof ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH;
1530
+ declare const index_ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL: typeof ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL;
1522
1531
  declare const index_ASK_QUESTIONS_MAX_QUESTION_LENGTH: typeof ASK_QUESTIONS_MAX_QUESTION_LENGTH;
1523
1532
  type index_AskQuestionsOptions = AskQuestionsOptions;
1524
1533
  type index_AskQuestionsResult = AskQuestionsResult;
@@ -1609,7 +1618,7 @@ declare const index_translationSchema: typeof translationSchema;
1609
1618
  declare const index_validateNeverTranslateTerms: typeof validateNeverTranslateTerms;
1610
1619
  declare const index_verifyNeverTranslateTerms: typeof verifyNeverTranslateTerms;
1611
1620
  declare namespace index {
1612
- export { index_ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, index_ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, index_ASK_QUESTIONS_MAX_QUESTION_LENGTH as ASK_QUESTIONS_MAX_QUESTION_LENGTH, type index_AskQuestionsOptions as AskQuestionsOptions, type index_AskQuestionsResult as AskQuestionsResult, type index_AskQuestionsType as AskQuestionsType, type index_AudioTranslationOptions as AudioTranslationOptions, type index_AudioTranslationResult as AudioTranslationResult, type index_AutoCensorProfanityOptions as AutoCensorProfanityOptions, type index_BurnedInCaptionsAnalysis as BurnedInCaptionsAnalysis, type index_BurnedInCaptionsOptions as BurnedInCaptionsOptions, type index_BurnedInCaptionsPromptOverrides as BurnedInCaptionsPromptOverrides, type index_BurnedInCaptionsPromptSections as BurnedInCaptionsPromptSections, type index_BurnedInCaptionsResult as BurnedInCaptionsResult, type index_CaptionReplacement as CaptionReplacement, type index_CensorMode as CensorMode, type index_Chapter as Chapter, type index_ChapterSystemPromptSections as ChapterSystemPromptSections, type index_ChaptersOptions as ChaptersOptions, type index_ChaptersPromptOverrides as ChaptersPromptOverrides, type index_ChaptersPromptSections as ChaptersPromptSections, type index_ChaptersResult as ChaptersResult, type index_ChaptersType as ChaptersType, index_DEFAULT_DESCRIPTION_LENGTH as DEFAULT_DESCRIPTION_LENGTH, index_DEFAULT_SUMMARY_KEYWORD_LIMIT as DEFAULT_SUMMARY_KEYWORD_LIMIT, index_DEFAULT_TITLE_LENGTH as DEFAULT_TITLE_LENGTH, type index_EditCaptionsOptions as EditCaptionsOptions, type index_EditCaptionsResult as EditCaptionsResult, type index_EmbeddingsOptions as EmbeddingsOptions, type index_EmbeddingsResult as EmbeddingsResult, type index_EngagementInsightsOptions as EngagementInsightsOptions, type index_EngagementInsightsResult as EngagementInsightsResult, index_GOOGLE_VISION_LIKELIHOOD_TO_SCORE as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, index_HIVE_SEXUAL_CATEGORIES as HIVE_SEXUAL_CATEGORIES, index_HIVE_VIOLENCE_CATEGORIES as HIVE_VIOLENCE_CATEGORIES, type index_HiveModerationOutput as HiveModerationOutput, type index_HiveModerationSource as HiveModerationSource, type index_ModerationOptions as ModerationOptions, type index_ModerationProvider as ModerationProvider, type index_ModerationResult as ModerationResult, type index_MomentInsight as MomentInsight, type index_OverallInsight as OverallInsight, type index_ProfanityDetectionPayload as ProfanityDetectionPayload, type index_Question as Question, type index_QuestionAnswer as QuestionAnswer, type index_QuestionAnswerType as QuestionAnswerType, type index_ReplacementRecord as ReplacementRecord, type index_SpeakerReplacement as SpeakerReplacement, type index_StaticRenditionCleanupOutcome as StaticRenditionCleanupOutcome, type index_SummarizationOptions as SummarizationOptions, type index_SummarizationPromptOverrides as SummarizationPromptOverrides, type index_SummarizationPromptSections as SummarizationPromptSections, type index_SummaryAndTagsResult as SummaryAndTagsResult, type index_SummaryType as SummaryType, type index_ThumbnailModerationScore as ThumbnailModerationScore, type index_TranslationChunkingOptions as TranslationChunkingOptions, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_aggregateTokenUsage as aggregateTokenUsage, index_applyOverrideLists as applyOverrideLists, index_applyReplacements as applyReplacements, index_applySpeakerReplacements as applySpeakerReplacements, index_askQuestions as askQuestions, index_buildReplacementRegex as buildReplacementRegex, index_burnedInCaptionsSchema as burnedInCaptionsSchema, index_censorVttContent as censorVttContent, index_chapterSchema as chapterSchema, index_chaptersSchema as chaptersSchema, index_createReplacer as createReplacer, index_editCaptions as editCaptions, index_extractTranscriptSegmentsForHotspots as extractTranscriptSegmentsForHotspots, index_generateChapters as generateChapters, index_generateEmbeddings as generateEmbeddings, index_generateEngagementInsights as generateEngagementInsights, index_generateVideoEmbeddings as generateVideoEmbeddings, index_getModerationScores as getModerationScores, index_getSummaryAndTags as getSummaryAndTags, index_hasBurnedInCaptions as hasBurnedInCaptions, index_mapShotsToHotspots as mapShotsToHotspots, index_normalizeTranslatedVtt as normalizeTranslatedVtt, index_profanityDetectionSchema as profanityDetectionSchema, index_questionAnswerSchema as questionAnswerSchema, index_shouldSplitChunkTranslationError as shouldSplitChunkTranslationError, index_summarySchema as summarySchema, index_transformCueText as transformCueText, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema, index_validateNeverTranslateTerms as validateNeverTranslateTerms, index_verifyNeverTranslateTerms as verifyNeverTranslateTerms };
1621
+ export { index_ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, index_ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, index_ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL as ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL, index_ASK_QUESTIONS_MAX_QUESTION_LENGTH as ASK_QUESTIONS_MAX_QUESTION_LENGTH, type index_AskQuestionsOptions as AskQuestionsOptions, type index_AskQuestionsResult as AskQuestionsResult, type index_AskQuestionsType as AskQuestionsType, type index_AudioTranslationOptions as AudioTranslationOptions, type index_AudioTranslationResult as AudioTranslationResult, type index_AutoCensorProfanityOptions as AutoCensorProfanityOptions, type index_BurnedInCaptionsAnalysis as BurnedInCaptionsAnalysis, type index_BurnedInCaptionsOptions as BurnedInCaptionsOptions, type index_BurnedInCaptionsPromptOverrides as BurnedInCaptionsPromptOverrides, type index_BurnedInCaptionsPromptSections as BurnedInCaptionsPromptSections, type index_BurnedInCaptionsResult as BurnedInCaptionsResult, type index_CaptionReplacement as CaptionReplacement, type index_CensorMode as CensorMode, type index_Chapter as Chapter, type index_ChapterSystemPromptSections as ChapterSystemPromptSections, type index_ChaptersOptions as ChaptersOptions, type index_ChaptersPromptOverrides as ChaptersPromptOverrides, type index_ChaptersPromptSections as ChaptersPromptSections, type index_ChaptersResult as ChaptersResult, type index_ChaptersType as ChaptersType, index_DEFAULT_DESCRIPTION_LENGTH as DEFAULT_DESCRIPTION_LENGTH, index_DEFAULT_SUMMARY_KEYWORD_LIMIT as DEFAULT_SUMMARY_KEYWORD_LIMIT, index_DEFAULT_TITLE_LENGTH as DEFAULT_TITLE_LENGTH, type index_EditCaptionsOptions as EditCaptionsOptions, type index_EditCaptionsResult as EditCaptionsResult, type index_EmbeddingsOptions as EmbeddingsOptions, type index_EmbeddingsResult as EmbeddingsResult, type index_EngagementInsightsOptions as EngagementInsightsOptions, type index_EngagementInsightsResult as EngagementInsightsResult, index_GOOGLE_VISION_LIKELIHOOD_TO_SCORE as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, index_HIVE_SEXUAL_CATEGORIES as HIVE_SEXUAL_CATEGORIES, index_HIVE_VIOLENCE_CATEGORIES as HIVE_VIOLENCE_CATEGORIES, type index_HiveModerationOutput as HiveModerationOutput, type index_HiveModerationSource as HiveModerationSource, type index_ModerationOptions as ModerationOptions, type index_ModerationProvider as ModerationProvider, type index_ModerationResult as ModerationResult, type index_MomentInsight as MomentInsight, type index_OverallInsight as OverallInsight, type index_ProfanityDetectionPayload as ProfanityDetectionPayload, type index_Question as Question, type index_QuestionAnswer as QuestionAnswer, type index_QuestionAnswerType as QuestionAnswerType, type index_ReplacementRecord as ReplacementRecord, type index_SpeakerReplacement as SpeakerReplacement, type index_StaticRenditionCleanupOutcome as StaticRenditionCleanupOutcome, type index_SummarizationOptions as SummarizationOptions, type index_SummarizationPromptOverrides as SummarizationPromptOverrides, type index_SummarizationPromptSections as SummarizationPromptSections, type index_SummaryAndTagsResult as SummaryAndTagsResult, type index_SummaryType as SummaryType, type index_ThumbnailModerationScore as ThumbnailModerationScore, type index_TranslationChunkingOptions as TranslationChunkingOptions, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_aggregateTokenUsage as aggregateTokenUsage, index_applyOverrideLists as applyOverrideLists, index_applyReplacements as applyReplacements, index_applySpeakerReplacements as applySpeakerReplacements, index_askQuestions as askQuestions, index_buildReplacementRegex as buildReplacementRegex, index_burnedInCaptionsSchema as burnedInCaptionsSchema, index_censorVttContent as censorVttContent, index_chapterSchema as chapterSchema, index_chaptersSchema as chaptersSchema, index_createReplacer as createReplacer, index_editCaptions as editCaptions, index_extractTranscriptSegmentsForHotspots as extractTranscriptSegmentsForHotspots, index_generateChapters as generateChapters, index_generateEmbeddings as generateEmbeddings, index_generateEngagementInsights as generateEngagementInsights, index_generateVideoEmbeddings as generateVideoEmbeddings, index_getModerationScores as getModerationScores, index_getSummaryAndTags as getSummaryAndTags, index_hasBurnedInCaptions as hasBurnedInCaptions, index_mapShotsToHotspots as mapShotsToHotspots, index_normalizeTranslatedVtt as normalizeTranslatedVtt, index_profanityDetectionSchema as profanityDetectionSchema, index_questionAnswerSchema as questionAnswerSchema, index_shouldSplitChunkTranslationError as shouldSplitChunkTranslationError, index_summarySchema as summarySchema, index_transformCueText as transformCueText, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema, index_validateNeverTranslateTerms as validateNeverTranslateTerms, index_verifyNeverTranslateTerms as verifyNeverTranslateTerms };
1613
1622
  }
1614
1623
 
1615
- export { type MomentInsight as $, ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as A, type BurnedInCaptionsAnalysis as B, type CaptionReplacement as C, type ChaptersPromptOverrides as D, type ChaptersPromptSections as E, type ChaptersResult as F, type ChaptersType as G, DEFAULT_DESCRIPTION_LENGTH as H, type ISO639_1 as I, DEFAULT_SUMMARY_KEYWORD_LIMIT as J, DEFAULT_TITLE_LENGTH as K, type LanguageCodePair as L, type EditCaptionsOptions as M, type EditCaptionsResult as N, type EmbeddingsOptions as O, type EmbeddingsResult as P, type EngagementInsightsOptions as Q, type EngagementInsightsResult as R, type SupportedISO639_1 as S, GOOGLE_VISION_LIKELIHOOD_TO_SCORE as T, HIVE_SEXUAL_CATEGORIES as U, HIVE_VIOLENCE_CATEGORIES as V, type HiveModerationOutput as W, type HiveModerationSource as X, type ModerationOptions as Y, type ModerationProvider as Z, type ModerationResult as _, type ISO639_3 as a, type OverallInsight as a0, type ProfanityDetectionPayload as a1, type Question as a2, type QuestionAnswer as a3, type QuestionAnswerType as a4, type ReplacementRecord as a5, type SpeakerReplacement as a6, type StaticRenditionCleanupOutcome as a7, type SummarizationOptions as a8, type SummarizationPromptOverrides as a9, getSummaryAndTags as aA, hasBurnedInCaptions as aB, mapShotsToHotspots as aC, normalizeTranslatedVtt as aD, profanityDetectionSchema as aE, questionAnswerSchema as aF, shouldSplitChunkTranslationError as aG, summarySchema as aH, transformCueText as aI, translateAudio as aJ, translateCaptions as aK, translationSchema as aL, validateNeverTranslateTerms as aM, verifyNeverTranslateTerms as aN, type SummarizationPromptSections as aa, type SummaryAndTagsResult as ab, type SummaryType as ac, type ThumbnailModerationScore as ad, type TranslationChunkingOptions as ae, type TranslationOptions as af, type TranslationPayload as ag, type TranslationResult as ah, aggregateTokenUsage as ai, applyOverrideLists as aj, applyReplacements as ak, applySpeakerReplacements as al, askQuestions as am, buildReplacementRegex as an, burnedInCaptionsSchema as ao, censorVttContent as ap, chapterSchema as aq, chaptersSchema as ar, createReplacer as as, editCaptions as at, extractTranscriptSegmentsForHotspots as au, generateChapters as av, generateEmbeddings as aw, generateEngagementInsights as ax, generateVideoEmbeddings as ay, getModerationScores as az, type SupportedISO639_3 as b, getLanguageName as c, isValidISO639_1 as d, isValidISO639_3 as e, toISO639_3 as f, getLanguageCodePair as g, index as h, isUndeterminedLanguageCode as i, ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as j, ASK_QUESTIONS_MAX_QUESTION_LENGTH as k, type AskQuestionsOptions as l, type AskQuestionsResult as m, type AskQuestionsType as n, type AudioTranslationOptions as o, type AudioTranslationResult as p, type AutoCensorProfanityOptions as q, type BurnedInCaptionsOptions as r, type BurnedInCaptionsPromptOverrides as s, toISO639_1 as t, type BurnedInCaptionsPromptSections as u, type BurnedInCaptionsResult as v, type CensorMode as w, type Chapter as x, type ChapterSystemPromptSections as y, type ChaptersOptions as z };
1624
+ export { type ModerationResult as $, ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as A, type BurnedInCaptionsAnalysis as B, type CaptionReplacement as C, type ChaptersOptions as D, type ChaptersPromptOverrides as E, type ChaptersPromptSections as F, type ChaptersResult as G, type ChaptersType as H, type ISO639_1 as I, DEFAULT_DESCRIPTION_LENGTH as J, DEFAULT_SUMMARY_KEYWORD_LIMIT as K, type LanguageCodePair as L, DEFAULT_TITLE_LENGTH as M, type EditCaptionsOptions as N, type EditCaptionsResult as O, type EmbeddingsOptions as P, type EmbeddingsResult as Q, type EngagementInsightsOptions as R, type SupportedISO639_1 as S, type EngagementInsightsResult as T, GOOGLE_VISION_LIKELIHOOD_TO_SCORE as U, HIVE_SEXUAL_CATEGORIES as V, HIVE_VIOLENCE_CATEGORIES as W, type HiveModerationOutput as X, type HiveModerationSource as Y, type ModerationOptions as Z, type ModerationProvider as _, type ISO639_3 as a, type MomentInsight as a0, type OverallInsight as a1, type ProfanityDetectionPayload as a2, type Question as a3, type QuestionAnswer as a4, type QuestionAnswerType as a5, type ReplacementRecord as a6, type SpeakerReplacement as a7, type StaticRenditionCleanupOutcome as a8, type SummarizationOptions as a9, getModerationScores as aA, getSummaryAndTags as aB, hasBurnedInCaptions as aC, mapShotsToHotspots as aD, normalizeTranslatedVtt as aE, profanityDetectionSchema as aF, questionAnswerSchema as aG, shouldSplitChunkTranslationError as aH, summarySchema as aI, transformCueText as aJ, translateAudio as aK, translateCaptions as aL, translationSchema as aM, validateNeverTranslateTerms as aN, verifyNeverTranslateTerms as aO, type SummarizationPromptOverrides as aa, type SummarizationPromptSections as ab, type SummaryAndTagsResult as ac, type SummaryType as ad, type ThumbnailModerationScore as ae, type TranslationChunkingOptions as af, type TranslationOptions as ag, type TranslationPayload as ah, type TranslationResult as ai, aggregateTokenUsage as aj, applyOverrideLists as ak, applyReplacements as al, applySpeakerReplacements as am, askQuestions as an, buildReplacementRegex as ao, burnedInCaptionsSchema as ap, censorVttContent as aq, chapterSchema as ar, chaptersSchema as as, createReplacer as at, editCaptions as au, extractTranscriptSegmentsForHotspots as av, generateChapters as aw, generateEmbeddings as ax, generateEngagementInsights as ay, generateVideoEmbeddings as az, type SupportedISO639_3 as b, getLanguageName as c, isValidISO639_1 as d, isValidISO639_3 as e, toISO639_3 as f, getLanguageCodePair as g, index as h, isUndeterminedLanguageCode as i, ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as j, ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL as k, ASK_QUESTIONS_MAX_QUESTION_LENGTH as l, type AskQuestionsOptions as m, type AskQuestionsResult as n, type AskQuestionsType as o, type AudioTranslationOptions as p, type AudioTranslationResult as q, type AutoCensorProfanityOptions as r, type BurnedInCaptionsOptions as s, toISO639_1 as t, type BurnedInCaptionsPromptOverrides as u, type BurnedInCaptionsPromptSections as v, type BurnedInCaptionsResult as w, type CensorMode as x, type Chapter as y, type ChapterSystemPromptSections as z };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, S as SupportedISO639_1, b as SupportedISO639_3, g as getLanguageCodePair, c as getLanguageName, i as isUndeterminedLanguageCode, d as isValidISO639_1, e as isValidISO639_3, t as toISO639_1, f as toISO639_3, h as workflows } from './index-BupL84pY.js';
1
+ export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, S as SupportedISO639_1, b as SupportedISO639_3, g as getLanguageCodePair, c as getLanguageName, i as isUndeterminedLanguageCode, d as isValidISO639_1, e as isValidISO639_3, t as toISO639_1, f as toISO639_3, h as workflows } from './index-Wjbq-_Z0.js';
2
2
  import { W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './shots-CUI09Ohe.js';
3
3
  export { A as AssetTextTrack, C as ChunkEmbedding, b as ChunkingStrategy, E as Encrypted, c as EncryptedPayload, I as ImageSubmissionMode, M as MuxAIOptions, d as MuxAsset, P as PlaybackAsset, e as PlaybackPolicy, f as ScopedMuxAIOptions, g as StorageAdapter, T as TextChunk, h as TokenChunkingConfig, i as TokenUsage, j as ToneType, U as UsageMetadata, V as VTTChunkingConfig, k as VideoEmbeddingsResult, l as WorkflowCredentialsInput, m as WorkflowMuxClient, n as WorkflowScope, o as decryptFromWorkflow, p as encryptForWorkflow } from './shots-CUI09Ohe.js';
4
4
  import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
@@ -9,7 +9,7 @@ import '@ai-sdk/google';
9
9
  import '@ai-sdk/openai';
10
10
  import '@mux/mux-node';
11
11
 
12
- var version = "0.38.0";
12
+ var version = "0.39.0";
13
13
 
14
14
  type MuxAiErrorType = "validation_error" | "processing_error" | "timeout_error" | "content_policy_error";
15
15
  /**
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.38.0";
8
+ var version = "0.39.0";
9
9
 
10
10
  // src/lib/language-codes.ts
11
11
  var ISO639_1_TO_3 = {
@@ -212,6 +212,10 @@ var EnvSchema = z.object({
212
212
  "Override for Mux stream base URL (defaults to https://stream.mux.com).",
213
213
  "Mux stream URL override"
214
214
  ),
215
+ MUX_BASE_URL: optionalString(
216
+ "Override for the Mux API base URL (defaults to https://api.mux.com).",
217
+ "Mux API base URL override"
218
+ ),
215
219
  // The canary is substring-matched against every LLM output via
216
220
  // `detectLeakReason` ("canary" reason). A too-short override (e.g. a
217
221
  // 3-letter test value like "mux" or "the") would match legitimate
@@ -3012,6 +3016,7 @@ var workflows_exports = {};
3012
3016
  __export(workflows_exports, {
3013
3017
  ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH: () => ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH,
3014
3018
  ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH: () => ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH,
3019
+ ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL: () => ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL,
3015
3020
  ASK_QUESTIONS_MAX_QUESTION_LENGTH: () => ASK_QUESTIONS_MAX_QUESTION_LENGTH,
3016
3021
  DEFAULT_DESCRIPTION_LENGTH: () => DEFAULT_DESCRIPTION_LENGTH,
3017
3022
  DEFAULT_SUMMARY_KEYWORD_LIMIT: () => DEFAULT_SUMMARY_KEYWORD_LIMIT,
@@ -3489,6 +3494,7 @@ function createLanguageSection(languageName) {
3489
3494
 
3490
3495
  // src/workflows/ask-questions.ts
3491
3496
  var ASK_QUESTIONS_MAX_QUESTION_LENGTH = 600;
3497
+ var ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL = 50;
3492
3498
  var ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH = 150;
3493
3499
  var ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH = 500;
3494
3500
  var questionAnswerSchema = z3.object({
@@ -3951,6 +3957,12 @@ async function askQuestionsInternal(assetId, questions, options, collectedUsage)
3951
3957
  if (!questions || questions.length === 0) {
3952
3958
  throw new MuxAiError("At least one question must be provided.", { type: "validation_error" });
3953
3959
  }
3960
+ if (questions.length > ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL) {
3961
+ throw new MuxAiError(
3962
+ `Too many questions: received ${questions.length}, but at most ${ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL} are allowed per call.`,
3963
+ { type: "validation_error" }
3964
+ );
3965
+ }
3954
3966
  questions.forEach((q, idx) => {
3955
3967
  if (!q.question || typeof q.question !== "string" || !q.question.trim()) {
3956
3968
  throw new MuxAiError(