{"record":{"id":"0e104b098bd6f029","repo":"mlflow/mlflow","slug":"invalid-parameter-value-0e104b","errorCode":"INVALID_PARAMETER_VALUE","errorMessage":"Searching traces by model_id is not supported on the current tracking server.","messagePattern":"Searching traces by model_id is not supported on the current tracking server\\.","errorType":"error_code","errorClass":"MlflowException","httpStatus":400,"severity":"error","filePath":"mlflow/store/tracking/rest_store.py","lineNumber":591,"sourceCode":"            req_body,\n            endpoint=f\"{_V3_TRACE_REST_API_PATH_PREFIX}/batchGetInfos\",\n        )\n        return [TraceInfo.from_proto(proto) for proto in response_proto.trace_infos]\n\n    def search_traces(\n        self,\n        experiment_ids: list[str] | None = None,\n        filter_string: str | None = None,\n        max_results: int = SEARCH_TRACES_DEFAULT_MAX_RESULTS,\n        order_by: list[str] | None = None,\n        page_token: str | None = None,\n        model_id: str | None = None,\n        locations: list[str] | None = None,\n    ):\n        locations = _resolve_experiment_ids_and_locations(experiment_ids, locations)\n\n        if model_id is not None:\n            raise MlflowException.invalid_parameter_value(\n                \"Searching traces by model_id is not supported on the current tracking server.\",\n            )\n\n        return self._search_traces(\n            locations=locations,\n            filter_string=filter_string,\n            max_results=max_results,\n            order_by=order_by,\n            page_token=page_token,\n        )\n\n    def _search_traces(\n        self,\n        locations: list[str],\n        filter_string: str | None = None,\n        max_results: int = SEARCH_TRACES_DEFAULT_MAX_RESULTS,\n        order_by: list[str] | None = None,\n        page_token: str | None = None,","sourceCodeStart":573,"sourceCodeEnd":609,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/store/tracking/rest_store.py#L573-L609","documentation":"RestStore.search_traces refuses any call that passes model_id, because filtering traces by model association is not implemented for remote (REST) tracking servers. It raises INVALID_PARAMETER_VALUE immediately instead of sending an unsupported filter to the server.","triggerScenarios":"Calling MlflowClient.search_traces(..., model_id=\"<id>\") against a REST/Databricks tracking store — i.e., any non-local backend.","commonSituations":"Code that works against a local SQLAlchemy store (which supports model_id filtering) fails when pointed at a remote server; notebooks mixing logged-model queries with tracing on Databricks.","solutions":["Remove the model_id argument and filter traces with a filter_string on trace attributes/tags instead.","Use the logged-model trace search API if your MLflow version supports it server-side.","Use a local SQLAlchemy tracking store where model_id filtering is implemented, or upgrade the server to a version that supports it."],"exampleFix":"// before\nclient.search_traces(experiment_ids=[\"1\"], model_id=\"m-123\")\n// after\nclient.search_traces(experiment_ids=[\"1\"], filter_string=\"tags.model_id = 'm-123'\")","handlingStrategy":"validation","validationCode":"def assert_no_model_id(**kwargs):\n    if kwargs.get(\"model_id\") is not None:\n        raise ValueError(\"REST store search_traces does not support model_id\")","typeGuard":null,"tryCatchPattern":"try:\n    client.search_traces(experiment_ids=eids, model_id=mid)\nexcept MlflowException as e:\n    if e.error_code == \"INVALID_PARAMETER_VALUE\":\n        pass  # retry without model_id or with a filter_string","preventionTips":["Never pass model_id to search_traces against REST/Databricks backends.","Filter with filter_string on tags/attributes instead.","Gate model_id search code paths behind a backend-capability check."],"tags":["tracing","rest-store","unsupported-feature"],"backgroundTag":"unsupported-parameter","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}