The response returned from the llm invoke in the query_decision_func() will be of type AIMessage.
To get the content of the AIMessage, you can grab the content attribute. So change:
model_decision = response["messages"][0].lower()
to
model_decision = response.content