Skip to content

feat(provider): add WaveSpeedAI video generation protocol - #159

Open
chengzeyi wants to merge 1 commit into
limecloud:mainfrom
chengzeyi:feat/wavespeed-provider
Open

chengzeyi wants to merge 1 commit into
limecloud:mainfrom
chengzeyi:feat/wavespeed-provider

Conversation

@chengzeyi

Copy link
Copy Markdown

变更摘要

  • Add a wavespeed_video route protocol for video generation tasks. Routes whose provider id is wavespeed or whose base URL is api.wavespeed.ai resolve to it.
  • model-provider executes it as asynchronous start/poll: POST {base}/api/v3/{model} (model id in the path, model input in the body), persist the prediction id, then poll GET {base}/api/v3/predictions/{id}/result until completed/failed. A non-200 envelope code is treated as failure even on HTTP 200.
  • Recovery of stale running tasks resumes polling the persisted prediction id and never re-submits.
  • User-observable change: a provider configured with base URL https://api.wavespeed.ai and a model declared with the video_generation task family (e.g. alibaba/wan-3.0/text-to-video, alibaba/wan-3.0/image-to-video) can now run video tasks. Owners touched: model-provider (wire + HTTP), model-routing-core (protocol resolution), media-runtime (task progress), App Server media worker (route → runner). Same shape as the existing xai_video path; nothing deleted.

i18n 影响

  • 无用户可见文案变化

新增 / 变更 namespace

  • None

验证

  • npm run i18n:check
  • npm run verify:local
  • 其他:
    • cargo test -p model-provider -p lime-media-runtime -p model-routing-core -p app-server-protocol (622 passed vs 614 on an unmodified checkout; new: lowering, envelope/poll URL, route resolution, worker happy path / envelope error / resume-without-resubmit)
    • cargo clippy and cargo fmt --check on the touched crates
    • cargo run -p app-server-protocol --bin write_schema_fixtures; node scripts/generate-protocol-types.mjs --check; node scripts/check-app-server-client-contract.mjs

Unverified scope: the app-server and lime-agent changes were not compiled locally. On Linux these crates do not build on main either (keyring-store references secret_service under cfg(target_os = "linux") without the dependency), so they need cargo test -p app-server -p lime-agent on macOS/Windows CI. No live provider run, no GUI/Electron smoke.

架构图确认

  • 本次不属于重大架构变更

非重大原因:adds one provider protocol on the existing video chain (same shape as xai_video); the media video section of internal/aiprompts/architecture.md is updated to list it.

备注

  • Test fixture evidence only; no real-platform evidence.

🤖 Generated with Claude Code

Add a `wavespeed_video` route protocol for video generation tasks. Routes
whose provider id is `wavespeed` or whose base URL is api.wavespeed.ai
resolve to it, and model-provider executes it as an asynchronous
start/poll protocol:

- POST {base}/api/v3/{model} with the lowered model input (prompt, image,
  last_image, aspect_ratio, resolution, duration, seed, generate_audio,
  camera_fixed); the model id stays in the path
- persist the returned prediction id, then poll
  GET {base}/api/v3/predictions/{id}/result until completed or failed
- treat a non-200 envelope `code` as failure even on HTTP 200
- recovery of stale running tasks resumes polling the persisted id and
  never resubmits

Regenerate the protocol schema fixtures and TypeScript protocol types,
and update the media video section of the architecture notes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

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.

1 participant