Add playground video generation endpoints and UI; wire video parameters through frontend and backend - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
size,seconds, andquality, and ensure video requests are handled as non-streaming tasks.Description
PlaygroundVideoSubmitandPlaygroundVideoFetchhandlers andsetupPlaygroundTokenContexthelper to set up token context for playground flows, and refactorPlaygroundto use the helper before delegating toRelayviaRelay(c, types.RelayFormatOpenAI)./pg/video/generations(POST) and/pg/video/generations/:task_id(GET) and keep existing/pg/chat/completionsmapping tocontroller.Playground.GeneralOpenAIRequestwithsecondsandqualityfields to carry video parameters upstream.SettingsPanel.jsx(video size, seconds, quality) and default values inDEFAULT_CONFIG.API_ENDPOINTS.VIDEO_GENERATIONS, updatebuildApiPayloadto includesize,seconds, andqualityfor video models and forcestream = falsefor them, and enrichhandleApiErrorusage.useApiRequestto detect video-generation payloads, build simplified video request payloads (extracting prompt and image from the last user message), route requests to/pg/video/generations, treat video requests as non-streaming, handle returnedtask_id/video_urlresponses by converting them into a summary assistant message, and adjust SSE/stream dispatch logic (forceNonStream) accordingly.Testing
go build ./...which completed successfully.npm run buildwhich completed successfully.npm test(project test suite) and they passed.Codex Task