Better service#6
Open
lzx1413 wants to merge 6 commits into
Open
Conversation
Introduce a local ArtifactStore and route output path validation, upload handling, task submission, wait, cancel, and output responses through shared service helpers. Keep public API paths intact while reducing duplicated Task/OpenAI/File route behavior and preserving explicit local-only artifact semantics. Includes focused service and OpenAI route tests for the centralized paths.
Add artifact local root and backend boundary configuration, reject unimplemented remote backends, and enforce terminal-task cleanup by TTL, total cache size, and per-task size. Document the local backend as the only implemented artifact backend while keeping S3-compatible storage deferred.
Broaden default rate-limit coverage, stop trusting forwarded client IP headers by default, use timezone-aware health timestamps, and inject runtime config into pipeline and stream services. Add tests for proxy trust behavior, middleware scope, and service/runtime config propagation.
Separate request-response and stream route profiles so stream apps expose only stream/service routes, and make WebRTC/session close behavior observable across session owners. Add route-profile and WebRTC lifecycle tests for stream-only serving boundaries.
Complete local artifact lifecycle behavior with persistent/ephemeral cleanup, failed-output preservation, local artifact ids, artifact metadata, and OpenAI response extensions. Update English and Chinese service/stream docs to describe runtime boundaries, local-only artifact semantics, artifact-id downloads, and OpenAI artifact metadata fields. Keep S3-compatible storage and persistent multi-instance queues explicitly deferred.
- Collect arbitrary non-file multipart form fields into TaskRequest-compatible payloads. - Update WanVideo I2V run_with_file helpers to consume first_image_path and reject object image inputs. - Add service tests for dynamic form fields, including resolution passthrough. - Document recommended artifact cleanup profiles in English and Chinese service docs. Verification: - python -m pytest tests/unit/service/test_task_routes.py tests/integration/test_service_api.py::TestFileUpload -q - python -m pytest tests/unit/service/test_artifact_store.py tests/unit/service/test_task_application_service.py tests/unit/service/test_service_smoke.py tests/unit/openai/test_video_routes.py tests/unit/openai/test_image_routes.py -q - python -m ruff check telefuser/service/api/routers/tasks.py tests/unit/service/test_task_routes.py tests/integration/test_service_api.py - python -m ruff check examples/wan_video/async_wan22_14b_image_to_video_distill_h100.py examples/wan_video/wan21_14b_image_to_video_h100.py examples/wan_video/wan21_14b_image_to_video_lora_h100.py examples/wan_video/wan22_14b_image_to_video_distill_fp8_h100.py examples/wan_video/wan22_14b_image_to_video_distill_h100.py examples/wan_video/wan22_14b_image_to_video_lora_h100.py - python -m py_compile examples/wan_video/async_wan22_14b_image_to_video_distill_h100.py examples/wan_video/wan21_14b_image_to_video_h100.py examples/wan_video/wan21_14b_image_to_video_lora_h100.py examples/wan_video/wan22_14b_image_to_video_distill_fp8_h100.py examples/wan_video/wan22_14b_image_to_video_distill_h100.py examples/wan_video/wan22_14b_image_to_video_lora_h100.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a local ArtifactStore and route output path validation, upload handling, task submission, wait, cancel, and output responses through shared service helpers.
Keep public API paths intact while reducing duplicated Task/OpenAI/File route behavior and preserving explicit local-only artifact semantics.
Includes focused service and OpenAI route tests for the centralized paths.## Description
Motivation
Type of Change
Changes Made
Testing
pytest tests/)Test commands:
# Add the commands used to test your changes pytest tests/Checklist
ruff)pre-commit run --all-files)pytest tests/)[TYPE] Brief descriptionRelated Issues
Fixes #
Additional Notes
GPU Architecture Support
Performance Impact