本站实际执行报告 · 不是目标产品原生界面截图tool-calling-loop
Ollama0.40.9/Python3.12
- 真实Ollama/api/chat两轮:模型发sum_items(17,25),程序校验白名单和整数边界后执行加法、回传tool42,真实最终回答The total number of items is 42,退出0。 网关分支未执行:独立真实探针确认当前测试Key的Gemini组429后停止新增请求,没有伪造网关tool_call。
- 模型为本次隔离Ollama原生导入的明确别名tutorial-qwen3-proof;权重和原始请求/响应留档。
- 网关分支未发起:当前测试Key的Gemini组独立探针429后停止新增请求。
明确限制
- 只证明对应SDK和本地模型的本题任务,不证明QuickRouter公网账户、Claude或所有模型均可用。
- 本次小样例通过不能推断复杂工具、多轮高风险任务也可靠。
- 仅本地工具回路有真实成功,未验证公网工具协议,不伪造tool_call或网关成功。
原始输出
run-execution.json
{
"exitCode": 0,
"stdout": "{\n \"trace\": [\n {\n \"request\": {\n \"model\": \"tutorial-qwen3-proof\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"Always call sum_items for inventory questions, then report the numeric result.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Our fictional box contains 17 blue and 25 red items. Call sum_items to find the total.\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"\",\n \"tool_calls\": [\n {\n \"id\": \"dMlwg8ZRIonjWb9jEf8PQIUCyPbqrczg\",\n \"function\": {\n \"index\": 0,\n \"name\": \"sum_items\",\n \"arguments\": {\n \"blue\": 17,\n \"red\": 25\n }\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"tool_name\": \"sum_items\",\n \"content\": \"42\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"The total number of items is 42.\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"sum_items\",\n \"description\": \"Sum counts of two item colors\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"blue\": {\n \"type\": \"integer\"\n },\n \"red\": {\n \"type\": \"integer\"\n }\n },\n \"required\": [\n \"blue\",\n \"red\"\n ]\n }\n }\n }\n ],\n \"stream\": false,\n \"think\": false,\n \"options\": {\n \"temperature\": 0,\n \"num_predict\": 256\n }\n },\n \"response\": {\n \"model\": \"tutorial-qwen3-proof\",\n \"created_at\": \"2026-10-23T15:01:20.491774Z\",\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"\",\n \"tool_calls\": [\n {\n \"id\": \"dMlwg8ZRIonjWb9jEf8PQIUCyPbqrczg\",\n \"function\": {\n \"index\": 0,\n \"name\": \"sum_items\",\n \"arguments\": {\n \"blue\": 17,\n \"red\": 25\n }\n }\n }\n ]\n },\n \"done\": true,\n \"done_reason\": \"stop\",\n \"total_duration\": 328366875,\n \"load_duration\": 441750,\n \"prompt_eval_count\": 199,\n \"prompt_eval_cached_count\": 3,\n \"prompt_eval_duration\": 83668000,\n \"eval_count\": 28,\n \"eval_duration\": 236245000\n }\n },\n {\n \"request\": {\n \"model\": \"tutorial-qwen3-proof\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"Always call sum_items for inventory questions, then report the numeric result.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Our fictional box contains 17 blue and 25 red items. Call sum_items to find the total.\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"\",\n \"tool_calls\": [\n {\n \"id\": \"dMlwg8ZRIonjWb9jEf8PQIUCyPbqrczg\",\n \"function\": {\n \"index\": 0,\n \"name\": \"sum_items\",\n \"arguments\": {\n \"blue\": 17,\n \"red\": 25\n }\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"tool_name\": \"sum_items\",\n \"content\": \"42\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"The total number of items is 42.\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"sum_items\",\n \"description\": \"Sum counts of two item colors\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"blue\": {\n \"type\": \"integer\"\n },\n \"red\": {\n \"type\": \"integer\"\n }\n },\n \"required\": [\n \"blue\",\n \"red\"\n ]\n }\n }\n }\n ],\n \"stream\": false,\n \"think\": false,\n \"options\": {\n \"temperature\": 0,\n \"num_predict\": 256\n }\n },\n \"response\": {\n \"model\": \"tutorial-qwen3-proof\",\n \"created_at\": \"2026-10-23T15:01:20.61514Z\",\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The total number of items is 42.\"\n },\n \"done\": true,\n \"done_reason\": \"stop\",\n \"total_duration\": 121917417,\n \"load_duration\": 601583,\n \"prompt_eval_count\": 242,\n \"prompt_eval_cached_count\": 195,\n \"prompt_eval_duration\": 30175000,\n \"eval_count\": 11,\n \"eval_duration\": 87424000\n }\n }\n ],\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"Always call sum_items for inventory questions, then report the numeric result.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Our fictional box contains 17 blue and 25 red items. Call sum_items to find the total.\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"\",\n \"tool_calls\": [\n {\n \"id\": \"dMlwg8ZRIonjWb9jEf8PQIUCyPbqrczg\",\n \"function\": {\n \"index\": 0,\n \"name\": \"sum_items\",\n \"arguments\": {\n \"blue\": 17,\n \"red\": 25\n }\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"tool_name\": \"sum_items\",\n \"content\": \"42\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"The total number of items is 42.\"\n }\n ]\n}\n",
"stderr": "",
"command": [
"/Volumes/Mac Storage/Projects/quickrouter-tutorial30-proof-20261023/coding/.venv/bin/python",
"run.py"
]
}