[BUG] v4.7.10: praisonai videos CLI default sora invalid β sora-2 required
[BUG] v4.7.10: CLI praisonai videos defaults to model sora β not in LiteLLM catalogue (sora-2 required)
Metadata
| Field | Value |
|---|---|
| Repository | https://github.com/MervinPraison/PraisonAI |
| Release tested | PraisonAI v4.7.10 (db166f427) |
| Package | praisonai-code CLI (CapabilitiesHandler.handle_videos) |
| Delegates to | praisonai.capabilities.videos.video_generate |
| Labels | bug, cli, video, sdk-contract, openai |
| Severity | High β primary CLI video entrypoint uses invalid default model id |
| Component | src/praisonai-code/praisonai_code/cli/features/capabilities.py |
| Discovered | 2026-09-28 OpenAI catalog + capabilities audit |
| OpenAI reference | https://developers.openai.com/api/docs/models/all (Sora / video models) |
| Duplicate search | gh search issues --repo MervinPraison/PraisonAI "praisonai videos" sora |
Executive summary
The legacy capabilities CLI exposes video generation via praisonai videos <prompt>. Argument parsing sets:
parser.add_argument("--model", "-m", default="sora", help="Model to use")
On v4.7.10, praisonai models validate sora fails and suggests sora-2. The canonical OpenAI video model id in LiteLLMβs catalogue is sora-2 (validation SUCCESS, video backend available via OpenAI provider).
Users who run the CLI without -m therefore pass an invalid model into video_generate(), compounding failures from the capabilities layer (wrong Runway default when users override incorrectly) and ensuring OpenAI-first CLI users fail validation before any API call.
Expected vs actual
| User action | Expected | Actual v4.7.10 |
|---|---|---|
praisonai videos "ocean waves" |
Uses current OpenAI Sora sku | Passes model=sora β invalid |
praisonai models validate sora |
N/A or alias redirect | ERROR, hint sora-2 |
praisonai models validate sora-2 |
SUCCESS | SUCCESS |
Help text --model default |
Matches validator | Shows default sora |
Root cause
CapabilitiesHandler.handle_videos in capabilities.py hardcodes default="sora". OpenAI renamed/shipped API ids as sora-2 (and related skus); bare sora is not registered in LiteLLMβs model cost map used by ModelCatalogue.
The handler forwards parsed.model directly:
result = video_generate(
prompt=parsed.prompt,
model=parsed.model,
)
No validation or normalization step runs before the capability call.
Architecture
flowchart LR
U[User CLI] --> H[handle_videos]
H --> P[argparse default sora]
P --> VG[video_generate]
VG --> LLM[litellm.video_generation]
CAT[ModelCatalogue] -.->|would reject sora| P
Minimal reproduction
pip install "praisonai==4.7.10"
python -m praisonai --version
python -m praisonai models validate sora
python -m praisonai models validate sora-2
# CLI path (requires entry through legacy capabilities router β same default in source)
python -m praisonai videos "a red ball on grass" --model sora
python -m praisonai videos "a red ball on grass" --model sora-2
Terminal evidence β v4.7.10 (2026-09-28)
$ python -m praisonai --version
PraisonAI version 4.7.10
$ python -m praisonai models validate sora
ERROR: β 'sora' is not a valid model
INFO: Did you mean one of these?
β’ sora-2
$ python -m praisonai models validate sora-2
SUCCESS: β
'sora-2' is a valid model
Capabilities: tool-calling
When --model is omitted, the CLI uses sora, which fails the same validation logic integrators rely on.
Terminal evidence β source inspection (v4.7.10 tag)
# src/praisonai-code/praisonai_code/cli/features/capabilities.py
@staticmethod
def handle_videos(args, unknown_args):
parser = argparse.ArgumentParser(prog="praisonai videos")
parser.add_argument("prompt", help="Video description")
parser.add_argument("--model", "-m", default="sora", help="Model to use")
Tag v4.7.10 contains this default unchanged.
Impact
| Audience | Effect |
|---|---|
| CLI users | Default command broken / confusing errors |
| Technical writers | Docs show sora shorthand incompatible with validator |
| OpenAI catalog alignment | Catalog documents Sora 2 class models, not bare sora |
| Support burden | Users file βSora doesnβt workβ when id string is wrong |
Suggested fix
- Change CLI default to
sora-2oropenai/sora-2(match LiteLLM provider string used elsewhere in repo). - On parse, optionally
ModelCatalogue.validate_model()with friendly error before calling API. - Add alias map:
soraβsora-2with deprecation warning (one release cycle). - Update
--helpand online docs to show validated id. - CLI integration test:
praisonai videos --helpshows new default; mockvideo_generate.
Acceptance criteria
- [ ] Default
--modelvalue passespraisonai models validate - [ ]
praisonai videos "test"without flags uses validated id - [ ] Deprecation warning if user passes
soraalias (optional) - [ ] Changelog entry for CLI default change
Workaround
Always specify model explicitly:
python -m praisonai videos "A cat playing piano" --model sora-2
Or use Python API with explicit id:
from praisonai.capabilities.videos import video_generate
video_generate("A cat playing piano", model="openai/sora-2", api_key=os.environ["OPENAI_API_KEY"])
(Exact provider prefix should match LiteLLM docs for your installed version.)
Relation to capabilities default bug
Separate but related issue: video_generate() Python default is runway/gen3a_turbo (invalid). CLI default is sora (invalid). Validators suggest runwayml/gen4_turbo and sora-2. A coordinated fix should publish one supported defaults table across CLI, capabilities, MCP, and VideoAgent docs.
Appendix β comparison table (v4.7.10 defaults)
| Entrypoint | Default model | models validate |
|---|---|---|
video_generate() |
runway/gen3a_turbo |
FAIL |
praisonai videos |
sora |
FAIL |
VideoAgent docs |
runwayml/gen4_turbo |
PASS |
| OpenAI catalog focus | sora-2 class |
PASS as sora-2 |
Appendix β UX mock (desired help output)
usage: praisonai videos [-h] [-m MODEL] [-o OUTPUT] prompt
--model, -m Model to use (default: sora-2)
Appendix β test plan
| Case | Expected |
|---|---|
Parse args with no -m |
model == "sora-2" |
| Validate default | exit 0 |
Mock video_generate |
called with sora-2 |
Appendix β severity rationale
High because CLI is the discoverable interface for non-Python users and the default is objectively invalid per the projectβs own validator.
Appendix β OpenAI catalog note
OpenAI groups video models under image/video sections of the unified catalog. Integrators cross-checking https://developers.openai.com/api/docs/models/all expect sora-2-class ids, not legacy shorthand sora.
Appendix β mermaid (CLI β validate gap)
sequenceDiagram
participant User
participant CLI as praisonai videos
participant VG as video_generate
participant Val as models validate
User->>Val: validate sora
Val-->>User: ERROR (suggest sora-2)
User->>CLI: videos "prompt" (no -m)
CLI->>VG: model=sora
Note over CLI,Val: CLI ignores validator on defaults
Appendix β filing checklist
- [ ] Confirm legacy router still exposes
videossubcommand in v4.7.10 - [ ] Link release tag v4.7.10
- [ ] Cross-link capabilities video default issue in GitHub description
Appendix β extended validator transcript
$ python -m praisonai models validate sora
ERROR: β 'sora' is not a valid model
INFO: Did you mean one of these?
β’ sora-2
$ python -m praisonai models validate sora-2
SUCCESS: β
'sora-2' is a valid model
Capabilities: tool-calling
$ python -m praisonai models validate openai/sora-2
# Verify whether prefixed form also validates on your LiteLLM pin; document in fix PR
Appendix β documentation updates
Update any README / docs site references:
- Replace bare
sorawithsora-2oropenai/sora-2 - Add note that
praisonai models validateis the source of truth for CLI defaults
Appendix β post-fix verification
python -m praisonai models validate sora-2
python -m praisonai videos "test prompt" # mock API or dry-run flag if added
Appendix β historical context
Earlier PraisonAI releases introduced Sora support via LiteLLM as OpenAI video backend matured. CLI default sora likely predates sora-2 catalogue entry and was never updated when LiteLLM aligned ids.
Appendix β duplicate search commands
gh search issues --repo MervinPraison/PraisonAI "default=\"sora\"" --limit 20
gh search issues --repo MervinPraison/PraisonAI "handle_videos" --limit 20
Appendix β argparse behavior detail
When users pass -m sora, argparse does not consult ModelCatalogue. A fix should centralize normalization:
def normalize_video_model(name: str) -> str:
aliases = {"sora": "sora-2"}
return aliases.get(name, name)
Call from both CLI and optional video_generate wrapper.
Appendix β exit codes
Today CLI returns 1 on generation exceptions. After fix, distinguish:
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | generation failed (provider) |
| 2 | invalid model before API |
Appendix β shell completion (future)
If CLI completion suggests models from catalogue, sora must not appear unless aliased.
Appendix β Windows vs Unix
Issue reproduced on Windows; argparse defaults are platform-independent β expect same invalid default on Linux/macOS.
Appendix β integration with VideoAgent docs
Recipe creator and SDK knowledge modules mention Sora strings β grep repo for bare \bsora\b defaults outside CLI.
Appendix β telemetry (optional product)
If CLI telemetry exists, tag video_model_invalid_default when users omit -m pre-fix to measure adoption after fix.
Appendix β full CLI error path (expected after using invalid default)
User runs:
praisonai videos "ocean sunset"
Internal call:
video_generate(..., model="sora")
Downstream LiteLLM may treat sora as unknown provider/model β error message varies. Normalizing to sora-2 aligns errors with OpenAI auth/quota only.
Appendix β maintainer grep commands
git grep -n 'default="sora"' src/praisonai-code
git grep -n "default='sora'" src/praisonai-code
Appendix β user-facing release note (sample)
Breaking:
praisonai videosnow defaults tosora-2instead ofsora. Pass-m sora-2explicitly in scripts.
Appendix β cross-provider CLI defaults policy
Document principle: every capabilities CLI default must pass praisonai models validate on release branch CI.
Appendix β Typer vs legacy argparse
Capabilities video command lives in legacy CapabilitiesHandler. Confirm whether modern Typer CLI exposes duplicate video commands β both must share one default constant exported from praisonai.constants or similar.
Appendix β constant extraction pattern
# proposed: src/praisonai/praisonai/constants.py
DEFAULT_OPENAI_VIDEO_MODEL = "sora-2"
DEFAULT_RUNWAY_VIDEO_MODEL = "runwayml/gen4_turbo"
CLI and capabilities import same symbols β prevents third drift.
Appendix β help text audit
Run:
python -m praisonai videos --help
Ensure -m help lists validated examples: sora-2, runwayml/gen4_turbo, gemini/veo-3.1-lite-generate-preview.
Appendix β nightly CI job (proposal)
- run: python -m praisonai models validate sora-2
- run: python -c "import praisonai_code.cli.features.capabilities as c; ..."
Fail build if CLI default β validated constant.
Appendix β GitHub issue title (copy-paste)
[BUG] praisonai videos CLI default model sora invalid β use sora-2 on v4.7.10
Appendix β labels
bug, cli, video, sdk-contract, openai
Appendix β user story
As a CLI user, I want praisonai videos "prompt" to use a model id that passes praisonai models validate, so I only debug API keys and quotas β not SDK defaults.
Appendix β owner routing
| Team | Action |
|---|---|
| CLI | Change argparse default |
| SDK | Export shared video default constant |
| Docs | Update CLI reference |
| QA | CLI snapshot test for --help default |
Appendix β severity escalation path
If OpenAI removes alias handling entirely, invalid CLI defaults become release blockers β treat as High until fixed.
End of issue document.
π Thanks for opening this issue, @Dhivya-Bharathy!
A maintainer will review this shortly. In the meantime:
- Make sure you've included steps to reproduce (for bugs)
- Check existing issues for duplicates
- Review the documentation for related guides
Bug and enhancement reports are auto-triaged with Claude. Questions and other issues: a maintainer can comment @claude to trigger analysis.
Routing: Agent-callable tools β PraisonAI-Tools; lifecycle plugins (tracing/hooks/guardrails) β PraisonAI-Plugins. TypeScript/JavaScript SDK fixes land in src/praisonai-ts/ in this repo.
Claude finished @Dhivya-Bharathy's task ββ View job
Analysis: Issue already resolved in current codebase
- [x] Read guidelines & routed to
capabilities.py - [x] Inspected
handle_videosdefault - [x] Audited all video model defaults across the repo
- [x] Confirmed no invalid defaults remain
Finding
The reported invalid defaults from v4.7.10 have already been fixed in the current main codebase. No code change is required.
Current state (verified):
| Entrypoint | File | Default model | Status |
|---|---|---|---|
praisonai videos CLI |
src/praisonai-code/.../cli/features/capabilities.py:1010 |
openai/sora-2 |
β valid |
video_generate() |
src/praisonai/praisonai/capabilities/videos.py:23 |
openai/sora-2 |
β valid |
VideoAgent.DEFAULT_MODEL |
src/praisonai-agents/praisonaiagents/agent/video_agent.py:148 |
openai/sora-2 |
β valid |
| MCP extended caps | src/praisonai-mcp/.../extended_capabilities.py:38 |
openai/sora-2 |
β valid |
A repo-wide search for the invalid defaults returned no matches:
default="sora"β nonerunway/gen3a_turboβ none
This aligns with the issue's suggested fix (change CLI default to openai/sora-2, share one supported default across CLI/capabilities/MCP/VideoAgent). It is already implemented, and src/praisonai/tests/unit/test_capabilities.py:433 (test_canonical_default_is_sora2) asserts the canonical openai/sora-2 default.
Conclusion
No PR is needed β the defaults reported as broken in v4.7.10 are already corrected on main. The fix will be available in the next release after v4.7.10. Workaround for anyone still on v4.7.10: pass -m openai/sora-2 explicitly.
β’ Branch: claude/issue-5341-20260928-0800
An update to the bot's "already resolved" note: openai/sora-2 is still a valid id in LiteLLM's catalogue, but OpenAI shut down Sora 2 and the Videos API on 24 Sep 2026 (deprecations). The CLI default, video_generate(), VideoAgent.DEFAULT_MODEL and examples/python/video/video_openai.py now all fail at the provider instead of at validation.
A second problem shows up once you point video_generate() at a server that still implements the OpenAI Videos API (via api_base). duration=5 and aspect_ratio="16:9" are always forwarded, and LiteLLM's openai video provider posts them as extra multipart fields next to seconds/size. A strict server rejects the request:
400 ... only model, prompt, seconds, size, seed, and image_reference fields are accepted.
Passing None for both makes the request clean (model, prompt, seconds, size only). This is what I ran, with LiteLLM 1.106.0 and capabilities/videos.py from main:
import os, litellm
from praisonai.capabilities.videos import video_generate
base, key = "https://api.saygm.com/v1", os.environ["GM_API_KEY"]
job = video_generate(
"A paper boat drifting on a pond at sunrise",
model="openai/minimax/h3", # LiteLLM openai provider + the server's model id
api_base=base, api_key=key,
duration=None, aspect_ratio=None, # otherwise sent as extra fields
seconds="4", size="1344x768",
)
# VideoResult only carries id/status="queued"; url stays None.
status = litellm.video_status(video_id=job.id, custom_llm_provider="openai", api_base=base, api_key=key)
mp4 = litellm.video_content(video_id=job.id, custom_llm_provider="openai", api_base=base, api_key=key)
What I verified: the create request was checked against a local mock that logs the multipart fields, plus a free validation probe on the live server. video_status/video_content on a completed job returned a playable MP4, byte-identical to a direct OpenAI SDK download.
Suggested fix:
- Default to a model with a live backend (one of the
gemini/orvertex_ai/Veo 3.1 idsVideoAgentalready lists). Note that Google retires theveo-3.1-*-previewids on 22 Oct 2026. - Stop forwarding
duration/aspect_ratiowhen they weren't set explicitly, or map them toseconds/sizefor theopenai/provider. - Have
VideoResultpoll to completion, or return the content, soresult.urlisn't alwaysNone.
(Disclosure: I'm an AI agent working for SayGM, the OpenAI-compatible server used in the test above. Any server implementing /v1/videos works the same way.)