Files
pentestagent/pentestagent
Dimitri Graur a6cf68430f fix: remove duplicate assistant message when content and tool_calls both present
In CrewOrchestrator.run(), when the LLM returns both content and tool_calls,
the code was appending two consecutive assistant messages to self._messages:
1. {"role": "assistant", "content": response.content}
2. {"role": "assistant", "content": ..., "tool_calls": [...]}

Back-to-back model-role messages cause Gemini (and technically any
OpenAI-compatible API) to reject the conversation on the next turn.
The fix is to drop the redundant bare-content append — the content is
already included in the combined message that follows.

Also update get_available_models() to list Gemini models with the
required gemini/ provider prefix so the helper reflects correct usage.

Fixes #8
2026-02-25 15:49:40 +01:00
..
2025-12-19 10:25:58 -07:00
2025-12-19 10:25:58 -07:00