mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-06 06:15:18 +00:00
- Stateless tool continuation. OpenAI-compatible clients (opencode, etc.) resend the full messages array — system, user, assistant(tool_calls), tool(results) — but no conversation_id, so the prior "conversation_id required for tool continuation" 400 broke every tool call. When no conversation_id is present, rebuild the agent + pending tool calls + tool results directly from the resent messages (StreamProcessor.build_continuation_from_messages) instead of loading server-side pending_tool_state, and call gen_continuation. - Forward OpenAI sampling params (temperature, max_tokens, max_completion_tokens, top_p, frequency_penalty, presence_penalty, stop, seed) from the request to the LLM gen call; the agent otherwise uses its configured defaults.