mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
Improve parsing of tool call inputs and Antigravity compatibility to avoid invalid thinking/tool_use errors. - Parse tool call inputs robustly by accepting both object and JSON-string formats and only produce a functionCall part when valid args exist, reducing spurious or malformed parts. - Preserve the skip_thought_signature_validator approach for calls without a valid thinking signature but stop toggling/tracking a separate "disable thinking" flag; this prevents unnecessary removal of thinkingConfig. - Sanitize tool input schemas before attaching them to the Antigravity request to improve compatibility. - Append the interleaved-thinking hint as a new parts entry instead of overwriting/setting text directly, preserving structure. - Remove unused tracking logic and related comments to simplify flow. These changes reduce errors related to missing/invalid thinking signatures, improve schema compatibility, and make hint injection safer and more consistent.