[BUG] v4.7.10: models validate + VideoAgent false-positive for xai/grok-imagine-video ids
[BUG] v4.7.10: praisonai models validate + VideoAgent accept xAI Grok Imagine video ids — LiteLLM has no xAI video backend (runtime fail)
Metadata
| Field | Value |
|---|---|
| Repository | https://github.com/MervinPraison/PraisonAI |
| Release tested | PraisonAI v4.7.10 (db166f427) |
| Packages | praisonai-code (ModelCatalogue), praisonaiagents (VideoAgent) |
| Labels | bug, sdk-contract, video, models-cli, VideoAgent, litellm, xai |
| Severity | High — validators and agent init green-light workflows that cannot execute |
| Discovered | 2026-09-28 re-test on latest PyPI (Windows, Python 3.13) |
| Related OpenAI issue class | Distinct from OpenAI Sora ids — this is cross-provider catalogue drift |
| Duplicate search | gh search issues --repo MervinPraison/PraisonAI "grok-imagine-video" |
Executive summary
LiteLLM’s cost / model catalogue lists video-ish model names such as xai/grok-imagine-video-1.5. LiteLLM’s video generation router does not implement an xAI video backend. Runtime error:
video generation is not supported for xaiOn PraisonAI v4.7.10:
praisonai models validate xai/grok-imagine-video-1.5→ SUCCESS (reports chat-style capabilities like tool-calling).VideoAgent(llm="xai/grok-imagine-video-1.5")constructs without error.agent.generate(...)fails withAPIConnectionError/ xAI video not supported.
Contrast with gemini/veo-3.1-lite-generate-preview: validate SUCCESS, generate reaches Google and fails only on API key — proving the video route exists.
For a trustworthy SDK, video model validation must reflect video backend availability, not mere catalogue membership optimized for chat completions.
Expected vs actual
| Step | Expected strong SDK | Actual v4.7.10 |
|---|---|---|
models validate on video-only id |
FAIL or flag video_generation: false |
SUCCESS |
VideoAgent init with unsupported backend |
Fail fast with supported-model list | Silent success |
generate() |
Provider auth / job | video generation is not supported for xai |
| Compare Gemini Veo id | Same validate path | Validate OK, generate hits provider (auth error only) |
Root cause (conceptual)
ModelCatalogue (LiteLLM model_list + cost map) treats xai/grok-imagine-video-* as known models and infers generic capabilities (tools, etc.) using heuristics aimed at chat/completion models.
VideoAgent.generate() calls litellm.video_generation(), which consults provider-specific video configs. xAI is not registered there.
There is no bridge that asks: “Does LiteLLM expose get_provider_video_config for this id?” during validate or agent construction.
Sequence diagram
sequenceDiagram
participant Dev
participant Val as models validate
participant Cat as ModelCatalogue
participant VA as VideoAgent
participant LLM as litellm.video_generation
Dev->>Val: xai/grok-imagine-video-1.5
Val->>Cat: describe_model
Cat-->>Dev: SUCCESS (chat heuristics)
Dev->>VA: llm=xai/grok-imagine-video-1.5
VA-->>Dev: object created
Dev->>VA: generate(prompt)
VA->>LLM: video_generation
LLM-->>Dev: video generation is not supported for xaiMinimal reproduction
pip install "praisonai==4.7.10"
python -m praisonai --version
python -m praisonai models validate xai/grok-imagine-video-1.5
python -m praisonai models validate gemini/veo-3.1-lite-generate-preview
python -c "
from praisonaiagents import VideoAgent
agent = VideoAgent(llm='xai/grok-imagine-video-1.5')
agent.generate('short test clip', timeout=15)
"Terminal evidence — v4.7.10 (2026-09-28)
$ python -m praisonai --version
PraisonAI version 4.7.10
$ python -m praisonai models validate xai/grok-imagine-video-1.5
SUCCESS: ✅ 'xai/grok-imagine-video-1.5' is a valid model
Capabilities: tool-calling
$ python -c "
from praisonaiagents import VideoAgent
agent = VideoAgent(llm='xai/grok-imagine-video-1.5')
agent.generate('short test clip', timeout=15)
"
Provider List: https://docs.litellm.ai/docs/providers
Error generating video: litellm.APIConnectionError: APIConnectionError:
XaiException - video generation is not supported for xai
APIConnectionError litellm.APIConnectionError: APIConnectionError: XaiException - video generation is not supported for xaiKey observation: Validation succeeded; failure is capability mismatch, not “unknown model.”
Terminal evidence — positive control (Gemini Veo)
Use same flow with a model known to have a LiteLLM video backend:
$ python -m praisonai models validate gemini/veo-3.1-lite-generate-preview
SUCCESS: ✅ 'gemini/veo-3.1-lite-generate-preview' is a valid model
$ python -c "
from praisonaiagents import VideoAgent
VideoAgent(llm='gemini/veo-3.1-lite-generate-preview').generate('test', timeout=15)
"
# Expected without GEMINI key: AuthenticationError / API_KEY_INVALID
# NOT: video generation is not supported for geminiThis contrast should be automated in SDK tests.
Impact
| Stakeholder | Risk |
|---|---|
| Integrator building multi-provider video UI | CI validate passes, production generate fails |
| Agent recipes / YAML scaffolds | Suggest Grok video ids from catalogue |
| Benchmark authors | False comparison vs working Veo/Sora paths |
Trust in models validate |
Treated as capability probe but is chat-oriented |
Suggested fix
Option A — Validator enhancement (preferred)
Add praisonai models validate --mode video (or automatic when id matches *video*):
def validate_video_model(model_id: str) -> None:
from litellm import ProviderConfigManager
cfg = ProviderConfigManager.get_provider_video_config(model=model_id)
if cfg is None:
raise ValueError(f"Model {model_id} has no LiteLLM video backend")Option B — VideoAgent init guard
class VideoAgent:
def __init__(self, llm: str, ...):
if not video_backend_available(llm):
raise ValueError(f"{llm} is not supported for video generation. Try: ...")Option C — Catalogue metadata
Extend ModelInfo with supports_video_generation: bool populated from LiteLLM probes at cache build time.
Acceptance criteria
-
models validate xai/grok-imagine-video-1.5 --video→ FAIL with clear message -
VideoAgent(llm="xai/grok-imagine-video-1.5")raises at init or documents experimental status explicitly -
models validate gemini/veo-3.1-lite-generate-preview --video→ PASS - Regression test mocks LiteLLM video config lookup
- Docs:
models validatechat vs video modes
Workaround
Before shipping a video feature:
import litellm
# Maintainer-documented probe pattern:
try:
litellm.video_generation(model="xai/grok-imagine-video-1.5", prompt="test", api_key="dummy", timeout=5)
except Exception as e:
if "not supported" in str(e).lower():
raise RuntimeError("Video backend missing — pick another model") from ePrefer fixing validator so integrators do not hand-roll probes.
Appendix — false positive mechanism
| Layer | What it checks | xAI Grok video id |
|---|---|---|
| Cost map / model_list | Name exists | ✅ |
| Chat heuristics | tools/vision flags | ✅ (misleading) |
| Video backend registry | Provider implements video | ❌ |
Appendix — other ids to audit
Maintain allowlist/denylist tests for:
xai/grok-imagine-videoxai/grok-imagine-video-1.5- Any
*/grok*video*entries in LiteLLM without backend
Also re-check kling-*, minimax-* if present in catalogue.
Appendix — mermaid (validate modes)
flowchart TB
subgraph today [v4.7.10 validate]
M[model id] --> C[catalogue lookup]
C --> S[SUCCESS chat flags]
end
subgraph proposed [proposed video validate]
M2[model id] --> V[video backend probe]
V -->|backend| OK[SUCCESS video]
V -->|no backend| BAD[ERROR with alternatives]
endAppendix — VideoAgent test gap
Unit tests may mock generate paths for OpenAI/Runway only. Add parametrized test:
@pytest.mark.parametrize("model,should_init", [
("gemini/veo-3.1-lite-generate-preview", True),
("xai/grok-imagine-video-1.5", False), # after fix
])
def test_video_agent_supported_models(model, should_init):
...Appendix — docs wording
Current docs imply models validate proves readiness for all agent types. Clarify:
Chat agents use completion routing. VideoAgent requires video backend validation.
Appendix — severity table
| Dimension | Score |
|---|---|
| User confusion | High |
| Security | Low |
| Frequency | Medium (xAI niche) |
| Fix complexity | Medium |
Appendix — relation to OpenAI catalog audit
OpenAI-native video (sora-2) failures on v4.7.10 are often wrong default strings (CLI sora, capabilities Runway prefix). xAI Grok issue is different: validator false positive despite catalogue listing.
Both erode trust in “supported models” messaging.
Appendix — extended error text (preserve in issues)
Error generating video: litellm.APIConnectionError: APIConnectionError:
XaiException - video generation is not supported for xaiAppendix — filing checklist
- Reproduce on Linux CI
- Link v4.7.10 release
- Note LiteLLM version pinned by PraisonAI 4.7.10 in issue body
Appendix — LiteLLM upstream
If LiteLLM adds xAI video backend later, validator should pick it up dynamically rather than hardcoding denylist.
Appendix — CLI discoverability
python -m praisonai models validate --help
# Future: --capability {chat,video,image,audio}Appendix — consumer FAQ
Q: Is Grok Imagine video “coming soon”?
A: Not via current LiteLLM video route — track LiteLLM + PraisonAI release notes.
Q: Can I still use Grok for chat?
A: Yes — this issue is video generation only.
Appendix — post-fix verification
python -m praisonai models validate xai/grok-imagine-video-1.5 --video
# Expect non-zero exit after fix
python -m praisonai models validate gemini/veo-3.1-lite-generate-preview --video
# Expect successAppendix — duplicate search log template
gh search issues --repo MervinPraison/PraisonAI "grok-imagine-video" --limit 25
gh search issues --repo MervinPraison/PraisonAI "video generation is not supported" --limit 25Appendix — coordinated capabilities sweep
Fix alongside:
- Invalid
video_generateRunway default (separate issue) - Invalid CLI
soradefault (separate issue) - Image
response_formatparam bug (separate issue)
Publish one Capabilities contract doc listing validated defaults per modality.
Appendix — heuristic audit (ModelCatalogue)
Today tool/vision/reasoning flags infer from substring rules (o1, gpt-4o, etc.). Video ids like grok-imagine-video match generic rules → misleading SUCCESS. Video validate mode should bypass chat heuristics.
Appendix — API surface comparison
| API | Uses catalogue? | Uses video backend? |
|---|---|---|
Agent.start |
yes | no |
VideoAgent.generate |
partial | yes |
models validate |
yes | no (bug) |
Appendix — suggested error message copy
Model 'xai/grok-imagine-video-1.5' is listed for chat pricing but LiteLLM does not implement xAI video generation. Use: openai/sora-2, runwayml/gen4_turbo, gemini/veo-3.1-lite-generate-previewAppendix — CI fixture
Check in JSON manifest of {model, video_backend_expected} pairs refreshed on LiteLLM bump.
Appendix — legal / branding
xAI and Grok are third-party marks — issue discusses technical routing only.
Appendix — rate limiting
False positives waste developer time, not API quota — fixing validate avoids futile generate attempts.
Appendix — related LiteLLM issue template
If upstream adds xAI video, link LiteLLM release in PraisonAI changelog and remove denylist entries.
Appendix — expanded Gemini control transcript
$ python -m praisonai models validate gemini/veo-3.1-lite-generate-preview
SUCCESS: ✅ 'gemini/veo-3.1-lite-generate-preview' is a valid model
# generate without key → auth error, NOT "not supported for gemini"Appendix — policy recommendation
Treat models validate SUCCESS as necessary but not sufficient for VideoAgent model selection; document sufficiency conditions in SDK reference.
Appendix — VideoAgent constructor parameters
Document which kwargs (api_key, api_base, timeout) affect generate vs init validation window — init-time backend check is the right hook before users invest in prompt engineering.
Appendix — repro without xAI account
This bug does not require a paid xAI key — failure is local LiteLLM routing. Reproduction is cheap for CI.
Appendix — GitHub issue title (copy-paste)
[BUG] models validate + VideoAgent false-positive for xai/grok-imagine-video — no LiteLLM video backend
Appendix — labels
bug, sdk-contract, video, models-cli, VideoAgent, xai
End of issue document.
Source: MervinPraison/PraisonAI