request_analysis


Description:

protected async string request_analysis (ArrayList<Message> messages, ModelUsage usage) throws Error

Sends the given messages to the analysis LLM and returns the stripped assistant content. Uses streaming and writes chunks to stderr so progress is visible (e.g. when running from CLI). Retries up to 2 times on null/empty response or error. Returns "" on failure. Call sites should log or warn on empty result as needed.

Parameters:

messages

Pre-built message list (e.g. system + user)

usage

Model usage (e.g. tool_config.analysis or tool_config.vision)

Returns:

Stripped content string, or "" if no valid response