Kiro Gateway Version
latest
What happened?
When using the Anthropic API and providing messages with the "system" role in the messages array, the gateway raises a 422 Validation Error (Input should be 'user' or 'assistant') and fails.
The gateway should allow system messages in the messages array for Anthropic, extract them, and merge them with the main system_prompt properly without triggering validation errors.
Debug Logs
2026-06-04 11:36:20 | ERROR | kiro.exceptions:validation_exception_handler:88 - Validation error (422): [{'type': 'literal_error', 'loc': ['body', 'messages', 1, 'role'], 'msg': "Input should be 'user' or 'assistant'", 'input': 'system', 'ctx': {'expected': "'user' or 'assistant'"}}]
(Note: No files from debug_logs/ are attached because the request failed at Pydantic validation before reaching Kiro, so no debug logs were generated.)
Kiro Gateway Version
latest
What happened?
When using the Anthropic API and providing messages with the "system" role in the
messagesarray, the gateway raises a 422 Validation Error (Input should be 'user' or 'assistant') and fails.The gateway should allow system messages in the
messagesarray for Anthropic, extract them, and merge them with the mainsystem_promptproperly without triggering validation errors.Debug Logs
2026-06-04 11:36:20 | ERROR | kiro.exceptions:validation_exception_handler:88 - Validation error (422): [{'type': 'literal_error', 'loc': ['body', 'messages', 1, 'role'], 'msg': "Input should be 'user' or 'assistant'", 'input': 'system', 'ctx': {'expected': "'user' or 'assistant'"}}]
(Note: No files from debug_logs/ are attached because the request failed at Pydantic validation before reaching Kiro, so no debug logs were generated.)