Repository navigation
fix(react): audio:"native" → unified audio field instead of blind fal.generate_audio injection - #237
Conversation
…erate_audio The sugar blindly injected provider_options.fal.generate_audio into every varg gateway model, relying on the varg API silently stripping the flag on models whose fal schema doesn't declare it. The API now rejects unknown provider_options keys with a 422 (silent stripping was losing real fields), so the blind injection started failing renders on ~26 fal video models. New contract: for varg models the sugar sets providerOptions.varg.audio = true — the UNIFIED native-audio field. VargVideoModel lifts it out of the varg namespace onto the request body top level; the API maps it per model via mapping_rules (rename audio -> generate_audio, migration 0147) and models without native-audio support silently ignore it (same best-effort contract as the unified resolution field). Direct fal/magnific providers keep their own generate_audio handling — they bypass the varg API.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughvarg native audio now uses Changesvarg audio flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change updates native-audio handling to use the unified video request field while preserving existing provider behavior. No actionable merge-blocking risk remains, so the PR is merge-ready after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Companion to vargHQ/api#111 and api migration 0147.
The
audio: "native"sugar injectedprovider_options.fal.generate_audiointo every varg gateway model, relying on the API silently stripping the flag where unsupported. The API now 422s on unknown provider_options keys, breaking renders on ~26 fal video models withoutgenerate_audioin their schema.expandNativeAudio: for varg models setsproviderOptions.varg.audio = true(unified field) instead ofvarg.fal.generate_audioVargVideoModel.doGenerate: liftsaudiofrom the varg namespace to the request body top level; the API maps it per model (rename audio → generate_audio) and silently ignores it elsewhere — same best-effort contract as unifiedresolutionTests: audio-element suite updated (27 pass); full
bun test— only pre-existing pricing failures (also fail on main).Note: render currently vendors vargai/@vargai-gateway — patched separately in the render repo until this ships in a release.