feat: Add tool call parsing for 'tool: {...}' text format
- Detect 'tool: {...}' pattern in Google model text responses
- Parse and convert to OpenAI-compatible tool_calls format
- Extract assistant text from 'assistant: [...]' format if present
- Handle both 'action' and 'name' fields for tool identification
- Convert arguments to JSON string for OpenAI compatibility
This fixes issues where models return tool calls as text instead of
using proper function_call attributes.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment