TanStackOSS
    ai
    feat(ai-grok): add duration range options to grok video adapter Replace the throwing `validateVideoDuration` with the standard duration-options mechanism. Both grok-imagine video models declare a continuous 1–15 integer- second range via a `GROK_VIDEO_DURATIONS` table, and the adapter overrides `availableDurations()` / `snapDuration()` (backed by the shared `snapToDurationOption` helper) so consumers can discover and pre-snap durations. `createVideoJob` now snaps the requested duration into range (clamp + round) instead of rejecting it, and the snapped value is spread after `...modelOptions` so it is authoritative. Adds the per-model `GrokVideoModelDurationByName` generic, narrows the `createVideoJob` signature to carry the size/duration type params, exports the new helpers/type, and documents the range in the media docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    nx run-many --targets=build --exclude=examples/**,testing/**
Succeeded
CI Pipeline Execution

nx run-many --targets=build --exclude=examples/**,testing/**

Click to copy
Linux
4 CPU cores
read-write access token used
23d489b0742
100%

Cache hits

33 of 33 tasks used cache.

Get faster results

Learn how to enable distribution.

Atomizer enabled

33 groups of tasks optimized.

© 2026 - Nx Cloud

Terms of ServicePrivacy PolicyChangelogStatusDocsContact Nx CloudPricingCompany@NxDevTools