Files
archived-MoviePilot/app/agent
jxxghp 0e8bcb4df6 fix: patch gemini thought_signature enforcement to cover all function calls
The upstream _parse_chat_history enforcement code uses a first_fc_seen
flag that only adds DUMMY_THOUGHT_SIGNATURE to the first function_call
without thought_signature. Parallel function calls (position 2+) remain
unpatched, causing Gemini API 400 errors for all Gemini 2.5+ models.

Additionally, _is_gemini_3_or_later only matches 'gemini-3', missing
Gemini 2.5 models entirely.

This patch:
1. Extends _is_gemini_3_or_later to also match gemini-2.5 models
2. Wraps _parse_chat_history to ensure ALL function_call parts in ALL
   model messages have thought_signature (not just the first one)
2026-05-25 13:53:02 +08:00
..
2026-05-24 18:03:42 +08:00