added
Reasoning field now included in the API response
13 days ago by Cormick Marskamp
With the latest update to our reasoning models, API responses now include the reasoning
and reasoning_signature
fields. These additions provide more transparency into how the model arrives at its answers.
See an example below:
{
"id": "01JWQZ1JB6PSJ1F8KSWE5771GR",
"created": "2025-06-02T09:19:59.308Z",
"object": "vision",
"model": "claude-sonnet-4-20250514",
"provider": "anthropic",
"is_final": true,
"finalized": "2025-06-02T09:20:05.615Z",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "",
"tool_calls": [
{
"type": "function",
"id": "toolu_01A57N7TgYAqcFmiMY9Q7TT4",
"index": 0,
"function": {
"name": "AA_tool",
"arguments": "{\"question\":\"How large can my carry on bag be?\",\"answer\":\"Your carry-on bag must not exceed 22 x 14 x 9 inches (56 x 36 x 23 cm), including handles and wheels. There is no weight limit for carry-on bags, but you must be able to lift it into the overhead bin without assistance.\"}"
}
}
],
"reasoning": "The user is asking about carry-on bag size limits for American Airlines. Let me check the knowledge base for relevant information.\n\nLooking at the knowledge base, I can see there's a question that directly addresses this: \"What are the size and weight limits for carry-on bags?\" with the answer: \"Your carry-on bag must not exceed 22 x 14 x 9 inches (56 x 36 x 23 cm), including handles and wheels. There is no weight limit for carry-on bags, but you must be able to lift it into the overhead bin without assistance.\"\n\nThis question is clearly related to American Airlines travel and I have the relevant information in the knowledge base to answer it. I should use the AA_tool to structure my response.",
"reasoning_signature": "Euxxx",
"type": "tool_calls"
},
"finish_reason": "tool_use"
}
],
"provider_response": {
"id": "msg_01VDbNW9N2khGgx16x5texpt",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-20250514",
"content": [
{
"type": "thinking",
"thinking": "The user is asking about carry-on bag size limits for American Airlines. Let me check the knowledge base for relevant information.\n\nLooking at the knowledge base, I can see there's a question that directly addresses this: \"What are the size and weight limits for carry-on bags?\" with the answer: \"Your carry-on bag must not exceed 22 x 14 x 9 inches (56 x 36 x 23 cm), including handles and wheels. There is no weight limit for carry-on bags, but you must be able to lift it into the overhead bin without assistance.\"\n\nThis question is clearly related to American Airlines travel and I have the relevant information in the knowledge base to answer it. I should use the AA_tool to structure my response.",
"signature": "Euxxx"
},
{
"type": "tool_use",
"id": "toolu_01A57N7TgYAqcFmiMY9Q7TT4",
"name": "AA_tool",
"input": {
"question": "How large can my carry on bag be?",
"answer": "Your carry-on bag must not exceed 22 x 14 x 9 inches (56 x 36 x 23 cm), including handles and wheels. There is no weight limit for carry-on bags, but you must be able to lift it into the overhead bin without assistance."
}
}
],
"stop_reason": "tool_use",
"stop_sequence": null,
"usage": {
"input_tokens": 984,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 312,
"service_tier": "standard"
}
}
}