Task_callback issue - no pydantic output

Hi

I implemented a task_callback function and registered it for some of the tasks executed as follows:

def create_task_callback(task: EveAICrewAITask):
def task_callback(output):
    task.specialist.log_tuning(f"CALLBACK: EveAICrewAITask {task.name} Complete", {'type': type(output).__name__})
    if isinstance(output, BaseModel):
        task.specialist.log_tuning(f"CALLBACK: EveAICrewAITask {task.name} Output is Pydantic",
                                   {'output': output.model_dump()})

return task_callback

this is the TaskOutput dump I received:

"output": {
    "description": "Ask questions to complete or confirm ...",
    "name": "Define Identification Questions",
    "expected_output": "Top {nr_of_questions} questions to ask...",
    "summary": "Ask questions to complete or confirm ...",
    "raw": "{\n  \"questions\": [\n    \"Can you please confirm your current workplace title and responsibilities in more detail?\",\n    \"Is the email address provided the best way to reach you for future correspondence?\",\n    \"Can you provide an alternative phone number in case we are unable to reach you at the current one?\",\n    \"Are there any specific collaboration projects or interests you would like us to note for future discussions?\"\n  ]\n}",
    "pydantic": {},
    "json_dict": null,
    "agent": "Identification Administrative force. \n",
    "output_format": "pydantic"
  }

When I look at the raw output, it appears to be what I’d expect in my Pydantic model:

class LeadIdentificationQuestionsOutput(BaseModel):
    questions: Optional[List[str]] = Field(None, description="Additional questions to further clarify identification")

If my understanding of the returned output is correct, it indicates in “output_format” that it should return a pydantic object. Howver, the pydantic object in the output is empty.

What’s going on? Is this expected behaviour? How can I capture the pydantic output of a task?