Skip to content

feat(tools): add Azure OpenAI Sora video generation tool (#7702) - #16459

Open
iprasen wants to merge 1 commit into
LibreChat-AI:devfrom
iprasen:feat/azure-sora-video-generation
Open

iprasen wants to merge 1 commit into
LibreChat-AI:devfrom
iprasen:feat/azure-sora-video-generation

Conversation

@iprasen

@iprasen iprasen commented Sep 28, 2026

Copy link
Copy Markdown

Closes #7702
/claim #7702

Description

This PR integrates OpenAI's Sora video generation model into LibreChat, supporting both Azure OpenAI and standard OpenAI endpoints.

Key Changes

  1. New Structured Tool (Sora.js):
    • Implements Tool supporting prompt, resolution (1280x720, 720x1280, 1920x1080, 1080x1920), and duration (5s, 10s).
    • Asynchronous job execution: initiates generation via POST /openai/v1/video/generations/jobs and polls status until completion with exponential backoff and timeout handling.
    • Compatible with both Azure OpenAI (api-key auth + api-version) and standard OpenAI (Bearer auth).
    • Integrates with LibreChat's processFileURL to download and store video files locally/cloud storage.
    • Formats outputs with inline markdown and HTML5 <video controls> player for seamless in-chat previews.
    • Supports LibreChat Agents via structured content_and_artifact tuples (ContentTypes.VIDEO_URL).
  2. Tool Registry:
    • Added sora to manifest.json with authConfig supporting SORA_API_KEY or AZURE_OPENAI_API_KEY.
    • Exported and wired in handleTools.js and tools/index.js.
  3. Data Provider:
    • Exported videoGenTools set in packages/data-provider/src/config.ts.
  4. Unit Tests:
    • Added unit test suite in api/app/clients/tools/structured/specs/Sora.spec.js covering initialization, Azure vs OpenAI header routing, URL generation, async polling loop, and error handling.

@github-actions
github-actions Bot changed the base branch from main to dev September 28, 2026 17:42
@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for the contribution! LibreChat merges all changes into dev first — main only moves at release time — so this pull request's base branch was switched from main to dev automatically.

Nothing is needed from you; your commits, reviews and discussion are unchanged. If the diff now shows files you did not touch, rebase onto dev:

git remote add upstream https://github.com/LibreChat-AI/LibreChat.git
git fetch upstream dev
git rebase upstream/dev
git push --force-with-lease

Maintainers: apply the target: main label and restore the base branch if this one genuinely belongs on main.

@iprasen iprasen closed this Sep 28, 2026
@iprasen
iprasen force-pushed the feat/azure-sora-video-generation branch from c83b6a8 to c8c5478 Compare September 28, 2026 18:26
@iprasen iprasen reopened this Sep 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Support for Sora Video Generation (Azure OpenAI Integration)

1 participant