当模型没有通过 Ollama API 的 tool_calls 字段返回工具调用,
而是在回复文本中写出 Action/Action Input 时(如 gemma4 系列),
自动从文本中提取工具调用,确保 ReAct Loop 正常执行。
支持的文本格式:
- **Action:** tool_name **Action Input:** {json}
- Action: tool_name Action Input: {json}
- 工具名白名单校验 + JSON 解析容错(单引号、尾逗号等)