{"record":{"id":"f11443ff2c939e18","repo":"BerriAI/litellm","slug":"invalid-fallback-type-must-be-one-of-valid-fall","errorCode":null,"errorMessage":"Invalid fallback_type. Must be one of: {valid_fallback_types}","messagePattern":"Invalid fallback_type\\. Must be one of: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/utils.py","lineNumber":7046,"sourceCode":"        configured_input, configured_output = llm_router.get_configured_token_limits(model_id)\n        if configured_input is not None:\n            max_input_tokens = configured_input\n        if configured_output is not None:\n            max_output_tokens = configured_output\n\n    if max_input_tokens is not None:\n        base[\"max_input_tokens\"] = max_input_tokens\n    if max_output_tokens is not None:\n        base[\"max_output_tokens\"] = max_output_tokens\n\n    if not include_metadata:\n        return base\n\n    effective_fallback_type: Final = fallback_type if fallback_type is not None else \"general\"\n\n    valid_fallback_types: Final = [\"general\", \"context_window\", \"content_policy\"]\n    if effective_fallback_type not in valid_fallback_types:\n        raise HTTPException(\n            status_code=400,\n            detail=f\"Invalid fallback_type. Must be one of: {valid_fallback_types}\",\n        )\n\n    fallbacks: Final = get_all_fallbacks(\n        model=model_id,\n        llm_router=llm_router,\n        fallback_type=effective_fallback_type,\n    )\n    return {**base, \"metadata\": {\"fallbacks\": fallbacks}}\n\n\ndef validate_model_access(\n    model_id: str,\n    available_models: list[str],\n) -> None:\n    \"\"\"\n    Validate that a model is accessible to the user.","sourceCodeStart":7028,"sourceCodeEnd":7064,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/utils.py#L7028-L7064","documentation":"Enum validation when building model-limit metadata: the fallback_type argument is not one of the recognized values (e.g. 'generic'/'context-window'). The valid set is listed in the message; the caller (or config) supplied an unsupported fallback classification.","triggerScenarios":"Thrown at litellm/proxy/utils.py:7046 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set fallback_type to one of the listed valid values."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}