ModelCallResult = ModelResponse[ResponseT] | AIMessage | ExtendedModelResponse[ResponseT]Return type for model call handlers.
Middleware can return either:
ModelResponse: Full response with messages and optional structured outputAIMessage: Simplified return for simple use casesExtendedModelResponse: Response with an optional Command for additional state updates
goto, resume, and graph are not yet supported on these commands.
A NotImplementedError will be raised if you try to use them.