- 18 Mar, 2026 20 commits
-
-
Your Name authored
- Add pattern for <tool_call><tool><toolname><key>value</key></toolname></tool></tool_call> - Add pattern for standalone nested tool format <tool><toolname><key>value</key></toolname></tool> - Update strip_tool_calls_from_content to remove these formats from content - Tool name is now parsed as the XML tag itself with nested child tags as arguments
-
Your Name authored
- Add local import of json inside raw_stream_generate() nested function - This fixes NameError that occurred when streaming responses
-
Your Name authored
- Removed incorrect 'await' on generate_stream which returns an async generator
-
Your Name authored
- Added pattern for <tool_call><tool><name>...</name><parameters><key>value</key></parameters></tool></tool_call> - Added pattern for standalone <tool><name>...</name><parameters><key>value</key></parameters></tool> - Extracts key-value pairs from nested XML tags inside <parameters>
-
Your Name authored
- Simplified ApexBig50Parser to only keep unique patterns (markdown JSON, react) - Complex XML parsing is now handled by ToolCallParser as the fallback - This eliminates code duplication between the two parsers
-
Your Name authored
- Added pattern for <tool_call><tool><function>...</function><parameters>...</parameters></tool></tool_call> - Added pattern for standalone <tool><function>...</function><parameters>...</parameters></tool> - Added same patterns to ApexBig50Parser
-
Your Name authored
-
Your Name authored
- Added support for <tool_call><tool><name>...</name><arguments>...</arguments></tool></tool_call> format - Added support for multiple tool calls in <tool_call> wrapper - Added same patterns to ApexBig50Parser for direct handling - Added exception handling for formatter.format_full() to prevent TypeError - Added fallback response when formatted_response is None - ToolCallParser now serves as fallback for all specific model parsers
-
Your Name authored
- Added new pattern to parse <tool><action>...</action><parameters>...</parameters></tool> - Handles both JSON and XML-style key-value pairs in parameters - Example: <tool> <action>search</action> <parameters> <query>Apple AAPL Q4 financials Net Income Revenue</query> </parameters> </tool> -
Your Name authored
- Added new pattern to parse <tool>name</tool><tool_call>JSON</tool_call> format - Handles both closing tag (</tool_call>) and end-of-string as terminator - Works with formats like: <tool>search</tool> <tool_call> {"query": "Apple AAPL Q4 financial report"} </tool_call> -
Your Name authored
- Added debug output to ToolCallParser.extract_tool_calls() method - Shows when parser is called, input text (first 200 chars), and output - Debug logging follows existing codebase pattern using print() with DEBUG prefix - Useful for troubleshooting tool call extraction issues
-
Your Name authored
- Added _parse_xml_style_tool_calls() method to parse XML format like: <tool><name>search</name><arguments>{...}</arguments></tool> - Modified extract_tool_calls() to use XML parsing as fallback - ToolCallParser now serves as fallback for all specific model parsers via ModelParserAdapter (QwenParser, DeepSeekParser, LlamaParser, MistralParser, ClaudeParser, CommandRParser, GemmaParser, GrokParser, PhiParser, ApexBig50Parser) -
Your Name authored
Support for: <tool_call> <tool> <name>search</name> <arguments>{"query": "..."}</arguments> </tool> </tool_call> -
Your Name authored
Support for: <tool_call> <tool> <name>financial_data_lookup</name> <param>...</param> </tool> </tool_call>
-
Your Name authored
Support for format: <tool>yahoo_finance_api</tool>[{"symbol": "AAPL", ...}] -
Your Name authored
Support for: <tool_call> <tool> <action>search</action> <parameters> <query>...</query> </parameters> </tool> </tool_call>
-
Your Name authored
current_manager is the individual model manager which doesn't have 'models'. multi_model_manager has the 'models' dict with all loaded models.
-
Your Name authored
-
Your Name authored
-
Your Name authored
- Add safety check for None formatted_response in debug output - Add debug logging when litellm fallback fails
-
- 17 Mar, 2026 20 commits
-
-
Your Name authored
When resolving 'default', skip keys like 'default', 'image', 'audio', 'image:*', 'audio:*' to find the first actual LLM model.
-
Your Name authored
When resolving 'default' model, skip the 'default' key in models dict and return the first actual loaded model instead.
-
Your Name authored
- Removed --force-all CLI flag - Updated help text to document 'all' option - Updated reasoning_choices to expand 'all' to all options - Updated parsing logic to handle 'all' as string
-
Your Name authored
When requested_model is 'default', get_resolved_model_name now: 1. First tries current_manager.default_model 2. Falls back to the first model in manager.models This ensures the model family is correctly detected for parser selection.
-
Your Name authored
When the model-specific parser (like QwenParser) doesn't find any tool calls, fall back to ToolCallParser as a catch-all.
-
Your Name authored
The regex pattern was missing <tool> - it only matched <tool_call>, funktion>, and <tool_use>. Now it also matches <tool>.
-
Your Name authored
Add custom XML tool format parser for <tool><action>...</action><object>...</object><properties>...</properties></tool> The model was generating tool calls in this format: <tool> <action>search</action> <object>financial_data</object> <properties> <query>...</query> </properties> </tool> Added parser support in ApexBig50Parser and strip_tool_calls_from_content to handle this custom format.
-
Your Name authored
- Bug 1: Skip format_tools_for_prompt in raw mode (already had condition) - Bug 2: Use final_text (after reasoning) instead of generated_text for formatter - Bug 3: Pass final_text to ModelParserAdapter instead of generated_text This prevents reasoning from appearing in both content AND reasoning fields, and allows the tool parser to properly extract tool calls without being confused by reasoning tags.
-
Your Name authored
- Add new --force-all CLI argument - Update --force-reasoning help text to mention --force-all - Handle --force-all in main function to expand to all reasoning options
-
Your Name authored
- Add force_reasoning_prompt function with Big 10 family prefixes - Add inject_system and force_reasoning parameters - Update --force-reasoning CLI with comma-separated options - Add --dump option to show raw output, parsed output, and litellm debug - Fix stop tokens to include ]]> when prompt is selected - Add mock strategy for fake reasoning stats - Chain --system-prompt at start of existing system message - Add 'raw' option to --force-reasoning - Fix format_tools_for_prompt to skip in raw mode - Pass tools to format_for_raw_completion in raw mode - Add parse_and_format method to OpenAIFormatter for tool extraction - Use parse_and_format in raw mode for correct tool extraction pipeline Pipeline: Model output -> Extract reasoning (raw mode) -> ModelParserAdapter (extract tools) -> OpenAIFormatter (final format)
-
Your Name authored
- Add truthy check before 'in' operator to prevent TypeError when force_reasoning_args is None (when --force-reasoning is not specified) - Fixes: name 'force_reasoning_args' is not defined error
-
Your Name authored
- In raw mode, extracted reasoning is now preserved in the response - Mock reasoning is only applied when there's no existing reasoning - Added logic to set extracted reasoning in message after formatter - Same fix applied to non-raw path in generate_chat_response
-
Your Name authored
- System prompt now includes: 'CRITICAL: You must always close your reasoning with ]]> before opening any tool tags' - Extraction logic now uses tool tags as fallback stop markers if close tag is missing - Handles: <tool_call>, <tool>, <|tool_call|>, <|tool|>, <function=
-
Your Name authored
Shows: - Full first pass result - Extraction details (close tag used, reasoning text, final text) - Cleanup details
-
Your Name authored
Now raw mode passes the generated text through OpenAIFormatter which: - Handles tool extraction - Provides OpenAI compatibility - Handles other post-processing This ensures raw mode output is treated the same as regular mode.
-
Your Name authored
- Add cleanup_control_tokens function to strip leading/trailing control tokens - Apply cleanup to final_text and second_pass_result in raw mode - Add mock strategy handling to raw mode (was missing) - Add debug output for cleanup steps
-
Your Name authored
When 'raw' is used without 'prompt', template_manager wasn't defined. Now creating it on-demand when needed.
-
Your Name authored
When 'raw' is used, skip the 'prompt', 'inject', and 'stop' handlers since raw mode handles everything separately. This was causing double assistant headers and corrupted prompts.
-
Your Name authored
The tokenizer approach was causing double assistant headers. Now using only template_manager.format_for_raw_completion which handles everything correctly.
-
Your Name authored
The AgenticTemplateManager already has a format_for_raw_completion method that handles prompt formatting with reasoning tags. No need to manually find the tokenizer - just use the existing template logic.
-