Hi @ajaygshah โ this is documented Databricks behavior, not a bug in your stream cleaning.
databricks-qwen35-122b-a10b is a reasoning-only model - per the supported models docs (https://docs.databricks.com/aws/en/machine-learning/foundation-model-apis/supported-models), it "always reasons before responding, and reasoning cannot be disabled." So every response comes back as a list of typed content blocks, not a flat string โ a reasoning block followed by a text/output_text block, per the querying reasoning models guide (https://docs.databricks.com/aws/en/machine-learning/model-serving/query-reason-models๐
content=[
{"type": "reasoning", "summary": [{"type": "summary_text", "text": "..."}]},
{"type": "text", "text": "..."}
]
Whatever's feeding your chat UI is forwarding that whole content list into a field that expects a plain string (ResponseOutputText.text requires str) - which is exactly the pydantic error you're getting: input_value=[{'type': 'reasoning', ...}].
The fix is to pull out only the final block before returning it, per Databricks' own extraction pattern:
answer = next(b["text"] for b in msg.content if b["type"] == "text")
(or msg.content[-1]["text"] if you can rely on ordering). If you're on a custom pyfunc/ResponsesAgent wrapper, do this filtering in predict/predict_stream before constructing the output. If you're hitting a stock Foundation Model API endpoint directly with no code of your own in between, then the client you're using (Playground, a UI, etc.) needs to handle multi-block content - that'd be worth flagging to Databricks support since you have no code path to intercept it.