MLflow LangChain Model Serving Fails: _UNSUPPORTED_MODEL_ERROR_MESSAGE ImportError
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-11-2025 01:40 AM
Iām trying to log and serve a LangChain-based RFI chatbot model using MLflow in Databricks, but Iām encountering the following error when loading the model:
ImportError: cannot import name '_UNSUPPORTED_MODEL_ERROR_MESSAGE' from 'mlflow.langchain.utils'
Library I am using:
so its registered my model in unity catalog successfully but when i create a endpoint serving its not working and throwing error: ImportError: cannot import name '_UNSUPPORTED_MODEL_ERROR_MESSAGE' from 'mlflow.langchain.utils'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-11-2025 05:38 AM
@Darshan13 , Based on the error, It looks like when Databricks Model Serving tries to load your model, MLflow's internal code attempts to import _UNSUPPORTED_MODEL_ERROR_MESSAGE which doesn't exist in the LangChain utils structure.
Are you successfully loading the same model from UC and performing predictions within the notebook (Excluding model serving)?
I still feel that this might be a version compatibility issue between MLflow 2.14.1 and LangChain 0.3.27. Mlflow version is comparatively older than LangChain. I suggest giving it a try by upgrading MLflow and seeing how it goes.