{"record":{"id":"1761b99c73ee0bc1","repo":"affaan-m/ECC","slug":"no-tier-tier-for-slot-slot-have-sorted-table-if-table-else-1761b9","errorCode":null,"errorMessage":"no tier '{tier}' for slot '{slot}'; have {sorted(table) if table else 'no tiers'}","messagePattern":"no tier '(.+?)' for slot '(.+?)'; have (.+?)","errorType":"validation","errorClass":"FalError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/taste/falapi.py","lineNumber":117,"sourceCode":"    },\n    \"text_to_3d\": {\n        \"best\": \"fal-ai/hunyuan-3d/v3.1/pro/text-to-3d\",\n        \"fast\": \"fal-ai/hunyuan-3d/v3.1/rapid/text-to-3d\",\n        \"value\": \"tripo3d/h3.1/text-to-3d\",\n    },\n    \"text_to_image\": {\n        \"best\": \"fal-ai/nano-banana-pro\",       # $0.15 flat, strongest identity\n        \"value\": \"fal-ai/flux-2-pro\",           # $0.03 first MP\n        \"instruct\": \"openai/gpt-image-2\",       # best typography / instructions\n    },\n}\n\n\ndef use_tier(slot: str, tier: str) -> str:\n    \"\"\"Repoint one slot at a named tier. Returns the endpoint now in use.\"\"\"\n    table = TIERS.get(slot)\n    if not table or tier not in table:\n        raise FalError(\n            f\"no tier '{tier}' for slot '{slot}'; \"\n            f\"have {sorted(table) if table else 'no tiers'}\"\n        )\n    ENDPOINTS[slot] = table[tier]\n    return ENDPOINTS[slot]\n\n\n# fal has NO endpoint that renders a mesh to images or video. The catalogue\n# splits 3D into image-to-3d, text-to-3d and 3d-to-3d, and every member of\n# 3d-to-3d emits another mesh - there is no 3d-to-image or 3d-to-video\n# category at all. So a minted GLB cannot re-enter the video graph on fal.\n#\n# It can re-enter locally: render a turntable here (taste/render3d.py), then\n# either assemble the frames with local ffmpeg or push them through\n# ``images_to_video`` above. That is why the 3D branch is not a dead end even\n# though the platform has no renderer.\nNO_RENDER_ENDPOINT = True\n","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/taste/falapi.py#L99-L135","documentation":"use_tier() raises FalError when the requested (slot, tier) pair does not exist in the TIERS registry — either the slot name is unknown (TIERS.get(slot) is None) or the tier name is not a key in that slot's table. The message helpfully lists the available tier names for the given slot. This guards endpoint repointing against typos and stale tier names.","triggerScenarios":"Calling use_tier('video', 'pro') when slot 'video' doesn't exist in TIERS, or when the tier string is misspelled/renamed, or when checking a tier against the wrong slot.","commonSituations":"Typos in slot or tier names; using tier names from an older version of the library after a rename; assuming tiers are shared across slots when each slot defines its own set; copying a use_tier call from code targeting a different slot.","solutions":["Read the available tiers from the error message and use one of those exact names","Check TIERS (or the module's documented slot/tier table) for the correct slot name first","Print sorted(TIERS) to enumerate valid slots before calling use_tier","Update code after library upgrades where tier names may have been renamed"],"exampleFix":"// before\nuse_tier(\"image\", \"quality\")  # tier 'quality' doesn't exist\n// after\nfrom taste import falapi\nprint(sorted(falapi.TIERS[\"image\"]))  # e.g. ['fast', 'pro']\nfalapi.use_tier(\"image\", \"pro\")","handlingStrategy":"validation","validationCode":"from taste import falapi\n\ndef safe_use_tier(slot, tier):\n    if slot not in falapi.TIERS:\n        raise ValueError(f\"unknown slot '{slot}'; have {sorted(falapi.TIERS)}\")\n    if tier not in falapi.TIERS[slot]:\n        raise ValueError(f\"slot '{slot}' has tiers {sorted(falapi.TIERS[slot])}\")\n    return falapi.use_tier(slot, tier)","typeGuard":"def tier_exists(slot: str, tier: str) -> bool:\n    table = falapi.TIERS.get(slot)\n    return bool(table) and tier in table","tryCatchPattern":"try:\n    falapi.use_tier(slot, tier)\nexcept falapi.FalError as e:\n    print(e)  # message lists valid tiers for the slot\n    raise","preventionTips":["Inspect TIERS at startup and validate slot/tier names against it","Reference tier names via constants or TIERS keys rather than string literals","Re-check tier names after library upgrades (renames are common)","Keep slot/tier choices in one config location to avoid drift"],"tags":["configuration","lookup-failure","invalid-argument","api-endpoint"],"backgroundTag":"invalid-enum-value","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}