{"record":{"id":"a30b2ba72cf51b35","repo":"BerriAI/litellm","slug":"model-s-not-found-join-missing-models","errorCode":null,"errorMessage":"Model(s) not found: {', '.join(missing_models)}","messagePattern":"Model\\(s\\) not found: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/model_access_group_management_endpoints.py","lineNumber":399,"sourceCode":"    if not has_model_names and not has_model_ids:\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": \"Either model_names or model_ids must be provided and non-empty\"},\n        )\n\n    # If model_ids is provided, use it (more precise targeting)\n    use_model_ids: Final = has_model_ids\n\n    # Validate model_names exist in router (only if using model_names path)\n    if not use_model_ids and has_model_names:\n        assert data.model_names is not None\n        all_valid, missing_models = validate_models_exist(\n            model_names=data.model_names,\n            llm_router=llm_router,\n        )\n\n        if not all_valid:\n            raise HTTPException(\n                status_code=400,\n                detail={\"error\": f\"Model(s) not found: {', '.join(missing_models)}\"},\n            )\n\n    # Check if database is connected\n    if prisma_client is None:\n        raise HTTPException(\n            status_code=500,\n            detail={\"error\": \"Database not connected. Cannot create access group.\"},\n        )\n\n    try:\n        # Check if access group already exists\n        existing_access_groups: Final = await get_all_access_groups_from_db(prisma_client=prisma_client)\n\n        if data.access_group in existing_access_groups:\n            raise HTTPException(\n                status_code=409,","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py#L381-L417","documentation":"Existence guard on the model_names path: validate_models_exist compared the submitted names against the live llm_router and at least one name has no matching deployment. The missing names are listed in the message; use model_ids for precise targeting.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/model_access_group_management_endpoints.py:399 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the missing models first, or correct the model names to existing ones."],"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-14T00:17:10.932Z"}