Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion datapizza-ai-core/datapizza/type/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def google_role(self) -> str:
elif self == ROLE.ASSISTANT or self == ROLE.SYSTEM:
return "model"
elif self == ROLE.TOOL:
return "tool"
# Gemini 3.x rejects the "tool" role with 400 INVALID_ARGUMENT
# ("Role 'tool' is not supported"); function responses must be
# sent as "user" turns, which older models accept as well.
return "user"
else:
raise ValueError(f"Unknown role: {self}")

Expand Down