mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-25 01:45:23 +08:00
Remove response-only finish_reason metadata when converting stored messages into subsequent model requests. Strip provider_specific_fields from Groq messages and tool calls to avoid strict request validation failures after a tool response. Preserve metadata required by other providers, including Gemini thought signatures, without mutating the original message entities. Cover streaming and non-streaming request construction with regression tests.