Skip to content

feat(providers): add ofox.ai as LLM preset and video generation provider - #132

Open
celeste1900 wants to merge 2 commits into
0xsline:mainfrom
celeste1900:feat/ofox-provider
Open

feat(providers): add ofox.ai as LLM preset and video generation provider#132
celeste1900 wants to merge 2 commits into
0xsline:mainfrom
celeste1900:feat/ofox-provider

Conversation

@celeste1900

Copy link
Copy Markdown

Summary

LLM preset (ofox) — mirrors the openrouter entry exactly: an openai-compatible preset (https://api.ofox.ai/v1), keystore whitelist entries, an asset-free vendor monogram (same approach as atlas/xai), the vision label, and the standard verify assertions.

Video provider (ofox) — same async request-id + poll shape as grok-imagine-video, implemented in its own module (server/plugins/ofox-video-provider.ts) the same way: POST /videos → task id → poll GET /videos/{id} → download from unsigned_urls. Wired capabilities:

  • Text-to-video, first-frame / first-and-last-frame image-to-video, and up to 9 image references. Frame anchors and references are mutually exclusive at the API level (400 references_conflict); validation enforces that before any paid submission. generateAudio and seed pass through. refVideos/refAudios are supported by the OFox API but not wired yet.
  • Local project media rides as base64 data URLs — the OFox gateway re-hosts data URIs on its own object storage before dispatching to the upstream model (verified live), so no public hosting is needed; this reuses the existing mediaDataUrl helper the seedance/hailuo paths already use.
  • Full wiring follows the existing per-provider pattern: validation (validateOfox, rejecting all seedance/kling/hailuo-only options), resumer registration, capabilities, submit_video tool schema, settings vendor page with model discovery through the /models probe (parseModelCatalog), agent skill reference (references/ofox.md), i18n (en/it/ru), .env.example, and verify coverage.

Design notes:

  • OFox is a multi-model gateway (Seedance series, Wan, and more behind one key), so the video model is a free-form catalog id; the settings page's "test connection" lists the catalog (138 models at the time of writing).
  • Per-model duration/resolution limits are enforced server-side by the OFox API with a clear 400 before any task is created, so no local per-model whitelist is kept (it would go stale as the catalog evolves). Local validation keeps the cross-provider contract (2–30s bounds, ratio set, reference-mode exclusivity).

Test plan

  • npm run lint
  • npm test (full verify chain, including the regenerated server tool catalog)
  • npm run verify:agent-skill
  • npm run build (tsc -b + vite)
  • Live end-to-end with a real OFox key:
    • settings "test connection" discovered the model catalog (138 models, 514 ms);
    • text-to-video: POST /generate/video with model: "ofox" (4 s, 9:16, 720p) → job succeeded → saved to the media pool (720×1280 h264 + aac, 4.09 s);
    • image-to-video: firstFrame from a project upload (base64 data URL path) → job succeeded, output first frame matches the reference scene.
    • Screenshots attached in the first comment.

Notes

I work on ofox.ai — this is an official contribution and we'll maintain it long-term (ping me anytime). Test credits: happy to provide credits so you can verify the integration yourself — register at ofox.ai and share the account email here (or reply however you prefer), and we'll top up the account right away.

Developed with AI assistance (Claude), reviewed by the OFox team.

🤖 Generated with Claude Code

celeste1900 and others added 2 commits September 2, 2026 11:52
Add OFox (https://ofox.ai), a multi-model gateway, as:

- an OpenAI-compatible LLM preset (mirrors the openrouter entry; keystore
  whitelist, vendor icon monogram, vision label, verify assertions)
- a video generation provider (async task id + polling, same shape as
  grok-imagine-video, implemented in its own server/plugins module):
  text-to-video, first-frame / first-and-last-frame image-to-video, and
  up to 9 image references (frames and references are mutually exclusive
  at the API level, enforced before submission); generateAudio and seed
  pass through. Local project media rides as base64 data URLs, which the
  OFox gateway re-hosts on its own object storage (verified live).
  Validation, resumer registration, capabilities, tool schema, settings
  page with model discovery via the /models probe, agent skill reference,
  i18n (en/it/ru), .env.example, and verify coverage included.

refVideos/refAudios are supported by the OFox API but not wired yet;
per-model duration/resolution limits are enforced by the API with a clear
400 before any task is created, so no local per-model whitelist is kept.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mirror_urls are persistent signed CDN addresses returned when the
upstream has mirroring enabled; unsigned_urls are temporary upstream
links that may expire within 24 hours. Prefer the former and fall back
to the latter, matching the official retrieve-endpoint recommendation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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