ChatRequest.messages[].role accepts TOOL (OpenAPI v0.1.0, components.schemas.Message), but the service treats every message as plain conversation history and forwards it unmodified. No major provider accepts a tool or system message.
for tool:
- OpenAI — role: "tool" requires tool_call_id matching a tool_calls entry in the immediately preceding assistant message. Unmatched: 400.
- Anthropic — tool_result blocks must reference a tool_use id from the previous assistant turn. Same constraint.
- Gemini — no tool role exists. Content.role is user or model; results go in as a functionResponse part whose name must match a declared functionDeclaration.
for system:
- Anthropic — system is a top-level request parameter, not a role. messages[].role accepts only user and assistant. A system-role message in the array is rejected.
- Gemini — same shape: systemInstruction is a separate top-level field, Content.role is user or model.
- OpenAI — the only one that tolerates system/developer messages positioned mid-array.
Next steps
To discuss on how to approach this, either:
- Ensure in capabilities of the clients that they can map TOOL and SYSTEM messages to a LLM-provider appropriate term.
- Drop TOOL and SYSTEM from the enum.
ChatRequest.messages[].role accepts TOOL (OpenAPI v0.1.0, components.schemas.Message), but the service treats every message as plain conversation history and forwards it unmodified. No major provider accepts a tool or system message.
for tool:
for system:
Next steps
To discuss on how to approach this, either: