{"record":{"id":"a4d04e1a0e5015a5","repo":"calesthio/OpenMontage","slug":"spec-family-does-not-expose-operation-operat","errorCode":null,"errorMessage":"{spec['family']} does not expose operation={operation!r}, variant={variant!r} on Atlas Cloud","messagePattern":"(.+?) does not expose operation=(.+?), variant=(.+?) on Atlas Cloud","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/atlas_video.py","lineNumber":197,"sourceCode":"        return round(rate * max(duration, 0), 4)\n\n    def estimate_runtime(self, inputs: dict[str, Any]) -> float:\n        return 180.0\n\n    def is_operation_available(self, operation: str) -> bool:\n        return operation in _OPERATIONS\n\n    def _resolve_model(self, model: str, operation: str, variant: str | None = None) -> str:\n        if model not in VIDEO_MODELS:\n            raise ValueError(\n                f\"Unsupported Atlas video model id {model!r}. Use get_info()['model_catalog'] for live routes.\"\n            )\n        spec = VIDEO_MODELS[model]\n        variant = variant or str(spec.get(\"variant\", \"standard\"))\n        route_key = operation if variant == \"standard\" else f\"{operation}_{variant}\"\n        resolved = VIDEO_ROUTES.get(spec[\"family\"], {}).get(route_key)\n        if not resolved:\n            raise ValueError(\n                f\"{spec['family']} does not expose operation={operation!r}, variant={variant!r} on Atlas Cloud\"\n            )\n        return resolved\n\n    @staticmethod\n    def _validate_choice(name: str, value: Any, allowed: tuple[Any, ...] | None) -> Any:\n        if allowed and value not in allowed:\n            raise ValueError(f\"{name}={value!r} is not supported; choose one of {list(allowed)}\")\n        return value\n\n    def _build_payload(self, inputs: dict[str, Any], model: str) -> dict[str, Any]:\n        spec = VIDEO_MODELS[model]\n        payload: dict[str, Any] = {\"model\": model, \"prompt\": inputs.get(\"prompt\", \"\")}\n\n        if spec[\"operation\"] != \"video_edit\":\n            duration = int(inputs.get(\"duration\", 10))\n            payload[\"duration\"] = self._validate_choice(\"duration\", duration, spec[\"durations\"])\n            ratio = inputs.get(\"aspect_ratio\", spec[\"default_ratio\"])","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/atlas_video.py#L179-L215","documentation":"Raised by AtlasVideoTool._resolve_model when the requested model family exists in VIDEO_MODELS but VIDEO_ROUTES[family] has no entry for the composed route key (operation, or f\"{operation}_{variant}\" when variant != 'standard'). It means the model id is known but that operation/variant pairing has no mapped Atlas Cloud endpoint.","triggerScenarios":"Calling atlas_video with a model whose family lacks the requested operation (e.g. image_to_video on a text-only model), or passing variant='pro'/'turbo' when VIDEO_ROUTES defines only the standard route for that family. Route key is built as operation if variant=='standard' else operation_variant, so a typo in either component also lands here.","commonSituations":"Assuming every Atlas model supports every operation; passing a variant that only exists for a different family; stale VIDEO_ROUTES mapping after Atlas adds/renames endpoints; copy-pasting a tool call from one model to another.","solutions":["Check the live catalog: call get_info()['model_catalog'] and confirm the operation/variant pair is listed for that family","Drop the variant argument (it defaults to spec['variant'] or 'standard') or set variant='standard'","Switch to a model whose family is documented to expose the operation you need (e.g. a seedance family for reference-conditioned video)","If you believe the route should exist, update VIDEO_ROUTES for the family and add a test; do not hardcode the resolved endpoint"],"exampleFix":"# before\nresult = atlas_video.run(inputs={'model':'minimax/h3','prompt':'...','operation':'video_edit'})\n\n# after\ninfo = atlas_video.get_info()\n# pick a family whose routes include video_edit from info['model_catalog']\nresult = atlas_video.run(inputs={'model':'google/gemini-omni-flash','prompt':'...','operation':'video_edit','video_url':vid})","handlingStrategy":"validation","validationCode":"# before calling atlas_video\ninfo = atlas_video.get_info()\nspec = info['model_catalog'].get(model)\nassert spec is not None, f'unknown model {model}'\nfamily = spec['family']\nvariant = variant or spec.get('variant', 'standard')\nroute_key = operation if variant == 'standard' else f'{operation}_{variant}'\nassert route_key in info['routes'].get(family, {}), f'{family} lacks {route_key}'","typeGuard":"def atlas_route_exists(catalog: dict, model: str, operation: str, variant: str | None = None) -> bool:\n    spec = catalog.get('model_catalog', {}).get(model)\n    if not spec:\n        return False\n    key = operation if (variant or spec.get('variant', 'standard')) == 'standard' else f\"{operation}_{variant}\"\n    return key in catalog.get('routes', {}).get(spec['family'], {})","tryCatchPattern":"try:\n    result = atlas_video.run(inputs=inputs)\nexcept ValueError as e:\n    if 'does not expose operation' in str(e):\n        catalog = atlas_video.get_info()['model_catalog']\n        raise SystemExit(f'pick a model exposing {operation}: {catalog}') from e\n    raise","preventionTips":["Drive model/operation/variant selection from get_info()['model_catalog'] instead of hardcoding","Add a unit test that every VIDEO_MODELS entry has at least its spec['operation'] route in VIDEO_ROUTES","Treat route gaps as a mapping bug to fix in VIDEO_ROUTES, not something to catch-and-ignore"],"tags":["atlas-cloud","video-generation","validation","routing"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}