{"record":{"id":"01f3bd7a4f3e0aee","repo":"BerriAI/litellm","slug":"model-m-not-in-organization-s-allowed-models","errorCode":null,"errorMessage":"Model '{m}' not in organization's allowed models. Organization allowed models={org_table.models}. Organization: {org_table.organization_id}","messagePattern":"Model '(.+?)' not in organization's allowed models\\. Organization allowed models=(.+?)\\. Organization: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":959,"sourceCode":"        and org_table.litellm_budget_table.max_budget is not None\n        and data.max_budget > org_table.litellm_budget_table.max_budget\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Team max_budget ({data.max_budget}) exceeds organization's max_budget ({org_table.litellm_budget_table.max_budget}). Organization: {org_table.organization_id}\"\n            },\n        )\n\n    # Validate team models against organization's allowed models\n    if data.models is not None and len(org_table.models) > 0:\n        # If organization has 'all-proxy-models', skip validation as it allows all models\n        if SpecialModelNames.all_proxy_models.value in org_table.models:\n            pass\n        else:\n            for m in data.models:\n                if m not in org_table.models:\n                    raise HTTPException(\n                        status_code=400,\n                        detail={\n                            \"error\": f\"Model '{m}' not in organization's allowed models. Organization allowed models={org_table.models}. Organization: {org_table.organization_id}\"\n                        },\n                    )\n\n    # Validate team TPM/RPM against organization's TPM/RPM limits (direct comparison)\n    if (\n        data.tpm_limit is not None\n        and org_table.litellm_budget_table is not None\n        and org_table.litellm_budget_table.tpm_limit is not None\n        and data.tpm_limit > org_table.litellm_budget_table.tpm_limit\n    ):\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"Team tpm_limit ({data.tpm_limit}) exceeds organization's tpm_limit ({org_table.litellm_budget_table.tpm_limit}). Organization: {org_table.organization_id}\"\n            },","sourceCodeStart":941,"sourceCodeEnd":977,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L941-L977","documentation":"Org model allowlist enforcement: unless the org grants all-proxy-models, every model in data.models must appear in org_table.models; an unlisted model is rejected with 400 listing the org's allowed set.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:959 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the model from the team request, or add it to the organization's allowed models first."],"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"}