{"record":{"id":"8d80a98444902fcc","repo":"BerriAI/litellm","slug":"invalid-arguments-provided-join-invalid-key","errorCode":null,"errorMessage":"Invalid arguments provided: {', '.join(invalid_keys)}. Allowed arguments are: {', '.join(allowed_keys)}.","messagePattern":"Invalid arguments provided: (.+?)\\. Allowed arguments are: (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/_types.py","lineNumber":4643,"sourceCode":"        # get the attribute names for this Pydantic model\n        allowed_keys: Final = LiteLLM_JWTAuth.__annotations__.keys()\n\n        invalid_keys: Final = set(kwargs.keys()) - allowed_keys\n        user_roles_jwt_field: Final = kwargs.get(\"user_roles_jwt_field\")\n        user_allowed_roles: Final = kwargs.get(\"user_allowed_roles\")\n        object_id_jwt_field: Final = kwargs.get(\"object_id_jwt_field\")\n        role_mappings: Final = kwargs.get(\"role_mappings\")\n        scope_mappings: Final = kwargs.get(\"scope_mappings\")\n        enforce_scope_based_access: Final = kwargs.get(\"enforce_scope_based_access\")\n        custom_validate: Final = kwargs.get(\"custom_validate\")\n\n        if custom_validate is not None:\n            fn: Final = get_instance_fn(custom_validate, config_file_path=config_file_path)\n            validate_custom_validate_return_type(fn)\n            kwargs[\"custom_validate\"] = fn\n\n        if invalid_keys:\n            raise ValueError(\n                f\"Invalid arguments provided: {', '.join(invalid_keys)}. Allowed arguments are: {', '.join(allowed_keys)}.\"\n            )\n        if (user_roles_jwt_field is not None and user_allowed_roles is None) or (\n            user_roles_jwt_field is None and user_allowed_roles is not None\n        ):\n            raise ValueError(\"user_allowed_roles must be provided if user_roles_jwt_field is set.\")\n\n        if object_id_jwt_field is not None and role_mappings is None:\n            raise ValueError(\n                \"if object_id_jwt_field is set, role_mappings must also be set. Needed to infer if the caller is a user or team.\"\n            )\n\n        if scope_mappings is not None and not enforce_scope_based_access:\n            raise ValueError(\"scope_mappings must be set if enforce_scope_based_access is true.\")\n\n        super().__init__(**kwargs)\n\n","sourceCodeStart":4625,"sourceCodeEnd":4661,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_types.py#L4625-L4661","documentation":"Raised while parsing the general_settings JWT auth block when the YAML supplies keys that are not fields of LiteLLM_JWTAuth (e.g. a typo like 'user_roles_field' or a removed option). The invalid and allowed key lists are both embedded in the message; this is a config-boot error, not a per-request one, and the offending key must be removed or renamed in config.yaml.","triggerScenarios":"Thrown at litellm/proxy/_types.py:4643 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove invalid arguments; use only the listed allowed arguments."],"exampleFix":"Keep only keys from allowed_keys.","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"}