Skip to content

feat(video): add UberLLM video provider for Seedance 2.0, Wan 2.7, Kling 3, Veo 3.1 Fast and more on one key - #936

Open
PSA-Team-source wants to merge 1 commit into
OpenMontageInc:mainfrom
PSA-Team-source:add-uberllm-provider
Open

PSA-Team-source wants to merge 1 commit into
OpenMontageInc:mainfrom
PSA-Team-source:add-uberllm-provider

Conversation

@PSA-Team-source

Copy link
Copy Markdown

Summary

Adds uberllm_video, a hosted video_generation provider (provider uberllm, env UBERLLM_API_KEY). One key reaches seven video model families: Seedance 2.0, Wan 2.7, Kling 3 Standard, Veo 3.1 Fast, LTX 2.3 Fast, Hailuo 02 Standard and Vidu Q3 Turbo, for text-to-video, image-to-video (first frame) and reference-to-video. The same key and prepaid balance also serve UberLLM's image, music and speech models, which is the gap #569 describes; this PR covers video only, and those could follow as separate tools if you want them.

Mirrors #905 (same file set and lifecycle: pinned contract, submit-then-poll, resume_job, settled cost, dry_run quote, Layer 3 skill).

Related issue

Refs #569

Changes

  • tools/video/uberllm_video.py: UberLLMVideo(BaseTool), auto-discovered and ranked by video_selector. model takes a family (seedance-2.0 default, the only one with all three routes, first in models for routing) or an exact UberLLM model id.
    • Submit POST /v1/video/generations with an Idempotency-Key, poll GET /v1/video/generations/{id}, download with the same key (the key is only sent to the UberLLM host). retry_policy.max_retries=0.
    • failed, canceled and expired end without charge (expired is mapped to terminal, since provider_jobs.poll would otherwise keep waiting on it).
    • Reports the job's usage.cost_usd as cost_usd with data.cost_status settled | pending; while the charge is pending it re-reads the job and otherwise reports the listed price.
    • Every payload is checked against the model's pinned JSON Schema with unknown fields refused, so a length, resolution or setting the model lacks fails locally instead of being ignored.
    • estimate_cost from pinned per-second rates, PriceQuoteRequired for an unpinned resolution, no network. dry_run: true returns UberLLM's exact free quote (validate: true). max_cost_usd has the job refused at no charge above that.
    • Local frames and references go to UberLLM's file store (POST /v1/files). The schema does not advertise image_url, so video_selector does not send local frames to fal first.
  • tools/provider_contracts/uberllm_video.json: 16 model ids in 7 families, each with the request schema from GET /v1/models/{id} and per-resolution rates from free validate quotes (highest rate across audio settings, so estimates do not undercount). Verified 2026-11-10.
  • tests/contracts/test_uberllm_video.py: 45 tests, all HTTP faked.
  • .agents/skills/uberllm-video/SKILL.md (Layer 3) plus a row in ai-video-gen; docs/PROVIDERS.md env line, provider section, pricing and coverage rows; .env.example.

Testing

  • pytest tests/contracts/test_uberllm_video.py tests/contracts/test_pika_video.py tests/tools/test_video_selector_routing.py -q: 164 passed.
  • pytest tests/ -q (Python 3.11, macOS): 2954 passed, 20 skipped, 8 failed. The 8 failures are in test_audio_enhance_default_container, test_caption_workspace_isolation and test_showcase_card_security, and fail the same way on main here because the local ffmpeg build has no drawtext filter or libvorbis.
  • Live dry_run through UberLLMVideo().execute(...): estimates matched the quotes exactly (Seedance 2.0 text 5 s $0.76; Seedance 2.0 reference 5 s $0.2684 with aspect_ratio 16:9 applied by default).

Tested with fal-ai/vidu/q3/text-to-video/turbo: 1 s 360p clip through execute(), ffprobe 640x352 h264 + aac, 1.04 s, cost_status settled at $0.02975, same as the preflight estimate.

Prices per model: https://uberllm.dev/models

I work on UberLLM.

Checklist

  • The change is focused on a single logical concern.
  • I ran the relevant tests locally (make test-contracts / make test) where applicable.
  • I updated docs/README if behavior or usage changed.
  • No unrelated files (build artifacts, local config) are included in the diff.

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.

1 participant