ch32_graph

show:
mock turns=0 · messages=0
live turns=0 · messages=0
scenario a_single_model_node_is_ch01_as_a_graph
scenario a_single_model_node_is_ch01_as_a_graph · 2.7ms
turn 1 · 0.4ms · responded with: Hello there.
model mock · 0.4ms · responded with: Hello there.
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanSay hello, briefly.
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]aiHello there.
final_answer {"content": "Hello there.", "message_count": 3}
scenario a_single_model_node_is_ch01_as_a_graph · 1098.8ms
turn 1 · 1095.5ms · 48 in / 22 out · responded with: Hello!
model live · 1095.4ms (model provider 871.1 · library 224.4) · 48 in / 22 out · responded with: Hello!
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanSay hello, briefly.
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (7)
temperature, max_tokens, top_p, stop, seed, tools, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length193
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "Say hello, briefly.",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:45 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 76f2e1e449c547c66904d58101f10ea6.cloudfront.net (CloudFront)
x-amz-cf-idpZXr3NxtAqxnTF-9bbTx2ukmO1pdv-37kY2sD9fw7WNx9hDUkWfSZg==
x-amz-cf-popDEN53-P2
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-idbd32cad770b66c057ccf20614f938e0e
{
  "id": "81e99f1c-0dce-48fe-8352-c5a42182c1fa",
  "object": "chat.completion",
  "created": 1789336665,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello!",
        "reasoning_content": "The user asks me to say hello briefly. I should just greet them. No tools needed."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 48,
    "completion_tokens": 22,
    "total_tokens": 70,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 19
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 48
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiHello!
final_answer {"content": "Hello!", "message_count": 3}
scenario a_fixed_edge_from_model_to_tool_is_ch02_as_a_graph
scenario a_fixed_edge_from_model_to_tool_is_ch02_as_a_graph · 2.3ms
turn 1 · 0.7ms · asked for: check_order
model mock · 0.6ms · asked for: check_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
tools declared to the mock model {"names": ["check_order"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
check_order({"order_id": "A100"})
tool check_order · 0.2ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
fixed_edge_always_dispatched {"roles": ["system", "human", "ai", "tool"], "tool_call_present": true}
scenario a_fixed_edge_from_model_to_tool_is_ch02_as_a_graph · 1150.7ms
turn 1 · 1146.5ms · 314 in / 60 out · asked for: check_order
model live · 1146.5ms (model provider 1136.3 · library 10.2) · 314 in / 60 out · asked for: check_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length421
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "What's the status of order A100?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_order",
        "description": "Check the status of an order by id.",
        "parameters": {
          "properties": {
            "order_id": {
              "type": "string"
            }
          },
          "required": [
            "order_id"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:46 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 b29a91b65eb208088dd6199048205ee4.cloudfront.net (CloudFront)
x-amz-cf-idfNfTe3Ber9TXJ5i86XIvwN2lktwriIwmAe5je9KvT4BAjMTosMd5bA==
x-amz-cf-popDEN53-P4
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id3c6de1f29a57b797dffaabaa6dcb76d5
{
  "id": "2cdeec66-404a-4f7f-a1dd-ca6e63fa2a3d",
  "object": "chat.completion",
  "created": 1789336666,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "The user wants to check the status of order A100. I'll use the check_order tool.",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_fV83sMWY1qf0TYkRWhT50163",
            "type": "function",
            "function": {
              "name": "check_order",
              "arguments": "{\"order_id\": \"A100\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 314,
    "completion_tokens": 60,
    "total_tokens": 374,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 20
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 186
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
check_order({"order_id": "A100"})
tool check_order · 0.7ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
fixed_edge_always_dispatched {"roles": ["system", "human", "ai", "tool"], "tool_call_present": true}
scenario a_conditional_edge_turns_it_into_the_loop
scenario a_conditional_edge_turns_it_into_the_loop · 3.0ms
turn 1 · 0.5ms · asked for: check_order
model mock · 0.4ms · asked for: check_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100, and do we have widgets in stock?
declared tools (2)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
check_inventoryCheck how many units of an item are in stock.{"description": "Check how many units of an item are in stock.", "properties": {"item": {"title": "Item", "type": "string"}}, "required": ["item"], "title": "check_inventory", "type": "object"}
tools declared to the mock model {"names": ["check_order", "check_inventory"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
check_order({"order_id": "A100"})
tool check_order · 0.1ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
turn 2 · 0.2ms · asked for: check_inventory
model mock · 0.2ms · asked for: check_inventory
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100, and do we have widgets in stock?
[2]ai
check_order({"order_id": "A100"})
[3]toolorder A100: shipped
declared tools (2)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
check_inventoryCheck how many units of an item are in stock.{"description": "Check how many units of an item are in stock.", "properties": {"item": {"title": "Item", "type": "string"}}, "required": ["item"], "title": "check_inventory", "type": "object"}
tools declared to the mock model {"names": ["check_order", "check_inventory"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]ai
check_inventory({"item": "widget"})
tool check_inventory · 0.1ms · given: item=widget · returned: widget: 12 in stock
args {"item": "widget"}
result {"value": "widget: 12 in stock"}
turn 3 · 0.2ms · responded with: Order A100 has shipped, and we have 12 widgets in stock.
model mock · 0.2ms · responded with: Order A100 has shipped, and we have 12 widgets in stock.
context sent — 6 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100, and do we have widgets in stock?
[2]ai
check_order({"order_id": "A100"})
[3]toolorder A100: shipped
[4]ai
check_inventory({"item": "widget"})
[5]toolwidget: 12 in stock
declared tools (2)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
check_inventoryCheck how many units of an item are in stock.{"description": "Check how many units of an item are in stock.", "properties": {"item": {"title": "Item", "type": "string"}}, "required": ["item"], "title": "check_inventory", "type": "object"}
tools declared to the mock model {"names": ["check_order", "check_inventory"], "consulted": false}
context ignored by the mock model {"messages": 6, "roles": ["system", "human", "ai", "tool", "ai", "tool"]}
reply
rolecontent
[0]aiOrder A100 has shipped, and we have 12 widgets in stock.
loop_ran_more_than_once {"total_turns": 3, "tool_dispatches": 2, "final_answer": "Order A100 has shipped, and we have 12 widgets in stock."}
scenario a_conditional_edge_turns_it_into_the_loop · 2061.6ms
turn 1 · 1103.1ms · 374 in / 90 out · asked for: check_order, check_inventory · responded with: I'll look up both.
model live · 1103.0ms (model provider 1093.2 · library 9.9) · 374 in / 90 out · asked for: check_order, check_inventory · responded with: I'll look up both.
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100, and do we have widgets in stock?
declared tools (2)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
check_inventoryCheck how many units of an item are in stock.{"description": "Check how many units of an item are in stock.", "properties": {"item": {"title": "Item", "type": "string"}}, "required": ["item"], "title": "check_inventory", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length665
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "What's the status of order A100, and do we have widgets in stock?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_order",
        "description": "Check the status of an order by id.",
        "parameters": {
          "properties": {
            "order_id": {
              "type": "string"
            }
          },
          "required": [
            "order_id"
          ],
          "type": "object"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "check_inventory",
        "description": "Check how many units of an item are in stock.",
        "parameters": {
          "properties": {
            "item": {
              "type": "string"
            }
          },
          "required": [
            "item"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:47 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 dbb24f3b9579454525416ef48c0f512c.cloudfront.net (CloudFront)
x-amz-cf-idcfdzbkFaRWMCx09UYYi0WVluHO5vxXr86p_bYWrzzx1wCiqrSvYXOA==
x-amz-cf-popDEN52-P3
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id37bd4393fb1f233cfa1537ff156393d1
{
  "id": "62225a51-589d-436f-bc0b-c663d4057f8a",
  "object": "chat.completion",
  "created": 1789336667,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "I'll look up both.",
        "reasoning_content": "The user asks two independent questions. I can call both tools in parallel.",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_LRFJCty8B1KsCL1fvU020928",
            "type": "function",
            "function": {
              "name": "check_order",
              "arguments": "{\"order_id\": \"A100\"}"
            }
          },
          {
            "index": 1,
            "id": "call_01_ulFPe3mxwZOnVvZ0pkh96721",
            "type": "function",
            "function": {
              "name": "check_inventory",
              "arguments": "{\"item\": \"widgets\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 374,
    "completion_tokens": 90,
    "total_tokens": 464,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 15
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 246
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiI'll look up both.
check_order({"order_id": "A100"})
check_inventory({"item": "widgets"})
tool check_order · 0.3ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
tool check_inventory · 0.2ms · given: item=widgets · returned: widgets: 12 in stock
args {"item": "widgets"}
result {"value": "widgets: 12 in stock"}
turn 2 · 952.9ms · 496 in / 24 out · responded with: Here's what I found: - **Order A100:** shipped - **Widgets:** 12 in stock
model live · 952.9ms (model provider 945.1 · library 7.8) · 496 in / 24 out · responded with: Here's what I found: - **Order A100:** shipped - **Widgets:** 12 in stock
context sent — 5 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100, and do we have widgets in stock?
[2]aiI'll look up both.
check_order({"order_id": "A100"})
check_inventory({"item": "widgets"})
[3]toolorder A100: shipped
[4]toolwidgets: 12 in stock
declared tools (2)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
check_inventoryCheck how many units of an item are in stock.{"description": "Check how many units of an item are in stock.", "properties": {"item": {"title": "Item", "type": "string"}}, "required": ["item"], "title": "check_inventory", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length1296
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "What's the status of order A100, and do we have widgets in stock?",
      "role": "user"
    },
    {
      "content": "I'll look up both.",
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_LRFJCty8B1KsCL1fvU020928",
          "function": {
            "name": "check_order",
            "arguments": "{\"order_id\": \"A100\"}"
          }
        },
        {
          "type": "function",
          "id": "call_01_ulFPe3mxwZOnVvZ0pkh96721",
          "function": {
            "name": "check_inventory",
            "arguments": "{\"item\": \"widgets\"}"
          }
        }
      ],
      "reasoning_content": "The user asks two independent questions. I can call both tools in parallel."
    },
    {
      "content": "order A100: shipped",
      "role": "tool",
      "tool_call_id": "call_00_LRFJCty8B1KsCL1fvU020928"
    },
    {
      "content": "widgets: 12 in stock",
      "role": "tool",
      "tool_call_id": "call_01_ulFPe3mxwZOnVvZ0pkh96721"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_order",
        "description": "Check the status of an order by id.",
        "parameters": {
          "properties": {
            "order_id": {
              "type": "string"
            }
          },
          "required": [
            "order_id"
          ],
          "type": "object"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "check_inventory",
        "description": "Check how many units of an item are in stock.",
        "parameters": {
          "properties": {
            "item": {
              "type": "string"
            }
          },
          "required": [
            "item"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:49 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 12468094e35c8a577a333f469209441a.cloudfront.net (CloudFront)
x-amz-cf-idiEoxKTVA95d8uvUeebz3U_Q3dQ7fp-niDGwnpKeR90H4YZ1aDDgMvg==
x-amz-cf-popDEN53-P4
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id68f12db89a0dcba73fd9a400af62b8df
{
  "id": "618763e8-0825-4dd4-aaa3-c0e7d76d10e2",
  "object": "chat.completion",
  "created": 1789336669,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Here's what I found:\n\n- **Order A100:** shipped\n- **Widgets:** 12 in stock",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 496,
    "completion_tokens": 24,
    "total_tokens": 520,
    "prompt_tokens_details": {
      "cached_tokens": 256
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 256,
    "prompt_cache_miss_tokens": 240
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiHere's what I found: - **Order A100:** shipped - **Widgets:** 12 in stock
loop_ran_more_than_once {"total_turns": 2, "tool_dispatches": 2, "final_answer": "Here's what I found:\n\n- **Order A100:** shipped\n- **Widgets:** 12 in stock"}
scenario the_graph_and_the_hand_built_loop_produce_the_same_final_state
scenario the_graph_and_the_hand_built_loop_produce_the_same_final_state · 2.4ms · responded with: Order A100 has shipped.
turn 1 · 0.3ms · asked for: check_order
model mock · 0.2ms · asked for: check_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
tools declared to the mock model {"names": ["check_order"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
check_order({"order_id": "A100"})
tool check_order · 0.1ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
turn 2 · 0.2ms · responded with: Order A100 has shipped.
model mock · 0.2ms · responded with: Order A100 has shipped.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
[2]ai
check_order({"order_id": "A100"})
[3]toolorder A100: shipped
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
tools declared to the mock model {"names": ["check_order"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiOrder A100 has shipped.
model mock · 0.2ms · asked for: check_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
tools declared to the mock model {"names": ["check_order"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
check_order({"order_id": "A100"})
tool check_order · 0.1ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
model mock · 0.2ms · responded with: Order A100 has shipped.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
[2]ai
check_order({"order_id": "A100"})
[3]toolorder A100: shipped
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
tools declared to the mock model {"names": ["check_order"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiOrder A100 has shipped.
comparison {"hand_built_final_answer": "Order A100 has shipped.", "graph_final_answer": "Order A100 has shipped.", "hand_built_message_count": 5, "graph_message_count": 5, "same_final_answer": true}
scenario the_graph_and_the_hand_built_loop_produce_the_same_final_state · 4722.5ms · 371 in / 7 out · responded with: Order A100 has shipped.
turn 1 · 1176.0ms · 314 in / 54 out · asked for: check_order
model live · 1175.2ms (model provider 1163.4 · library 11.8) · 314 in / 54 out · asked for: check_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length421
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "What's the status of order A100?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_order",
        "description": "Check the status of an order by id.",
        "parameters": {
          "properties": {
            "order_id": {
              "type": "string"
            }
          },
          "required": [
            "order_id"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:50 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 86b6aab4b36e97123c5f76cc2e3ac8ec.cloudfront.net (CloudFront)
x-amz-cf-idJ7qWaonE0GOqEVx-K_oCtwIIZ4B-G1MDEHh71-SXBdTeHRm0XKsfzQ==
x-amz-cf-popDEN53-P1
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-idf531c0d16d11262c5260667de37cc01d
{
  "id": "df38bfd3-19b7-4b8e-83f6-8097d86d35d0",
  "object": "chat.completion",
  "created": 1789336669,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "The user asks about order A100. I should call check_order.",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_B9dyeiglJvkrIxXW6UZR7193",
            "type": "function",
            "function": {
              "name": "check_order",
              "arguments": "{\"order_id\": \"A100\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 314,
    "completion_tokens": 54,
    "total_tokens": 368,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 14
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 186
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
check_order({"order_id": "A100"})
tool check_order · 0.7ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
turn 2 · 1894.6ms · 385 in / 7 out · responded with: Order A100 is shipped.
model live · 1894.6ms (model provider 1882.7 · library 11.8) · 385 in / 7 out · responded with: Order A100 is shipped.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
[2]ai
check_order({"order_id": "A100"})
[3]toolorder A100: shipped
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length784
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "What's the status of order A100?",
      "role": "user"
    },
    {
      "content": null,
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_B9dyeiglJvkrIxXW6UZR7193",
          "function": {
            "name": "check_order",
            "arguments": "{\"order_id\": \"A100\"}"
          }
        }
      ],
      "reasoning_content": "The user asks about order A100. I should call check_order."
    },
    {
      "content": "order A100: shipped",
      "role": "tool",
      "tool_call_id": "call_00_B9dyeiglJvkrIxXW6UZR7193"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_order",
        "description": "Check the status of an order by id.",
        "parameters": {
          "properties": {
            "order_id": {
              "type": "string"
            }
          },
          "required": [
            "order_id"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:51 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 958c3abf00b2f9566b7dd6e938a4fdf4.cloudfront.net (CloudFront)
x-amz-cf-idHgJfuheyyERRrktmclj-M7ZL6PBp6gLkOfaD_VK3pf2JcVzsK4A-RQ==
x-amz-cf-popDEN53-P2
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-idbfe12bf010d536755ec33c49c7cd54a8
{
  "id": "99533d3f-132e-4ea9-b983-082267eb97dc",
  "object": "chat.completion",
  "created": 1789336671,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Order A100 is shipped.",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 385,
    "completion_tokens": 7,
    "total_tokens": 392,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 257
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiOrder A100 is shipped.
model live · 995.4ms (model provider 981.3 · library 14.1) · 314 in / 40 out · asked for: check_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length421
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "What's the status of order A100?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_order",
        "description": "Check the status of an order by id.",
        "parameters": {
          "properties": {
            "order_id": {
              "type": "string"
            }
          },
          "required": [
            "order_id"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:53 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 4548950ffe5bf7b4d2419a082d770c1a.cloudfront.net (CloudFront)
x-amz-cf-idYMGKwPt4i8U-65KT7kHN3x6ZTNtj2yVZTCuZF6zchn6sZcfzi1zZyg==
x-amz-cf-popDEN53-P2
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id786d585f729e099a0a50a94df4452ca6
{
  "id": "ff6e6590-976c-40f4-9656-07cf5f2d33fa",
  "object": "chat.completion",
  "created": 1789336673,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_ET_I7uMnSHizqC3G1XpGyRI1668",
            "type": "function",
            "function": {
              "name": "check_order",
              "arguments": "{\"order_id\": \"A100\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 314,
    "completion_tokens": 40,
    "total_tokens": 354,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 186
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
check_order({"order_id": "A100"})
tool check_order · 0.6ms · given: order_id=A100 · returned: order A100: shipped
args {"order_id": "A100"}
result {"value": "order A100: shipped"}
model live · 649.5ms (model provider 637.7 · library 11.8) · 371 in / 7 out · responded with: Order A100 has shipped.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanWhat's the status of order A100?
[2]ai
check_order({"order_id": "A100"})
[3]toolorder A100: shipped
declared tools (1)
tooldescriptionschema
check_orderCheck the status of an order by id.{"description": "Check the status of an order by id.", "properties": {"order_id": {"title": "Order Id", "type": "string"}}, "required": ["order_id"], "title": "check_order", "type": "object"}
wire request
attempt
1
method
POST
url
https://api.deepseek.com/v1/chat/completions
defaulted (6)
temperature, max_tokens, top_p, stop, seed, tool_choice
headers (18)
show
acceptapplication/json
accept-encodinggzip, deflate, zstd
authorizationnot recorded
connectionkeep-alive
content-length709
content-typeapplication/json
hostapi.deepseek.com
user-agentOpenAI/Python 3.6.0
x-stainless-archarm64
x-stainless-asyncfalse
x-stainless-langpython
x-stainless-osMacOS
x-stainless-package-version3.6.0
x-stainless-raw-responsetrue
x-stainless-read-timeout60.0
x-stainless-retry-count0
x-stainless-runtimeCPython
x-stainless-runtime-version3.14.7
{
  "messages": [
    {
      "content": "You answer briefly and plainly. Use the tools you are given.",
      "role": "system"
    },
    {
      "content": "What's the status of order A100?",
      "role": "user"
    },
    {
      "content": null,
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_ET_I7uMnSHizqC3G1XpGyRI1668",
          "function": {
            "name": "check_order",
            "arguments": "{\"order_id\": \"A100\"}"
          }
        }
      ]
    },
    {
      "content": "order A100: shipped",
      "role": "tool",
      "tool_call_id": "call_00_ET_I7uMnSHizqC3G1XpGyRI1668"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "check_order",
        "description": "Check the status of an order by id.",
        "parameters": {
          "properties": {
            "order_id": {
              "type": "string"
            }
          },
          "required": [
            "order_id"
          ],
          "type": "object"
        }
      }
    }
  ]
}
wire response
status
200
headers (15)
show
access-control-allow-credentialstrue
connectionkeep-alive
content-encodinggzip
content-typeapplication/json
dateSun, 13 Sep 2026 21:57:54 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 1a5bcf25cf6144683736a6579a7fb98e.cloudfront.net (CloudFront)
x-amz-cf-idEqOcSm_Dk9Ic73kS1XtrNPASP_y9DSHlg2BIPiv30SayHvkBTR6f5g==
x-amz-cf-popDEN53-P2
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-idc495bfb5bc5eeeaf104ddfd09cd2f2d3
{
  "id": "1722ba15-a05d-40aa-9bd7-2b5d41b1baa5",
  "object": "chat.completion",
  "created": 1789336674,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Order A100 has shipped.",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 371,
    "completion_tokens": 7,
    "total_tokens": 378,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 243
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiOrder A100 has shipped.
comparison {"hand_built_final_answer": "Order A100 is shipped.", "graph_final_answer": "Order A100 has shipped.", "hand_built_message_count": 5, "graph_message_count": 5, "same_final_answer": false}
scenario the_declared_state_schema_is_or_is_not_enforced_at_runtime
scenario the_declared_state_schema_is_or_is_not_enforced_at_runtime · 1.2ms
well_behaved_node {"raised": false, "error": null, "last_message_type": "AIMessage", "last_message_content": "fine.", "extra_key_survived": false}
misbehaved_node {"raised": false, "error": null, "last_message_type": "HumanMessage", "last_message_content": "not a list of messages", "extra_key_survived": false}
scenario the_declared_state_schema_is_or_is_not_enforced_at_runtime · 4.2ms
well_behaved_node {"raised": false, "error": null, "last_message_type": "AIMessage", "last_message_content": "fine.", "extra_key_survived": false}
misbehaved_node {"raised": false, "error": null, "last_message_type": "HumanMessage", "last_message_content": "not a list of messages", "extra_key_survived": false}