mirror of
https://github.com/GH05TCREW/pentestagent.git
synced 2026-03-07 14:23:20 +00:00
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