<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Facing pydantic errors at runtime in MLFlow ChatAgent in Generative AI</title>
    <link>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135070#M1236</link>
    <description>&lt;P&gt;Code works fine locally but deployment in serving endpoint gives me below error at runtime:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"error_code": "BAD_REQUEST", "message": "Encountered an unexpected error while evaluating the model. Verify that the input is compatible with the model for inference. Error ''pydantic_core._pydantic_core.ValidationInfo' object has no attribute 'content''", "stack_trace": "Traceback (most recent call last):\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/__init__.py\", line 834, in transformation\n    (raw_predictions, databricks_output, fs_metrics) = _score_model(\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/__init__.py\", line 509, in _score_model\n    prediction, fs_metrics = score_model_maybe_with_fs_metrics(model, data, params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/scoring_server_utils.py\", line 543, in score_model_maybe_with_fs_metrics\n    return (score_pyfunc_model(model, data, params), None)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/scoring_server_utils.py\", line 548, in score_pyfunc_model\n    return model.predict(data, params=params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/__init__.py\", line 840, in predict\n    return self._predict(data, params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/__init__.py\", line 890, in _predict\n    return self._predict_fn(data, params=params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/loaders/chat_agent.py\", line 97, in predict\n    messages, context, custom_inputs = self._convert_input(model_input)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/loaders/chat_agent.py\", line 64, in _convert_input\n    messages = [ChatAgentMessage(**message) for message in dict_input.get(\"messages\", [])]\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/loaders/chat_agent.py\", line 64, in &amp;lt;listcomp&amp;gt;\n    messages = [ChatAgentMessage(**message) for message in dict_input.get(\"messages\", [])]\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/pydantic/main.py\", line 250, in __init__\n    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/types/agent.py\", line 57, in check_content_and_tool_calls\n    content = values.content\nAttributeError: 'pydantic_core._pydantic_core.ValidationInfo' object has no attribute 'content'. Did you mean: 'context'?\n"}&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 16 Oct 2025 06:44:14 GMT</pubDate>
    <dc:creator>actualhuman_012</dc:creator>
    <dc:date>2025-10-16T06:44:14Z</dc:date>
    <item>
      <title>Facing pydantic errors at runtime in MLFlow ChatAgent</title>
      <link>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135070#M1236</link>
      <description>&lt;P&gt;Code works fine locally but deployment in serving endpoint gives me below error at runtime:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"error_code": "BAD_REQUEST", "message": "Encountered an unexpected error while evaluating the model. Verify that the input is compatible with the model for inference. Error ''pydantic_core._pydantic_core.ValidationInfo' object has no attribute 'content''", "stack_trace": "Traceback (most recent call last):\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/__init__.py\", line 834, in transformation\n    (raw_predictions, databricks_output, fs_metrics) = _score_model(\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/__init__.py\", line 509, in _score_model\n    prediction, fs_metrics = score_model_maybe_with_fs_metrics(model, data, params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/scoring_server_utils.py\", line 543, in score_model_maybe_with_fs_metrics\n    return (score_pyfunc_model(model, data, params), None)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflowserving/scoring_server/scoring_server_utils.py\", line 548, in score_pyfunc_model\n    return model.predict(data, params=params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/__init__.py\", line 840, in predict\n    return self._predict(data, params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/__init__.py\", line 890, in _predict\n    return self._predict_fn(data, params=params)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/loaders/chat_agent.py\", line 97, in predict\n    messages, context, custom_inputs = self._convert_input(model_input)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/loaders/chat_agent.py\", line 64, in _convert_input\n    messages = [ChatAgentMessage(**message) for message in dict_input.get(\"messages\", [])]\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/pyfunc/loaders/chat_agent.py\", line 64, in &amp;lt;listcomp&amp;gt;\n    messages = [ChatAgentMessage(**message) for message in dict_input.get(\"messages\", [])]\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/pydantic/main.py\", line 250, in __init__\n    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)\n  File \"/opt/conda/envs/mlflow-env/lib/python3.10/site-packages/mlflow/types/agent.py\", line 57, in check_content_and_tool_calls\n    content = values.content\nAttributeError: 'pydantic_core._pydantic_core.ValidationInfo' object has no attribute 'content'. Did you mean: 'context'?\n"}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Oct 2025 06:44:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135070#M1236</guid>
      <dc:creator>actualhuman_012</dc:creator>
      <dc:date>2025-10-16T06:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Facing pydantic errors at runtime in MLFlow ChatAgent</title>
      <link>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135106#M1239</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/160119"&gt;@actualhuman_012&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Below someone had the exact same issue. The solution is to use newer version of mlflow &amp;gt;= 3.2&lt;BR /&gt;The problem is caused because there's been an update in pydantic. They changed a lot of things in pydantic v2. So not all APIs are compatibile between each other.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/t5/generative-ai/mlflow-dependency-error-with-pydantic/td-p/127017" target="_blank"&gt;mlflow Dependency Error with pydantic - Databricks Community - 127017&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 10:40:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135106#M1239</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-10-16T10:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Facing pydantic errors at runtime in MLFlow ChatAgent</title>
      <link>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135126#M1240</link>
      <description>&lt;P&gt;Thanks, I upgraded to 3.4.0&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 13:55:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135126#M1240</guid>
      <dc:creator>actualhuman_012</dc:creator>
      <dc:date>2025-10-16T13:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Facing pydantic errors at runtime in MLFlow ChatAgent</title>
      <link>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135145#M1241</link>
      <description>&lt;P&gt;No problem&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/160119"&gt;@actualhuman_012&lt;/a&gt;&amp;nbsp;. Super cool that it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 15:18:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/facing-pydantic-errors-at-runtime-in-mlflow-chatagent/m-p/135145#M1241</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-10-16T15:18:57Z</dc:date>
    </item>
  </channel>
</rss>

