feat(playground): add video size/duration/quality selectors - #3466
feat(playground): add video size/duration/quality selectors#3466LJR199887 wants to merge 2 commits into
Conversation
WalkthroughThis PR adds video generation model support by introducing two new optional parameters ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/src/helpers/api.js (1)
158-159: Consider case-insensitive model name matching.The current check
inputs.model.includes('video')is case-sensitive. If model names vary in casing (e.g.,"Video-Gen","VIDEO-1"), they won't be detected as video models.🔧 Optional: Case-insensitive check
const isVideoModel = - typeof inputs.model === 'string' && inputs.model.includes('video'); + typeof inputs.model === 'string' && inputs.model.toLowerCase().includes('video');🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/src/helpers/api.js` around lines 158 - 159, The isVideoModel detection is case-sensitive and misses variants like "Video-Gen" or "VIDEO-1"; update the check in the isVideoModel logic to perform a case-insensitive match by normalizing inputs.model (e.g., call .toLowerCase() after confirming typeof inputs.model === 'string') and then checking .includes('video') (or use a case-insensitive regex like /video/i) so all casing variants are detected.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@web/src/helpers/api.js`:
- Around line 158-159: The isVideoModel detection is case-sensitive and misses
variants like "Video-Gen" or "VIDEO-1"; update the check in the isVideoModel
logic to perform a case-insensitive match by normalizing inputs.model (e.g.,
call .toLowerCase() after confirming typeof inputs.model === 'string') and then
checking .includes('video') (or use a case-insensitive regex like /video/i) so
all casing variants are detected.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5f7f849f-6636-434c-9a05-16e9c96bdf06
📒 Files selected for processing (4)
dto/openai_request.goweb/src/components/playground/SettingsPanel.jsxweb/src/constants/playground.constants.jsweb/src/helpers/api.js
Summary by CodeRabbit