ATH-MaaS/Pixelle-Video · error · ValueError
API workflow '{workflow}' not found. Available API workflows
Error message
API workflow '{workflow}' not found. Available API workflows: {available} What it means
resolve_workflow looks up the workflow key among list_workflows() results and raises ValueError when no entry matches, listing all valid 'api/provider/model' keys.
Source
Thrown at pixelle_video/services/api_media.py:424
"key": key,
}
if media_type == "video":
capabilities = self._video_capabilities(provider, model)
info["capabilities"] = capabilities
info["ability_type"] = capabilities.get("ability_type")
info["ability_types"] = capabilities.get("ability_types", [])
info["adapter_ability_types"] = capabilities.get("adapter_ability_types", [])
info["api_contract_verified"] = capabilities.get("api_contract_verified", False)
info["contract_issues"] = capabilities.get("contract_issues", [])
return info
def resolve_workflow(self, workflow: str) -> dict:
"""Resolve an api/provider/model key to model metadata."""
for info in self.list_workflows():
if info["key"] == workflow:
return info
available = ", ".join(info["key"] for info in self.list_workflows())
raise ValueError(f"API workflow '{workflow}' not found. Available API workflows: {available}")
async def __call__(
self,
prompt: str,
workflow: str,
media_type: str = "image",
width: Optional[int] = None,
height: Optional[int] = None,
duration: Optional[float] = None,
output_path: Optional[str] = None,
image_path: Optional[str] = None,
**params,
) -> MediaResult:
info = self.resolve_workflow(workflow)
provider = info["provider"]
model = info["model"]
resolved_media_type = info.get("media_type") or media_type
View on GitHub (pinned to 848b054e4f)
Solutions
- Print service.list_workflows() and copy the exact 'key' of the desired workflow
- Use one of the keys listed in the error message
- Refresh the workflow/model list (models may have been renamed upstream) and update your config
- Verify your account actually has access to the model so it appears in list_workflows()
Example fix
# before await api_media(prompt="sunset", workflow="dashscope/wan2.5-t2v") # after await api_media(prompt="sunset", workflow="dashscope/wan2.7-t2v") # key from list_workflows()
Defensive patterns
Strategy: validation
Validate before calling
keys = {info["key"] for info in service.list_workflows()}
if workflow not in keys:
raise ValueError(f"unknown workflow {workflow!r}; pick one of {sorted(keys)}") Type guard
def valid_workflow(service, workflow: str) -> bool:
return any(i["key"] == workflow for i in service.list_workflows()) Try / catch
try:
meta = service.resolve_workflow(workflow)
except ValueError as e:
logger.warning("workflow not found, refreshing list: %s", e)
meta = service.resolve_workflow(pick_closest_workflow(service.list_workflows(), workflow)) Prevention
- Resolve workflow keys from list_workflows() at runtime rather than hardcoding
- Refresh the workflow list periodically — models get renamed/deprecated upstream
- Verify account access so intended models appear in the enumeration
When it happens
Trigger: Calling __call__ (or resolve_workflow directly) with workflow='<provider>/<model>' string that isn't in the current workflow list — typo, model removed/renamed upstream, or model not enabled for the account.
Common situations: Provider renamed or deprecated a model; account lacks access so the model isn't enumerated; hard-coded workflow string from an older config; separator mismatch ('/' vs ':').
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unknown pipeline: '{pipeline}'. Available pipelines: {availa
- frame_template is required to determine media size
- Progress must be between 0.0 and 1.0, got {self.progress}
- No assets provided. Please upload at least one image or vide
- Image file not found: {image_path}
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/c777d6458024cdfb.
Report an issue: GitHub.