ch08_tool_program

show:
mock turns=10 · messages=25
live turns=6 · messages=17
scenario program_answers
scenario program_answers · tools=price_of · 3.2ms · 2 turns · ended: no_tool_calls
turn 1 · 2.8ms · asked for: price_of
model mock · 2.8ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of one of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of one of an item, in pounds.", "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.0ms · given: item=milk · returned: 1.20
args {"item": "milk"}
command {"line": "printf 1.20 --item milk"}
exit {"code": 0, "out": "1.20", "err": ""}
result {"value": "1.20"}
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. Use the tools you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of one of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of one of an item, in pounds.", "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 is 1.20.
ended {"reason": "no_tool_calls"}
scenario program_answers · tools=price_of · 2289.3ms · 2 turns · ended: no_tool_calls
turn 1 · 1381.3ms · 330 in / 39 out · asked for: price_of
model live · 1370.6ms (model provider 1138.6 · library 232.0) · 330 in / 39 out · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of one of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of one of an item, in pounds.", "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-length454
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": "How much is milk?",
      "role": "user"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of one of an item, in pounds.",
        "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:51:54 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 49a6d4f867bdc98619cc6ae406609b78.cloudfront.net (CloudFront)
x-amz-cf-id08wFqysLJdNO53d-EeUMrurlAI5BbQ6oMJQ8_GeH6rlw9Xmi2sE1yw==
x-amz-cf-popDEN53-P6
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-ida81f627fe77b5ecdb305df908ac16dea
{
  "id": "31c865d1-7eeb-4ed8-92d0-49c2fdb6bdc0",
  "object": "chat.completion",
  "created": 1789336314,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "",
        "reasoning_content": "",
        "tool_calls": [
          {
            "index": 0,
            "id": "call_00_ET_2P9xgAVnpOfQUlyIqtg47071",
            "type": "function",
            "function": {
              "name": "price_of",
              "arguments": "{\"item\": \"milk\"}"
            }
          }
        ]
      },
      "logprobs": null,
      "finish_reason": "tool_calls"
    }
  ],
  "usage": {
    "prompt_tokens": 330,
    "completion_tokens": 39,
    "total_tokens": 369,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 202
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 10.5ms · given: item=milk · returned: 1.20
args {"item": "milk"}
command {"line": "printf 1.20 --item milk"}
exit {"code": 0, "out": "1.20", "err": ""}
result {"value": "1.20"}
turn 2 · 907.8ms · 384 in / 9 out · responded with: Milk is £1.20.
model live · 907.7ms (model provider 898.5 · library 9.2) · 384 in / 9 out · responded with: Milk is £1.20.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]humanHow much is milk?
[2]ai
price_of({"item": "milk"})
[3]tool1.20
declared tools (1)
tooldescriptionschema
price_ofThe current shelf price of one of an item, in pounds.{"$defs": {"GroceryItem": {"enum": ["bread", "butter", "chips", "milk"], "type": "string"}}, "description": "The current shelf price of one of an item, in pounds.", "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-length720
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": "How much is milk?",
      "role": "user"
    },
    {
      "content": null,
      "role": "assistant",
      "tool_calls": [
        {
          "type": "function",
          "id": "call_00_ET_2P9xgAVnpOfQUlyIqtg47071",
          "function": {
            "name": "price_of",
            "arguments": "{\"item\": \"milk\"}"
          }
        }
      ]
    },
    {
      "content": "1.20",
      "role": "tool",
      "tool_call_id": "call_00_ET_2P9xgAVnpOfQUlyIqtg47071"
    }
  ],
  "model": "deepseek-flash",
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "price_of",
        "description": "The current shelf price of one of an item, in pounds.",
        "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:51:56 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 3dc4c80cd959e984309833cac8f5a630.cloudfront.net (CloudFront)
x-amz-cf-idQMvYUyIW099nPDPMQUmPOyow7bUPYkVatac3q14DD6wpBEN2QA61rA==
x-amz-cf-popDEN52-P2
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id593ea05111b4dede897bf4f38b278cd6
{
  "id": "c27faa9e-8560-44e4-8f35-977813532ab2",
  "object": "chat.completion",
  "created": 1789336315,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Milk is \u00a31.20.",
        "reasoning_content": ""
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 384,
    "completion_tokens": 9,
    "total_tokens": 393,
    "prompt_tokens_details": {
      "cached_tokens": 128
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    },
    "prompt_cache_hit_tokens": 128,
    "prompt_cache_miss_tokens": 256
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiMilk is £1.20.
ended {"reason": "no_tool_calls"}
scenario program_fails
scenario program_fails · 0.3ms · 2 turns · ended: no_tool_calls
turn 1 · 0.2ms · asked for: price_of
model mock · 0.1ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.0ms · given: item=milk · raised: PriceProgramError (['ls'] exited ['1']: ls: /no-such-price-list/milk: No such f)
args {"item": "milk"}
command {"line": "ls /no-such-price-list/milk"}
exit {"code": 1, "out": "", "err": "ls: /no-such-price-list/milk: No such file or directory"}
failed {"exception": "PriceProgramError", "message": "['ls'] exited ['1']: ls: /no-such-price-list/milk: No such file or directory"}
turn 2 · 0.1ms · responded with: I could not get the price of milk.
model mock · 0.1ms · responded with: I could not get the price of milk.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
[2]ai
price_of({"item": "milk"})
[3]tool['price_of'] failed: ['ls'] exited ['1']: ls: /no-such-price-list/milk: No such file or directory. Answer without it.
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiI could not get the price of milk.
ended {"reason": "no_tool_calls"}
scenario program_fails · 657.8ms · 1 turn · ended: no_tool_calls
turn 1 · 657.8ms · 43 in / 33 out · responded with: I'm ready — what would you like me to help with?
model live · 657.8ms (model provider 650.8 · library 7.0) · 43 in / 33 out · responded with: I'm ready — what would you like me to help with?
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
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-length174
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": "",
      "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:51:56 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 3fc2177a4dd115307e9fe96ea7fefd84.cloudfront.net (CloudFront)
x-amz-cf-idKMNkcNf1xjeWm2foKON6cXkm-CWqidrdkVi7TzYrmtWGpE0GCe0QlA==
x-amz-cf-popDEN53-P3
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id1c918d0ddee8da9f3c7f999bc6991ffb
{
  "id": "6637859f-ef58-44d3-9e02-b17dd4c4aa52",
  "object": "chat.completion",
  "created": 1789336316,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "I'm ready \u2014 what would you like me to help with?",
        "reasoning_content": "The user has given no actual question or task. I should respond briefly asking what they need."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 43,
    "completion_tokens": 33,
    "total_tokens": 76,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 19
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 43
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiI'm ready — what would you like me to help with?
ended {"reason": "no_tool_calls"}
scenario program_is_missing
scenario program_is_missing · 0.3ms · 2 turns · ended: no_tool_calls
turn 1 · 0.1ms · asked for: price_of
model mock · 0.1ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.0ms · given: item=milk · raised: PriceProgramError (['price-of'] exited ['127']: price-of: command not found)
args {"item": "milk"}
command {"line": "price-of --item milk"}
exit {"code": 127, "out": "", "err": "price-of: command not found"}
failed {"exception": "PriceProgramError", "message": "['price-of'] exited ['127']: price-of: command not found"}
turn 2 · 0.1ms · responded with: I could not get the price of milk.
model mock · 0.1ms · responded with: I could not get the price of milk.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
[2]ai
price_of({"item": "milk"})
[3]tool['price_of'] failed: ['price-of'] exited ['127']: price-of: command not found. Answer without it.
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiI could not get the price of milk.
ended {"reason": "no_tool_calls"}
scenario program_is_missing · 1080.7ms · 1 turn · ended: no_tool_calls
turn 1 · 1080.6ms · 43 in / 15 out · responded with: Ready. What would you like me to do?
model live · 1080.6ms (model provider 1068.7 · library 11.9) · 43 in / 15 out · responded with: Ready. What would you like me to do?
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
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-length174
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": "",
      "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:51:57 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 153d2cbd7c83442a049eab26571069f6.cloudfront.net (CloudFront)
x-amz-cf-idlrC3yQGZCD51zf_GhdWr74TVqsWkE1QHvziggIxmF5QdJ9SVuYaMpQ==
x-amz-cf-popDEN53-P6
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id2cbc7b1c6e2d1b57fbaefa046c716eb0
{
  "id": "af63547a-e3cc-45e5-bf4d-ba7091529590",
  "object": "chat.completion",
  "created": 1789336317,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Ready. What would you like me to do?",
        "reasoning_content": "The user hasn"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 43,
    "completion_tokens": 15,
    "total_tokens": 58,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 3
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 43
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiReady. What would you like me to do?
ended {"reason": "no_tool_calls"}
scenario program_hangs
scenario program_hangs · 0.3ms · 2 turns · ended: no_tool_calls
turn 1 · 0.1ms · asked for: price_of
model mock · 0.1ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk"})
tool price_of · 0.0ms · given: item=milk · raised: PriceProgramError (['sleep'] exited ['None']: killed after 2s)
args {"item": "milk"}
command {"line": "sleep 30 # milk"}
exit {"code": null, "out": "", "err": "killed after 2s"}
failed {"exception": "PriceProgramError", "message": "['sleep'] exited ['None']: killed after 2s"}
turn 2 · 0.1ms · responded with: I could not get the price of milk.
model mock · 0.1ms · responded with: I could not get the price of milk.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
[2]ai
price_of({"item": "milk"})
[3]tool['price_of'] failed: ['sleep'] exited ['None']: killed after 2s. Answer without it.
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiI could not get the price of milk.
ended {"reason": "no_tool_calls"}
scenario program_hangs · 1253.9ms · 1 turn · ended: no_tool_calls
turn 1 · 1253.8ms · 43 in / 96 out · responded with: What would you like help with?
model live · 1253.8ms (model provider 1243.3 · library 10.5) · 43 in / 96 out · responded with: What would you like help with?
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
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-length174
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": "",
      "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:51:58 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 975ade3143a5f26adabbac0540e470ce.cloudfront.net (CloudFront)
x-amz-cf-idD2N3RxPLFVBy1UrBf3rlc_-J8aUMrS3CSYWcEkyOwqGjsehgeiGXVw==
x-amz-cf-popDEN53-P6
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id8650cf01dce4fcee9a0abff56718d861
{
  "id": "3aa8aa9f-e069-4e2d-ab8c-bc9c6f486923",
  "object": "chat.completion",
  "created": 1789336318,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "What would you like help with?",
        "reasoning_content": "We need answer user? There is no question. Maybe this is a setup. Need ask what they need. But instruction says answer briefly and plainly. Use tools given. No tools used. We need respond perhaps ask for task. Since no prompt, should say \"What would you like help with?\" But maybe there is hidden? We only see user blank? The conversation: system then user empty. We should ask clarification. Final concise."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 43,
    "completion_tokens": 96,
    "total_tokens": 139,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 88
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 43
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiWhat would you like help with?
ended {"reason": "no_tool_calls"}
scenario argument_is_a_command
scenario argument_is_a_command · 0.3ms · 2 turns · ended: no_tool_calls
turn 1 · 0.1ms · asked for: price_of
model mock · 0.1ms · asked for: price_of
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
context ignored by the mock model {"messages": 2, "roles": ["system", "human"]}
reply
rolecontent
[0]ai
price_of({"item": "milk; echo pwned"})
tool price_of · 0.0ms · given: item=milk; echo pwned · returned: 1.20 pwned
args {"item": "milk; echo pwned"}
command {"line": "printf 1.20 --item milk; echo pwned"}
exit {"code": 0, "out": "1.20\npwned", "err": ""}
result {"value": "1.20\npwned"}
turn 2 · 0.1ms · responded with: Milk is 1.20 pwned.
model mock · 0.1ms · responded with: Milk is 1.20 pwned.
context sent — 4 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
[2]ai
price_of({"item": "milk; echo pwned"})
[3]tool1.20 pwned
context ignored by the mock model {"messages": 4, "roles": ["system", "human", "ai", "tool"]}
reply
rolecontent
[0]aiMilk is 1.20 pwned.
ended {"reason": "no_tool_calls"}
scenario argument_is_a_command · 1198.7ms · 1 turn · ended: no_tool_calls
turn 1 · 1198.7ms · 43 in / 69 out · responded with: What would you like help with?
model live · 1198.6ms (model provider 1190.3 · library 8.3) · 43 in / 69 out · responded with: What would you like help with?
context sent — 2 message(s)
rolecontent
[0]systemYou answer briefly and plainly. Use the tools you are given.
[1]human
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-length174
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": "",
      "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:51:59 GMT
serverelb
strict-transport-securitymax-age=31536000; includeSubDomains; preload
transfer-encodingchunked
varyorigin, access-control-request-method, access-control-request-headers
via1.1 f0a2a95cb4d25b2414a9c1a7a754943e.cloudfront.net (CloudFront)
x-amz-cf-id_afHgA8riexgXZQYUBwYtphyzoqkcP39al--11gDKTMHfgDvkMCLyg==
x-amz-cf-popDEN52-P2
x-cacheMiss from cloudfront
x-content-type-optionsnosniff
x-ds-trace-id464202d632c6f63cf9e6c763e3c6b009
{
  "id": "466715f3-9281-4046-ab08-6e266e408cf6",
  "object": "chat.completion",
  "created": 1789336319,
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "What would you like help with?",
        "reasoning_content": "We need answer to user? There is no user query. We need maybe wait? The prompt is empty except system. Need respond? We should ask what they need. But instruction says answer briefly and plainly. We can say \"What would you like help with?\" But maybe no question. Need final."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 43,
    "completion_tokens": 69,
    "total_tokens": 112,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 61
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 43
  },
  "system_fingerprint": "aeb56401ca74e127821c4f9126dcb669"
}
reply
rolecontent
[0]aiWhat would you like help with?
ended {"reason": "no_tool_calls"}