Issue evidence · AI API · crewAIInc/crewAI

System messages with None or list content are stringified into the prompt (OpenAI o1 path, Anthropic)

GitHub issue: https://github.com/crewAIInc/crewAI/issues/8038

Reproduced

A system message whose content is None or a list of blocks is converted with str(), so the model receives the literal text "None" or a Python list repr.

What Badgr ran

Ran the issue's reproduction against CrewAI's message-conversion code (the OpenAI o1 and Anthropic paths), locally on CPU, with no provider call.

What came back

  • None content became {'role': 'user', 'content': 'System: None'}.
  • A list of text blocks became "System: [{'type': 'text', 'text': 'Be terse.'}]".

The Anthropic output in the issue's second case mixed raw blocks with newline strings. Conversion was checked locally, not against a live model.

Checked 2026-10-11 in Badgr’s local development environment.

← All issue evidence