ch12_supervisor

show:
mock turns=4 · messages=11
live turns=4 · messages=11
scenario the_supervisor_delegates
scenario the_supervisor_delegates · tools=consult_inventory_expert, consult_orders_expert · 4.3ms · 2 turns · ended: no_tool_calls
turn 1 · 3.9ms · asked for: consult_inventory_expert
model mock · 2.9ms · asked for: consult_inventory_expert
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk?
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "type": "object"}
tools declared to the mock model {"names": ["consult_inventory_expert", "consult_orders_expert"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
consult_inventory_expert({"question": "How much is milk?"})
tool consult_inventory_expert · 1.0ms · given: question=How much is milk? · returned: Milk costs 1.20 per bottle.
args {"question": "How much is milk?"}
turn 1 · 0.8ms · asked for: price_of
model mock · 0.6ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
tools declared to the mock model {"names": ["price_of"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.2ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
turn 2 · 0.2ms · responded with: Milk costs 1.20 per bottle.
model mock · 0.2ms · responded with: Milk costs 1.20 per bottle.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20 for milk
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
tools declared to the mock model {"names": ["price_of"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiMilk costs 1.20 per bottle.
result {"value": "Milk costs 1.20 per bottle."}
turn 2 · 0.2ms · responded with: Milk is 1.20.
model mock · 0.2ms · responded with: Milk is 1.20.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk?
[2]ai
consult_inventory_expert({"question": "How much is milk?"})
[3]toolMilk costs 1.20 per bottle.
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "type": "object"}
tools declared to the mock model {"names": ["consult_inventory_expert", "consult_orders_expert"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiMilk is 1.20.
ended {"reason": "no_tool_calls"}
scenario the_supervisor_delegates · tools=consult_inventory_expert, consult_orders_expert · 4357.7ms · 2 turns · ended: no_tool_calls
turn 1 · 3589.0ms · 427 in / 51 out · asked for: consult_inventory_expert · responded with: I'll check the price for you.
model live · 1723.3ms (model provider 1539.9 · library 183.4) · 427 in / 51 out · asked for: consult_inventory_expert · responded with: I'll check the price for you.
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk?
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "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-length886
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. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "consult_inventory_expert",
        "description": "Ask the inventory expert about price or stock. It has its own tools.",
        "parameters": {
          "properties": {
            "question": {
              "type": "string"
            }
          },
          "required": [
            "question"
          ],
          "type": "object"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "consult_orders_expert",
        "description": "Ask the orders expert to place an order. It has its own tools.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            },
            "quantity": {
              "type": "integer"
            }
          },
          "required": [
            "item",
            "quantity"
          ],
          "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:52:29 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 43e1c8a07e2baf5ea799a95c6fa505ca.cloudfront.net (CloudFront)
x-amz-cf-id-idAaK5emYVoVOP9GIaqJjekb_WnVdfB7YrL3krFLh_HKuTeT0ofOg==
x-amz-cf-popDEN53-P6
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-idf9917a3fd30acea18e6d4bd0b112625d
{
  "id": "2c40e288-8c86-4089-9b4f-f5f177b513f4",
  "object": "chat.completion",
  "created": 1789336349,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "I'll check the price for you.",
        "reasoning_content": "",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_ET_W83lgHAzvRgbEnlZU6X53574",
            "type": "function",
            "function": {
              "name": "consult_inventory_expert",
              "arguments": "{\"question\": \"How much is milk?\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 427,
    "completion_tokens": 51,
    "total_tokens": 478,
    "prompt_tokens_details": {
      "cached_tokens": 256
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 256,
    "prompt_cache_miss_tokens": 171
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiI'll check the price for you.
consult_inventory_expert({"question": "How much is milk?"})
tool consult_inventory_expert · 1865.6ms · given: question=How much is milk? · returned: Milk is £1.20.
args {"question": "How much is milk?"}
turn 1 · 1142.9ms · 334 in / 46 out · asked for: price_of
model live · 1142.0ms (model provider 1127.3 · library 14.7) · 334 in / 46 out · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "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-length470
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 tool you are given.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of an item, in pounds. The expert's only tool.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "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:52:31 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 1c0461590af0024d15f4dd8c3c213584.cloudfront.net (CloudFront)
x-amz-cf-idVcRAcLGpzs4BmLW-u2GG_lLFrnYKrddUUpW4fcKf5XzDK6-bnAfAjA==
x-amz-cf-popDEN53-P6
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id602a0e47c05214471d36fe6c2ca0c170
{
  "id": "2dc5dfcb-3f90-49aa-a566-d5c66a432a1d",
  "object": "chat.completion",
  "created": 1789336351,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "Simple: call price_of milk.",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_W7zxegdeKYl7b3rWLpfv7996",
            "type": "function",
            "function": {
              "name": "price_of",
              "arguments": "{\"item\": \"milk\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 334,
    "completion_tokens": 46,
    "total_tokens": 380,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 7
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 206
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.8ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
turn 2 · 722.6ms · 397 in / 16 out · responded with: Milk is £1.20.
model live · 722.6ms (model provider 709.3 · library 13.3) · 397 in / 16 out · responded with: Milk is £1.20.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20 for milk
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "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-length789
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 tool you are given.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    },
    {
      "content": null,
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_W7zxegdeKYl7b3rWLpfv7996",
          "function": {
            "name": "price_of",
            "arguments": "{\"item\": \"milk\"}"
          }
        }
      ],
      "reasoning_content": "Simple: call price_of milk."
    },
    {
      "content": "1.20 for milk",
      "role": "tool",
      "tool_call_id": "call_00_W7zxegdeKYl7b3rWLpfv7996"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of an item, in pounds. The expert's only tool.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "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:52:32 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 5e3599eb36954e234cc62876d626039e.cloudfront.net (CloudFront)
x-amz-cf-idYnYpAjEoahg0wXY3AQVSJIJ9e4qsyZZ3IVh_-ceRmNe66PLDBNB-NA==
x-amz-cf-popDEN53-P4
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id4f8ebff703aa29949506caa2cc6b4681
{
  "id": "880a8a31-a7a3-4d93-8363-244b62e555da",
  "object": "chat.completion",
  "created": 1789336352,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Milk is \u00a31.20.",
        "reasoning_content": "Answer: \u00a31.20."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 397,
    "completion_tokens": 16,
    "total_tokens": 413,
    "prompt_tokens_details": {
      "cached_tokens": 256
    },
    "completion_tokens_details": {
      "reasoning_tokens": 7
    },
    "prompt_cache_hit_tokens": 256,
    "prompt_cache_miss_tokens": 141
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiMilk is £1.20.
result {"value": "Milk is \u00a31.20."}
turn 2 · 768.5ms · 497 in / 12 out · responded with: Milk is £1.20.
model live · 768.5ms (model provider 755.1 · library 13.4) · 497 in / 12 out · responded with: Milk is £1.20.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk?
[2]aiI'll check the price for you.
consult_inventory_expert({"question": "How much is milk?"})
[3]toolMilk is £1.20.
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "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-length1223
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. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    },
    {
      "content": "I'll check the price for you.",
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_ET_W83lgHAzvRgbEnlZU6X53574",
          "function": {
            "name": "consult_inventory_expert",
            "arguments": "{\"question\": \"How much is milk?\"}"
          }
        }
      ]
    },
    {
      "content": "Milk is \u00a31.20.",
      "role": "tool",
      "tool_call_id": "call_00_ET_W83lgHAzvRgbEnlZU6X53574"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "consult_inventory_expert",
        "description": "Ask the inventory expert about price or stock. It has its own tools.",
        "parameters": {
          "properties": {
            "question": {
              "type": "string"
            }
          },
          "required": [
            "question"
          ],
          "type": "object"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "consult_orders_expert",
        "description": "Ask the orders expert to place an order. It has its own tools.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            },
            "quantity": {
              "type": "integer"
            }
          },
          "required": [
            "item",
            "quantity"
          ],
          "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:52:33 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 77dfdef79344c95f75de8512042d4bac.cloudfront.net (CloudFront)
x-amz-cf-idA3Nk5o3vOpIVCMRZhyvpmdQlS73iuSMpzOKCYZAXdkjFtcSgl1mW1Q==
x-amz-cf-popDEN53-P1
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id79ee0724f67d26226c3464a53f821ba7
{
  "id": "f2c5c682-bd87-4b89-b3e5-b51896c51bba",
  "object": "chat.completion",
  "created": 1789336352,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Milk is \u00a31.20.",
        "reasoning_content": "Answer briefly."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 497,
    "completion_tokens": 12,
    "total_tokens": 509,
    "prompt_tokens_details": {
      "cached_tokens": 256
    },
    "completion_tokens_details": {
      "reasoning_tokens": 3
    },
    "prompt_cache_hit_tokens": 256,
    "prompt_cache_miss_tokens": 241
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiMilk is £1.20.
ended {"reason": "no_tool_calls"}
scenario the_supervisor_delegates_to_both
scenario the_supervisor_delegates_to_both · tools=consult_inventory_expert, consult_orders_expert · 1.9ms · 2 turns · ended: no_tool_calls
turn 1 · 1.7ms · asked for: consult_inventory_expert, consult_orders_expert
model mock · 0.2ms · asked for: consult_inventory_expert, consult_orders_expert
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk, and please order 5 bottles.
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "type": "object"}
tools declared to the mock model {"names": ["consult_inventory_expert", "consult_orders_expert"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
consult_inventory_expert({"question": "How much is milk?"})
consult_orders_expert({"item": "milk", "quantity": 5})
tool consult_inventory_expert · 0.5ms · given: question=How much is milk? · returned: Milk costs 1.20 per bottle.
args {"question": "How much is milk?"}
turn 1 · 0.3ms · asked for: price_of
model mock · 0.2ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
tools declared to the mock model {"names": ["price_of"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.1ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
turn 2 · 0.2ms · responded with: Milk costs 1.20 per bottle.
model mock · 0.2ms · responded with: Milk costs 1.20 per bottle.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20 for milk
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "type": "object"}
tools declared to the mock model {"names": ["price_of"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiMilk costs 1.20 per bottle.
result {"value": "Milk costs 1.20 per bottle."}
tool consult_orders_expert · 1.0ms · given: item=milk, quantity=5 · returned: Ordered 5 bottles of milk.
args {"item": "milk", "quantity": 5}
turn 1 · 0.8ms · asked for: place_order
model mock · 0.6ms · asked for: place_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanOrder 5 of milk.
declared tools (1)
tooldescriptionschema
place_orderOrder a quantity of an item, in the shop. The orders expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Order a quantity of an item, in the shop. The orders expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "place_order", "type": "object"}
tools declared to the mock model {"names": ["place_order"], "consulted": false}
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
place_order({"item": "milk", "quantity": 5})
tool place_order · 0.1ms · given: item=milk, quantity=5 · returned: ordered 5 x milk
args {"item": "milk", "quantity": 5}
result {"value": "ordered 5 x milk"}
turn 2 · 0.2ms · responded with: Ordered 5 bottles of milk.
model mock · 0.1ms · responded with: Ordered 5 bottles of milk.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanOrder 5 of milk.
[2]ai
place_order({"item": "milk", "quantity": 5})
[3]toolordered 5 x milk
declared tools (1)
tooldescriptionschema
place_orderOrder a quantity of an item, in the shop. The orders expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Order a quantity of an item, in the shop. The orders expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "place_order", "type": "object"}
tools declared to the mock model {"names": ["place_order"], "consulted": false}
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiOrdered 5 bottles of milk.
result {"value": "Ordered 5 bottles of milk."}
turn 2 · 0.2ms · responded with: Milk is 1.20 each; ordered 5 bottles.
model mock · 0.2ms · responded with: Milk is 1.20 each; ordered 5 bottles.
context sent — 5 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk, and please order 5 bottles.
[2]ai
consult_inventory_expert({"question": "How much is milk?"})
consult_orders_expert({"item": "milk", "quantity": 5})
[3]toolMilk costs 1.20 per bottle.
[4]toolOrdered 5 bottles of milk.
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "type": "object"}
tools declared to the mock model {"names": ["consult_inventory_expert", "consult_orders_expert"], "consulted": false}
context ignored by the mock model {"messages": 5, "roles": ["system", "human", "ai", "tool", "tool"]}
reply
rolecontent
[0]aiMilk is 1.20 each; ordered 5 bottles.
ended {"reason": "no_tool_calls"}
scenario the_supervisor_delegates_to_both · tools=consult_inventory_expert, consult_orders_expert · 6643.2ms · 2 turns · ended: no_tool_calls
turn 1 · 5574.8ms · 434 in / 136 out · asked for: consult_inventory_expert, consult_orders_expert · responded with: I'll check the price and get that order started.
model live · 1260.2ms (model provider 1247.0 · library 13.2) · 434 in / 136 out · asked for: consult_inventory_expert, consult_orders_expert · responded with: I'll check the price and get that order started.
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk, and please order 5 bottles.
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "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-length914
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. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.",
      "role": "system"
    },
    {
      "content": "How much is milk, and please order 5 bottles.",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "consult_inventory_expert",
        "description": "Ask the inventory expert about price or stock. It has its own tools.",
        "parameters": {
          "properties": {
            "question": {
              "type": "string"
            }
          },
          "required": [
            "question"
          ],
          "type": "object"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "consult_orders_expert",
        "description": "Ask the orders expert to place an order. It has its own tools.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            },
            "quantity": {
              "type": "integer"
            }
          },
          "required": [
            "item",
            "quantity"
          ],
          "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:52:33 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 9367844cfa8aaebd6a8f032ea2e7d4ec.cloudfront.net (CloudFront)
x-amz-cf-idpct4CrSGGTY4XXCz8g2VFJAtndPKh9twZ5TP9TXTGML1hZ15ztb36A==
x-amz-cf-popDEN52-P3
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id7adf5d47fc17328f75841c080bc16e45
{
  "id": "7432ca9f-f780-43a2-9073-55b3fc521ff5",
  "object": "chat.completion",
  "created": 1789336353,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "I'll check the price and get that order started.",
        "reasoning_content": "I need to check price of milk and order 5. These are independent calls.\n\nNote: quantity 5 bottles \u2014 item is milk.\n\nLet me make both calls.",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_gKkboyJwgMqnrEIRCJ899365",
            "type": "function",
            "function": {
              "name": "consult_inventory_expert",
              "arguments": "{\"question\": \"How much is milk?\"}"
            }
          },
          {
            "index": 1,
            "id": "call_01_q1MChILm2hCEPAkgia9K7044",
            "type": "function",
            "function": {
              "name": "consult_orders_expert",
              "arguments": "{\"item\": \"milk\", \"quantity\": 5}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 434,
    "completion_tokens": 136,
    "total_tokens": 570,
    "prompt_tokens_details": {
      "cached_tokens": 256
    },
    "completion_tokens_details": {
      "reasoning_tokens": 34
    },
    "prompt_cache_hit_tokens": 256,
    "prompt_cache_miss_tokens": 178
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiI'll check the price and get that order started.
consult_inventory_expert({"question": "How much is milk?"})
consult_orders_expert({"item": "milk", "quantity": 5})
tool consult_inventory_expert · 2020.9ms · given: question=How much is milk? · returned: Milk is £1.20.
args {"question": "How much is milk?"}
turn 1 · 1009.0ms · 334 in / 39 out · asked for: price_of
model live · 1007.9ms (model provider 995.8 · library 12.0) · 334 in / 39 out · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "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-length470
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 tool you are given.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of an item, in pounds. The expert's only tool.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "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:52:35 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 ab0145b9843311a8d571dbd6cb58e86a.cloudfront.net (CloudFront)
x-amz-cf-id-HFpRI6Bci2sfc0gbONlxWEctDkVTAQOA9GePMbnlP1AaVhzKKI86Q==
x-amz-cf-popDEN53-P1
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id07096c0b63bc7c94fd8cb9c025d03cdc
{
  "id": "ea459ef1-55d7-4658-9258-db6097b3f63e",
  "object": "chat.completion",
  "created": 1789336354,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_ET_iBusAnbpEwnKG7pcZXqx4591",
            "type": "function",
            "function": {
              "name": "price_of",
              "arguments": "{\"item\": \"milk\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 334,
    "completion_tokens": 39,
    "total_tokens": 373,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 206
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 1.1ms · given: item=milk · returned: 1.20 for milk
args {"item": "milk"}
result {"value": "1.20 for milk"}
turn 2 · 1011.8ms · 390 in / 9 out · responded with: Milk is £1.20.
model live · 1011.8ms (model provider 998.3 · library 13.5) · 390 in / 9 out · responded with: Milk is £1.20.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20 for milk
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of an item, in pounds. The expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of an item, in pounds. The expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}}, "required": ["item"], "title": "price_of", "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-length745
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 tool you are given.",
      "role": "system"
    },
    {
      "content": "How much is milk?",
      "role": "user"
    },
    {
      "content": null,
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_ET_iBusAnbpEwnKG7pcZXqx4591",
          "function": {
            "name": "price_of",
            "arguments": "{\"item\": \"milk\"}"
          }
        }
      ]
    },
    {
      "content": "1.20 for milk",
      "role": "tool",
      "tool_call_id": "call_00_ET_iBusAnbpEwnKG7pcZXqx4591"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of an item, in pounds. The expert's only tool.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "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:52:36 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 c8eaab496487afbdb9029903afd8f5b2.cloudfront.net (CloudFront)
x-amz-cf-idW1sTtN4YJnvHF86KIlTfvnB4cyT1d8LHCuVEbicweruqM86jhybiMA==
x-amz-cf-popDEN53-P4
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id32a2ec5edda0c178ae0bde974e6d7cfb
{
  "id": "0d541dc9-084b-423d-a030-01810a1c0c3f",
  "object": "chat.completion",
  "created": 1789336356,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Milk is \u00a31.20.",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 390,
    "completion_tokens": 9,
    "total_tokens": 399,
    "prompt_tokens_details": {
      "cached_tokens": 256
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 256,
    "prompt_cache_miss_tokens": 134
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiMilk is £1.20.
result {"value": "Milk is \u00a31.20."}
tool consult_orders_expert · 2293.6ms · given: item=milk, quantity=5 · returned: Ordered 5 milk.
args {"item": "milk", "quantity": 5}
turn 1 · 1238.6ms · 348 in / 67 out · asked for: place_order
model live · 1237.8ms (model provider 1219.8 · library 18.0) · 348 in / 67 out · asked for: place_order
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanOrder 5 of milk.
declared tools (1)
tooldescriptionschema
place_orderOrder a quantity of an item, in the shop. The orders expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Order a quantity of an item, in the shop. The orders expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "place_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-length515
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 tool you are given.",
      "role": "system"
    },
    {
      "content": "Order 5 of milk.",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "place_order",
        "description": "Order a quantity of an item, in the shop. The orders expert's only tool.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            },
            "quantity": {
              "type": "integer"
            }
          },
          "required": [
            "item",
            "quantity"
          ],
          "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:52:37 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 59b91fa5bb1f56f1a653604439afb430.cloudfront.net (CloudFront)
x-amz-cf-iduXiKdBEjuE5yHFbqZooLpZF_v0j9h5SAvtFjSd5ns_13wZslwciDlw==
x-amz-cf-popDEN53-P6
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id931b5dd26fbb18137bdf7dbd98514065
{
  "id": "b0d87e9b-c039-4114-bdbb-a400709f0b14",
  "object": "chat.completion",
  "created": 1789336357,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "The user wants to order 5 of milk. Simple.",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_UGrAet8nngE17XqYr8oc8589",
            "type": "function",
            "function": {
              "name": "place_order",
              "arguments": "{\"item\": \"milk\", \"quantity\": 5}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 348,
    "completion_tokens": 67,
    "total_tokens": 415,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 12
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 220
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
place_order({"item": "milk", "quantity": 5})
tool place_order · 0.7ms · given: item=milk, quantity=5 · returned: ordered 5 x milk
args {"item": "milk", "quantity": 5}
result {"value": "ordered 5 x milk"}
turn 2 · 1055.0ms · 432 in / 7 out · responded with: Ordered 5 milk.
model live · 1055.0ms (model provider 1045.5 · library 9.4) · 432 in / 7 out · responded with: Ordered 5 milk.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tool you are given.
[1]humanOrder 5 of milk.
[2]ai
place_order({"item": "milk", "quantity": 5})
[3]toolordered 5 x milk
declared tools (1)
tooldescriptionschema
place_orderOrder a quantity of an item, in the shop. The orders expert's only tool.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Order a quantity of an item, in the shop. The orders expert's only tool.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "place_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-length872
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 tool you are given.",
      "role": "system"
    },
    {
      "content": "Order 5 of milk.",
      "role": "user"
    },
    {
      "content": null,
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_UGrAet8nngE17XqYr8oc8589",
          "function": {
            "name": "place_order",
            "arguments": "{\"item\": \"milk\", \"quantity\": 5}"
          }
        }
      ],
      "reasoning_content": "The user wants to order 5 of milk. Simple."
    },
    {
      "content": "ordered 5 x milk",
      "role": "tool",
      "tool_call_id": "call_00_UGrAet8nngE17XqYr8oc8589"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "place_order",
        "description": "Order a quantity of an item, in the shop. The orders expert's only tool.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            },
            "quantity": {
              "type": "integer"
            }
          },
          "required": [
            "item",
            "quantity"
          ],
          "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:52:38 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 d367a81605c570be8f51546cf4468ece.cloudfront.net (CloudFront)
x-amz-cf-id-oq1dXVgR3kkKxlKBMaj8c38YLjXQCkwvl-NzVM73lYUql-8_EZgAg==
x-amz-cf-popDEN53-P4
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id371e582950698b79603f4acd7bac3b4c
{
  "id": "bdad7f1e-ea73-4cfe-9831-f734840dbaf1",
  "object": "chat.completion",
  "created": 1789336358,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Ordered 5 milk.",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 432,
    "completion_tokens": 7,
    "total_tokens": 439,
    "prompt_tokens_details": {
      "cached_tokens": 256
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 256,
    "prompt_cache_miss_tokens": 176
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiOrdered 5 milk.
result {"value": "Ordered 5 milk."}
turn 2 · 1068.3ms · 602 in / 18 out · responded with: Milk is £1.20 each, and I've ordered 5 bottles.
model live · 1068.3ms (model provider 1057.3 · library 11.0) · 602 in / 18 out · responded with: Milk is £1.20 each, and I've ordered 5 bottles.
context sent — 5 message(s)
rolecontent
[0]systemYou answer briefly and plainly. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.
[1]humanHow much is milk, and please order 5 bottles.
[2]aiI'll check the price and get that order started.
consult_inventory_expert({"question": "How much is milk?"})
consult_orders_expert({"item": "milk", "quantity": 5})
[3]toolMilk is £1.20.
[4]toolOrdered 5 milk.
declared tools (2)
tooldescriptionschema
consult_inventory_expertAsk the inventory expert about price or stock. It has its own tools.{"description": "Ask the inventory expert about price or stock. It has its own tools.", "properties": {"question": {"title": "Question", "type": "string"}}, "required": ["question"], "title": "consult_inventory_expert", "type": "object"}
consult_orders_expertAsk the orders expert to place an order. It has its own tools.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "Ask the orders expert to place an order. It has its own tools.", "properties": {"item": {"$ref": "#/$defs/GroceryItem"}, "quantity": {"title": "Quantity", "type": "integer"}}, "required": ["item", "quantity"], "title": "consult_orders_expert", "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-length1681
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. You have no pricing or ordering knowledge of your own -- consult the inventory expert for price or stock, and the orders expert to place an order.",
      "role": "system"
    },
    {
      "content": "How much is milk, and please order 5 bottles.",
      "role": "user"
    },
    {
      "content": "I'll check the price and get that order started.",
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_gKkboyJwgMqnrEIRCJ899365",
          "function": {
            "name": "consult_inventory_expert",
            "arguments": "{\"question\": \"How much is milk?\"}"
          }
        },
        {
          "type": "function",
          "id": "call_01_q1MChILm2hCEPAkgia9K7044",
          "function": {
            "name": "consult_orders_expert",
            "arguments": "{\"item\": \"milk\", \"quantity\": 5}"
          }
        }
      ],
      "reasoning_content": "I need to check price of milk and order 5. These are independent calls.\n\nNote: quantity 5 bottles \u2014 item is milk.\n\nLet me make both calls."
    },
    {
      "content": "Milk is \u00a31.20.",
      "role": "tool",
      "tool_call_id": "call_00_gKkboyJwgMqnrEIRCJ899365"
    },
    {
      "content": "Ordered 5 milk.",
      "role": "tool",
      "tool_call_id": "call_01_q1MChILm2hCEPAkgia9K7044"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "consult_inventory_expert",
        "description": "Ask the inventory expert about price or stock. It has its own tools.",
        "parameters": {
          "properties": {
            "question": {
              "type": "string"
            }
          },
          "required": [
            "question"
          ],
          "type": "object"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "consult_orders_expert",
        "description": "Ask the orders expert to place an order. It has its own tools.",
        "parameters": {
          "properties": {
            "item": {
              "enum": [
                "bread",
                "butter",
                "chips",
                "milk"
              ],
              "type": "string"
            },
            "quantity": {
              "type": "integer"
            }
          },
          "required": [
            "item",
            "quantity"
          ],
          "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:52:39 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 6375c26956bc0f0a63d43a140369a4b0.cloudfront.net (CloudFront)
x-amz-cf-idNIqh1L-TEBvfZQ8-IYsN6mLZ82b4b1dGAX1DrOs8ZYofATVWm2HHcQ==
x-amz-cf-popDEN53-P4
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-idb66fa9f1164aa91fcf8f160812e11168
{
  "id": "f291a9fe-457f-4dc9-8a6c-d450462042dc",
  "object": "chat.completion",
  "created": 1789336359,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Milk is \u00a31.20 each, and I've ordered 5 bottles.",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 602,
    "completion_tokens": 18,
    "total_tokens": 620,
    "prompt_tokens_details": {
      "cached_tokens": 384
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 384,
    "prompt_cache_miss_tokens": 218
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiMilk is £1.20 each, and I've ordered 5 bottles.
ended {"reason": "no_tool_calls"}