Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors how image/video/audio request payloads are assembled so that optional dataclass fields are forwarded automatically (instead of maintaining per-request hardcoded allowlists), with the intent of consistently propagating fields like acceleration and webhookURL.
Changes:
- Replace
_addOptional{Image,Video,Audio}Fields()allowlists with a new_addOptionalBuiltInDataTypesFields()dataclass-introspection helper. - Wire image/video/audio request builders to use the new helper.
- Add temporary request-object printing in
_requestVideo().
Comments suppressed due to low confidence (1)
runware/base.py:2866
- _buildAudioRequest() adds requestAudio.settings twice via _addOptionalField (once before providerSettings and again after inputs). This is redundant work and makes the request assembly harder to reason about; please remove the duplicate call.
self._addOptionalField(request_object, requestAudio.settings)
self._addAudioProviderSettings(request_object, requestAudio)
self._addOptionalField(request_object, requestAudio.inputs)
self._addOptionalField(request_object, requestAudio.settings)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
…s to avoid callable too
There was a problem hiding this comment.
Pull request overview
This PR refactors request serialization for image/video/audio inference so optional fields are forwarded via a shared _addOptionalBuiltInDataTypesFields() helper rather than per-task hardcoded lists, and removes the legacy skipResponse flow in favor of deliveryMethod="async".
Changes:
- Replace image/video/audio “optional fields” lists with generic dataclass-field forwarding (
_addOptionalBuiltInDataTypesFields()). - Remove
skipResponsesupport from video inference request handling and docs; steer users to async delivery methods instead. - Update README guidance around long-running video operations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
runware/types.py |
Removes skipResponse from IVideoInference and adds a migration hint in __post_init__. |
runware/base.py |
Introduces _addOptionalBuiltInDataTypesFields() and wires image/video/audio builders to use it instead of task-specific optional-field lists. |
README.md |
Removes the skipResponse example/section and updates notes to reference deliveryMethod="async". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
This PR refactors request-building for image/video/audio inference to reduce hardcoded optional-field lists and ensure any set scalar fields (e.g., acceleration, webhookURL) are forwarded consistently. It also removes the legacy skipResponse flow in favor of deliveryMethod="async" and hard-deprecates checkNsfw/skipResponse at the dataclass level.
Changes:
- Replace hardcoded optional-field lists with a reflection-based
_addOptionalBuiltInDataTypesFields()helper for image/video/audio request builders. - Deprecate
IImageInference.checkNsfwandIVideoInference.skipResponse(InitVar + runtime rejection) and remove skipResponse handling from video requests. - Update README to remove
skipResponsedocumentation and recommenddeliveryMethod="async"instead.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| runware/types.py | Deprecates checkNsfw and skipResponse via InitVar and rejects usage in __post_init__. |
| runware/base.py | Introduces _addOptionalBuiltInDataTypesFields() and switches image/video/audio builders to use it; removes video skipResponse handling. |
| README.md | Removes the skipResponse example/notes and points users to deliveryMethod="async". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Changed