{"record":{"id":"86ea2451a84976c1","repo":"remotion-dev/remotion","slug":"invalid-transcription-decoding-settings","errorCode":null,"errorMessage":"Invalid transcription decoding settings.","messagePattern":"Invalid transcription decoding settings\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":578,"sourceCode":"\t\t\t\t\t\t\t\t'strideLengthInSeconds must be non-negative and less than half of chunkLengthInSeconds.',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof temperature !== 'number' ||\n\t\t\t\t\t\t\t!Number.isFinite(temperature) ||\n\t\t\t\t\t\t\ttemperature <= 0 ||\n\t\t\t\t\t\t\ttypeof repetitionPenalty !== 'number' ||\n\t\t\t\t\t\t\t!Number.isFinite(repetitionPenalty) ||\n\t\t\t\t\t\t\trepetitionPenalty <= 0 ||\n\t\t\t\t\t\t\ttypeof topK !== 'number' ||\n\t\t\t\t\t\t\t!Number.isInteger(topK) ||\n\t\t\t\t\t\t\ttopK < 0 ||\n\t\t\t\t\t\t\ttypeof noRepeatNgramSize !== 'number' ||\n\t\t\t\t\t\t\t!Number.isInteger(noRepeatNgramSize) ||\n\t\t\t\t\t\t\tnoRepeatNgramSize < 0\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthrow new Error('Invalid transcription decoding settings.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst forceFullSequences = input.forceFullSequences ?? false;\n\t\t\t\t\t\tconst doSample = input.doSample ?? false;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof forceFullSequences !== 'boolean' ||\n\t\t\t\t\t\t\ttypeof doSample !== 'boolean'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'forceFullSequences and doSample must be booleans.',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst src = staticFile(assetPath);\n\t\t\t\t\t\tconst displayName = assetPath.split('/').at(-1) ?? assetPath;\n\t\t\t\t\t\tconst outputPath =\n\t\t\t\t\t\t\tinput.outputPath ?? getDefaultCaptionOutputName(src, displayName);\n\t\t\t\t\t\tif (typeof outputPath !== 'string') {","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L560-L596","documentation":"This catch-all error is thrown when any of the decoding parameters (topK, noRepeatNgramSize and related numeric decoding settings) are not non-negative integers. The tool bundles several numeric checks into one error to reject malformed decoding configuration before starting the Whisper job.","triggerScenarios":"Passing topK = 2.5 (non-integer), topK = -1, noRepeatNgramSize = \"0\", NaN, Infinity, or a similar malformed numeric decoding option.","commonSituations":"Sending numbers as JSON strings; copy-pasting decoding configs from Python/transformers where types differ; using null where 0 was intended.","solutions":["Ensure topK and noRepeatNgramSize are integers >= 0 (defaults: topK 50, noRepeatNgramSize as documented)","Omit the fields to accept defaults","Parse and round values before sending"],"exampleFix":"// before\n{ \"topK\": \"50\" }\n// after\n{ \"topK\": 50 }","handlingStrategy":"validation","validationCode":"const okInt = (v: unknown) => typeof v === 'number' && Number.isInteger(v) && v >= 0;\nif (!okInt(topK) || !okInt(noRepeatNgramSize)) {\n  throw new Error('topK and noRepeatNgramSize must be integers >= 0');\n}","typeGuard":"const isNonNegativeInt = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isInteger(v) && v >= 0;","tryCatchPattern":"try {\n  await callWhisperTool({ topK, noRepeatNgramSize });\n} catch (err) {\n  if (err instanceof Error && err.message === 'Invalid transcription decoding settings.') {\n    // re-run with defaults\n    await callWhisperTool({});\n  }\n}","preventionTips":["Send numbers, never numeric strings from JSON configs","Omit decoding options to use defaults (topK 50)","Check for NaN/Infinity before sending","Round fractional values with Math.round"],"tags":["validation","whisper","decoding"],"backgroundTag":"invalid-config-value","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}