{"record":{"id":"8d8c210d44c8075e","repo":"BerriAI/litellm","slug":"can-t-find-model-model-name-in-database-acces","errorCode":null,"errorMessage":"Can't find model '{model_name}' in Database. Access group management is only supported for database models.","messagePattern":"Can't find model '(.+?)' in Database\\. Access group management is only supported for database models\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/model_access_group_management_endpoints.py","lineNumber":204,"sourceCode":"    \"\"\"\n    Update all deployments for the given model names to include the access group.\n\n    Args:\n        model_names: List of model names whose deployments should be updated\n        access_group: The access group name to add\n        prisma_client: Database client\n\n    Returns:\n        The (model_id, updated model_info) pair of every deployment actually written,\n        so callers can verify each one survived the post-write reload\n    \"\"\"\n    deployments: Final = await _model_table(prisma_client).find_many(where={\"model_name\": {\"in\": model_names}})\n    verbose_proxy_logger.debug(\"Found %s deployments for model_names: %s\", len(deployments), model_names)\n\n    found_names: Final = {deployment.model_name for deployment in deployments}\n    for model_name in model_names:\n        if model_name not in found_names:\n            raise HTTPException(\n                status_code=400,\n                detail={\n                    \"error\": f\"Can't find model '{model_name}' in Database. Access group management is only supported for database models.\"\n                },\n            )\n\n    tagged: Final = [\n        await _tag_deployment_with_access_group(\n            model_id=deployment.model_id,\n            model_info=deployment.model_info,\n            access_group=access_group,\n            prisma_client=prisma_client,\n        )\n        for deployment in deployments\n    ]\n    return tuple(pair for pair in tagged if pair is not None)\n\n","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py#L186-L222","documentation":"Prerequisite guard in access-group management: the requested model_name has no rows in the LiteLLM database (PrismaModelTable), so there is no deployment to tag with the access group. Access groups only apply to DB-stored models, not config.yaml models.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:204 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the model in the database first (POST /model/new), then manage its access group.","Access groups only work for database models, not config-file models."],"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"}