{"record":{"id":"e86a6a8c4d704ed4","repo":"mlflow/mlflow","slug":"argument-arg-name-is-unsupported-for-models-in","errorCode":null,"errorMessage":"Argument '{arg_name}' is unsupported for models in the Unity Catalog.","messagePattern":"Argument '(.+?)' is unsupported for models in the Unity Catalog\\.","errorType":"exception","errorClass":"MlflowException","httpStatus":null,"severity":"error","filePath":"mlflow/store/_unity_catalog/registry/rest_store.py","lineNumber":223,"sourceCode":"\n    catalog_name: str\n    schema_name: str\n    remaining_filter: str | None\n\n\ndef _require_arg_unspecified(arg_name, arg_value, default_values=None, message=None):\n    default_values = [None] if default_values is None else default_values\n    if arg_value not in default_values:\n        _raise_unsupported_arg(arg_name, message)\n\n\ndef _raise_unsupported_arg(arg_name, message=None):\n    messages = [\n        f\"Argument '{arg_name}' is unsupported for models in the Unity Catalog.\",\n    ]\n    if message is not None:\n        messages.append(message)\n    raise MlflowException(\" \".join(messages))\n\n\ndef _raise_unsupported_method(method, message=None):\n    messages = [\n        f\"Method '{method}' is unsupported for models in the Unity Catalog.\",\n    ]\n    if message is not None:\n        messages.append(message)\n    raise MlflowException(\" \".join(messages))\n\n\ndef _load_model(local_model_dir):\n    # Import Model here instead of in the top level, to avoid circular import; the\n    # mlflow.models.model module imports from MLflow tracking, which triggers an import of\n    # this file during store registry initialization\n    from mlflow.models.model import Model\n\n    try:","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/store/_unity_catalog/registry/rest_store.py#L205-L241","documentation":"The Unity Catalog model registry does not support certain model registry API arguments (e.g. registry-level tags or stage-based arguments). _raise_unsupported_arg is invoked via _require_arg_unspecified when a caller passes an argument that the UC registry cannot honor. An optional extra message is appended explaining alternatives.","triggerScenarios":"Calling UC registry operations like create_model_version, search_model_versions, or transition calls while passing unsupported arguments (e.g. stage, tags) to a UnityCatalogRegistryRestStore.","commonSituations":"Reusing workspace-registry client code against a UC registry URI (databricks-uc); copying old scripts that set stage-based arguments; libraries that always populate optional registry arguments.","solutions":["Remove the unsupported argument from the call and use UC-native equivalents (aliases instead of stages)","Read the appended extra message in the error for the suggested UC alternative","Split client code paths so workspace registry calls and UC registry calls use different argument sets"],"exampleFix":"// before\nclient.transition_model_version_stage(name=\"m\", version=\"1\", stage=\"Production\")\n// after\nclient.set_registered_model_alias(name=\"m\", alias=\"Production\", version=\"1\")","handlingStrategy":"validation","validationCode":"UNSUPPORTED_UC_ARGS = {\"stage\", \"tags\"}\n\ndef check_uc_args(**kwargs):\n    bad = UNSUPPORTED_UC_ARGS & set(kwargs)\n    if bad:\n        raise ValueError(f\"Arguments {bad} unsupported for Unity Catalog registry\")","typeGuard":null,"tryCatchPattern":"try:\n    client.create_model_version(name, source, **extra_args)\nexcept MlflowException as e:\n    if \"is unsupported for models in the Unity Catalog\" in str(e):\n        client.create_model_version(name, source)\n    else:\n        raise","preventionTips":["Branch client code on registry type (databricks-uc vs workspace)","Use aliases instead of stages in all new code","Read the appended message in the error for suggested UC alternatives"],"tags":["unity-catalog","model-registry","unsupported-api"],"backgroundTag":"api-parameter-unsupported","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}