radiance 1.7.0

- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves
  every shipped container
- Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime
- /v1/messages works with Claude Code as it ships (gearwave00001)
- a long agent conversation keeps its cached history when the client rewrites its last turn
  (manueloverride)
- a stream's first event goes out with the first token, so llama-benchy measures prefill right
- opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42)
- four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b)
- NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA
  adapters (baKon)
- many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool
  arguments and the CPU's vision and audio encoders
- plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
This commit is contained in:
Deadcode committed 2026-10-16 18:25:18 +02:00
1 parent b068190326
commit 1e968f6e1d
739 files changed
+128447 -84632

No files matched your search

@@ -0,0 +1,6 @@
<bos><|turn>system
<|think|>
<turn|>
<|turn>user
Describe<|image|>briefly.<turn|>
<|turn>model
@@ -0,0 +1,6 @@
<bos><|turn>system
<|think|>
<turn|>
<|turn>user
Hi.<turn|>
<|turn>model
@@ -0,0 +1,6 @@
<bos><|turn>system
<|think|>
<turn|>
<|turn>user
Hi.<turn|>
<|turn>model
@@ -0,0 +1,10 @@
<bos><|turn>system
<|think|>
<turn|>
<|turn>user
First question.<turn|>
<|turn>model
First answer.<turn|>
<|turn>user
Second question.<turn|>
<|turn>model
@@ -0,0 +1,10 @@
<bos><|turn>system
<|think|>
<turn|>
<|turn>user
First question.<turn|>
<|turn>model
First answer.<turn|>
<|turn>user
Second question.<turn|>
<|turn>model
@@ -0,0 +1,10 @@
<bos><|turn>system
<|think|>
<turn|>
<|turn>user
First question.<turn|>
<|turn>model
First answer.<turn|>
<|turn>user
Second question.<turn|>
<|turn>model
@@ -0,0 +1,7 @@
<bos><|turn>system
<|think|>
<turn|>
<|turn>user
Hi.<turn|>
<|turn>model
Hello.<turn|>
@@ -0,0 +1,11 @@
<bos><|turn>system
<|think|>
<|tool>declaration:read{description:<|"|>Read a file.<|"|>,parameters:{properties:{limit:{type:<|"|>INTEGER<|"|>},path:{description:<|"|>Absolute path<|"|>,type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:edit{description:<|"|>Apply edits — exact text, «quoted» & <tagged>, 日本語.<|"|>,parameters:{properties:{dry_run:{type:<|"|>BOOLEAN<|"|>},edits:{items:{properties:{newText:{type:<|"|>STRING<|"|>},oldText:{type:<|"|>STRING<|"|>}},required:[<|"|>oldText<|"|>,<|"|>newText<|"|>],type:<|"|>OBJECT<|"|>},type:<|"|>ARRAY<|"|>},mode:{enum:[<|"|>fast<|"|>,<|"|>safe<|"|>],type:<|"|>STRING<|"|>},path:{type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>,<|"|>edits<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:ping{description:<|"|>Takes no arguments.<|"|>,parameters:{type:<|"|>OBJECT<|"|>}}<tool|><turn|>
<|turn>user
Edit both files, then ping.<turn|>
<|turn>model
<|tool_call>call:edit{dry_run:false,edits:[{newText:<|"|> return a < b & c # it's
<|"|>,oldText:<|"|> return a
<|"|>},{newText:<|"|>\"<|"|>,oldText:<|"|>x y<|"|>}],mode:<|"|>safe<|"|>,path:<|"|>/work/a.py<|"|>}<tool_call|><|tool_call>call:read{limit:3,path:<|"|>/work/über.py<|"|>}<tool_call|><|tool_call>call:ping{}<tool_call|><|tool_response>response:edit{value:<|"|>{"ok": true}<|"|>}<tool_response|><|tool_response>response:read{value:<|"|>x = 1
<|"|>}<tool_response|><|tool_response>response:ping{value:<|"|>pong<|"|>}<tool_response|>Doing all three.<turn|>
<|channel>thought
@@ -0,0 +1,6 @@
<bos><|turn>system
<|think|>
You are terse.<turn|>
<|turn>user
What is 2+2?<turn|>
<|turn>model
@@ -0,0 +1,5 @@
<bos><|turn>user
Hi.<turn|>
<|turn>model
<|channel>thought
<channel|>
@@ -0,0 +1,11 @@
<bos><|turn>system
<|think|>
<|tool>declaration:read{description:<|"|>Read a file.<|"|>,parameters:{properties:{limit:{type:<|"|>INTEGER<|"|>},path:{description:<|"|>Absolute path<|"|>,type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:edit{description:<|"|>Apply edits — exact text, «quoted» & <tagged>, 日本語.<|"|>,parameters:{properties:{dry_run:{type:<|"|>BOOLEAN<|"|>},edits:{items:{properties:{newText:{type:<|"|>STRING<|"|>},oldText:{type:<|"|>STRING<|"|>}},required:[<|"|>oldText<|"|>,<|"|>newText<|"|>],type:<|"|>OBJECT<|"|>},type:<|"|>ARRAY<|"|>},mode:{enum:[<|"|>fast<|"|>,<|"|>safe<|"|>],type:<|"|>STRING<|"|>},path:{type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>,<|"|>edits<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:ping{description:<|"|>Takes no arguments.<|"|>,parameters:{type:<|"|>OBJECT<|"|>}}<tool|><turn|>
<|turn>user
Fix /work/a.py.<turn|>
<|turn>model
<|tool_call>call:read{limit:40,path:<|"|>/work/a.py<|"|>}<tool_call|><|tool_response>response:read{value:<|"|>print(1)
<|"|>}<tool_response|>It prints 1.<turn|>
<|turn>user
Now make it print 2.<turn|>
<|turn>model
@@ -0,0 +1,10 @@
<bos><|turn>system
<|think|>
<|tool>declaration:read{description:<|"|>Read a file.<|"|>,parameters:{properties:{limit:{type:<|"|>INTEGER<|"|>},path:{description:<|"|>Absolute path<|"|>,type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:edit{description:<|"|>Apply edits — exact text, «quoted» & <tagged>, 日本語.<|"|>,parameters:{properties:{dry_run:{type:<|"|>BOOLEAN<|"|>},edits:{items:{properties:{newText:{type:<|"|>STRING<|"|>},oldText:{type:<|"|>STRING<|"|>}},required:[<|"|>oldText<|"|>,<|"|>newText<|"|>],type:<|"|>OBJECT<|"|>},type:<|"|>ARRAY<|"|>},mode:{enum:[<|"|>fast<|"|>,<|"|>safe<|"|>],type:<|"|>STRING<|"|>},path:{type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>,<|"|>edits<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:ping{description:<|"|>Takes no arguments.<|"|>,parameters:{type:<|"|>OBJECT<|"|>}}<tool|><turn|>
<|turn>user
Fix /work/a.py.<turn|>
<|turn>model
<|channel>thought
Read it first.
<channel|><|tool_call>call:read{limit:40,path:<|"|>/work/a.py<|"|>}<tool_call|><|tool_response>response:read{value:<|"|>print(1)
<|"|>}<tool_response|><|channel>thought
@@ -0,0 +1,13 @@
<bos><|turn>system
<|think|>
<|tool>declaration:read{description:<|"|>Read a file.<|"|>,parameters:{properties:{limit:{type:<|"|>INTEGER<|"|>},path:{description:<|"|>Absolute path<|"|>,type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:edit{description:<|"|>Apply edits — exact text, «quoted» & <tagged>, 日本語.<|"|>,parameters:{properties:{dry_run:{type:<|"|>BOOLEAN<|"|>},edits:{items:{properties:{newText:{type:<|"|>STRING<|"|>},oldText:{type:<|"|>STRING<|"|>}},required:[<|"|>oldText<|"|>,<|"|>newText<|"|>],type:<|"|>OBJECT<|"|>},type:<|"|>ARRAY<|"|>},mode:{enum:[<|"|>fast<|"|>,<|"|>safe<|"|>],type:<|"|>STRING<|"|>},path:{type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>,<|"|>edits<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:ping{description:<|"|>Takes no arguments.<|"|>,parameters:{type:<|"|>OBJECT<|"|>}}<tool|><turn|>
<|turn>user
Fix /work/a.py.<turn|>
<|turn>model
<|channel>thought
Read it first.
<channel|><|tool_call>call:read{path:<|"|>/work/a.py<|"|>}<tool_call|><|tool_response>response:read{value:<|"|>print(1)
<|"|>}<tool_response|><turn|>
<|turn>user
Go on.<turn|>
<|turn>model
@@ -0,0 +1,6 @@
<bos><|turn>system
<|think|>
<|tool>declaration:read{description:<|"|>Read a file.<|"|>,parameters:{properties:{limit:{type:<|"|>INTEGER<|"|>},path:{description:<|"|>Absolute path<|"|>,type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:edit{description:<|"|>Apply edits — exact text, «quoted» & <tagged>, 日本語.<|"|>,parameters:{properties:{dry_run:{type:<|"|>BOOLEAN<|"|>},edits:{items:{properties:{newText:{type:<|"|>STRING<|"|>},oldText:{type:<|"|>STRING<|"|>}},required:[<|"|>oldText<|"|>,<|"|>newText<|"|>],type:<|"|>OBJECT<|"|>},type:<|"|>ARRAY<|"|>},mode:{enum:[<|"|>fast<|"|>,<|"|>safe<|"|>],type:<|"|>STRING<|"|>},path:{type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>,<|"|>edits<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:ping{description:<|"|>Takes no arguments.<|"|>,parameters:{type:<|"|>OBJECT<|"|>}}<tool|><turn|>
<|turn>user
Read /work/a.py.<turn|>
<|turn>model
@@ -0,0 +1,6 @@
<bos><|turn>system
<|think|>
You are a coding agent.<|tool>declaration:read{description:<|"|>Read a file.<|"|>,parameters:{properties:{limit:{type:<|"|>INTEGER<|"|>},path:{description:<|"|>Absolute path<|"|>,type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:edit{description:<|"|>Apply edits — exact text, «quoted» & <tagged>, 日本語.<|"|>,parameters:{properties:{dry_run:{type:<|"|>BOOLEAN<|"|>},edits:{items:{properties:{newText:{type:<|"|>STRING<|"|>},oldText:{type:<|"|>STRING<|"|>}},required:[<|"|>oldText<|"|>,<|"|>newText<|"|>],type:<|"|>OBJECT<|"|>},type:<|"|>ARRAY<|"|>},mode:{enum:[<|"|>fast<|"|>,<|"|>safe<|"|>],type:<|"|>STRING<|"|>},path:{type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>,<|"|>edits<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:ping{description:<|"|>Takes no arguments.<|"|>,parameters:{type:<|"|>OBJECT<|"|>}}<tool|><turn|>
<|turn>user
Read /work/a.py.<turn|>
<|turn>model
@@ -0,0 +1,6 @@
<bos><|turn>system
<|think|>
<|tool>declaration:read{description:<|"|>Read a file.<|"|>,parameters:{properties:{limit:{type:<|"|>INTEGER<|"|>},path:{description:<|"|>Absolute path<|"|>,type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:edit{description:<|"|>Apply edits — exact text, «quoted» & <tagged>, 日本語.<|"|>,parameters:{properties:{dry_run:{type:<|"|>BOOLEAN<|"|>},edits:{items:{properties:{newText:{type:<|"|>STRING<|"|>},oldText:{type:<|"|>STRING<|"|>}},required:[<|"|>oldText<|"|>,<|"|>newText<|"|>],type:<|"|>OBJECT<|"|>},type:<|"|>ARRAY<|"|>},mode:{enum:[<|"|>fast<|"|>,<|"|>safe<|"|>],type:<|"|>STRING<|"|>},path:{type:<|"|>STRING<|"|>}},required:[<|"|>path<|"|>,<|"|>edits<|"|>],type:<|"|>OBJECT<|"|>}}<tool|><|tool>declaration:ping{description:<|"|>Takes no arguments.<|"|>,parameters:{type:<|"|>OBJECT<|"|>}}<tool|><turn|>
<|turn>user
Übersetze: 日本語 🙂 "quoted" \ back<turn|>
<|turn>model
+124
View File
@@ -0,0 +1,124 @@
{
"about": "Requests rendered through each shipped template by Python jinja2 (tests/mkchatgolden.py) and by ChatTemplate::apply (tests/chat_test.cpp). Messages are OpenAI-shaped, as the server receives them: tool-call arguments are JSON strings and a media part is the server's media_marker part. Each model's renders are in <model>/golden/<case>.txt, or <case>.err holding the message of a template that refused the request.",
"models": {
"qwen3.8": { "bos": "", "eos": "<|im_end|>", "media": "<|vision_start|><|image_pad|><|vision_end|>" },
"qwen3.6": { "bos": "", "eos": "<|im_end|>", "media": "<|vision_start|><|image_pad|><|vision_end|>" },
"minicpm5": { "bos": "<s>", "eos": "</s>", "media": "" },
"gemma4": { "bos": "<bos>", "eos": "<eos>", "media": "<|image|>" }
},
"tools": [
{ "type": "function", "function": { "name": "read", "description": "Read a file.",
"parameters": { "type": "object", "properties": {
"path": { "type": "string", "description": "Absolute path" },
"limit": { "type": "integer" } }, "required": ["path"] } } },
{ "type": "function", "function": { "name": "edit",
"description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.",
"parameters": { "type": "object", "properties": {
"path": { "type": "string" },
"edits": { "type": "array", "items": { "type": "object", "properties": {
"oldText": { "type": "string" }, "newText": { "type": "string" } },
"required": ["oldText", "newText"] } },
"dry_run": { "type": "boolean" },
"mode": { "type": "string", "enum": ["fast", "safe"] } },
"required": ["path", "edits"] } } },
{ "type": "function", "function": { "name": "ping", "description": "Takes no arguments.",
"parameters": { "type": "object", "properties": {} } } }
],
"cases": [
{ "name": "system_and_user",
"messages": [
{ "role": "system", "content": "You are terse." },
{ "role": "user", "content": "What is 2+2?" } ] },
{ "name": "thinking_off",
"enable_thinking": false,
"messages": [ { "role": "user", "content": "Hi." } ] },
{ "name": "tools_and_user",
"tools": true,
"messages": [ { "role": "user", "content": "Read /work/a.py." } ] },
{ "name": "tools_system_and_user",
"tools": true,
"messages": [
{ "role": "system", "content": "You are a coding agent." },
{ "role": "user", "content": "Read /work/a.py." } ] },
{ "name": "history_with_reasoning",
"messages": [
{ "role": "user", "content": "First question." },
{ "role": "assistant", "reasoning_content": "Thinking about the first.", "content": "First answer." },
{ "role": "user", "content": "Second question." } ] },
{ "name": "history_with_reasoning_preserved",
"kwargs": { "preserve_thinking": true },
"messages": [
{ "role": "user", "content": "First question." },
{ "role": "assistant", "reasoning_content": "Thinking about the first.", "content": "First answer." },
{ "role": "user", "content": "Second question." } ] },
{ "name": "history_with_reasoning_dropped",
"kwargs": { "preserve_thinking": false },
"messages": [
{ "role": "user", "content": "First question." },
{ "role": "assistant", "reasoning_content": "Thinking about the first.", "content": "First answer." },
{ "role": "user", "content": "Second question." } ] },
{ "name": "tool_call_then_result",
"tools": true,
"messages": [
{ "role": "user", "content": "Fix /work/a.py." },
{ "role": "assistant", "reasoning_content": "Read it first.", "content": null,
"tool_calls": [ { "id": "call_1", "type": "function",
"function": { "name": "read", "arguments": "{\"path\": \"/work/a.py\", \"limit\": 40}" } } ] },
{ "role": "tool", "tool_call_id": "call_1", "content": "print(1)\n" } ] },
{ "name": "tool_call_answered_then_user",
"tools": true,
"messages": [
{ "role": "user", "content": "Fix /work/a.py." },
{ "role": "assistant", "reasoning_content": "Read it first.", "content": null,
"tool_calls": [ { "id": "call_1", "type": "function",
"function": { "name": "read", "arguments": "{\"path\": \"/work/a.py\", \"limit\": 40}" } } ] },
{ "role": "tool", "tool_call_id": "call_1", "content": "print(1)\n" },
{ "role": "assistant", "content": "It prints 1." },
{ "role": "user", "content": "Now make it print 2." } ] },
{ "name": "tool_calls_preserving_reasoning",
"tools": true,
"kwargs": { "preserve_thinking": true },
"messages": [
{ "role": "user", "content": "Fix /work/a.py." },
{ "role": "assistant", "reasoning_content": "Read it first.", "content": "",
"tool_calls": [ { "id": "call_1", "type": "function",
"function": { "name": "read", "arguments": "{\"path\": \"/work/a.py\"}" } } ] },
{ "role": "tool", "tool_call_id": "call_1", "content": "print(1)\n" },
{ "role": "user", "content": "Go on." } ] },
{ "name": "parallel_calls_with_typed_arguments",
"tools": true,
"messages": [
{ "role": "user", "content": "Edit both files, then ping." },
{ "role": "assistant", "content": "Doing all three.",
"tool_calls": [
{ "id": "call_a", "type": "function", "function": { "name": "edit",
"arguments": "{\"path\": \"/work/a.py\", \"edits\": [{\"oldText\": \" return a\\n\", \"newText\": \" return a < b & c # it's\\n\"}, {\"oldText\": \"x\\ty\", \"newText\": \"\\\\\\\"\"}], \"dry_run\": false, \"mode\": \"safe\"}" } },
{ "id": "call_b", "type": "function", "function": { "name": "read",
"arguments": "{\"path\": \"/work/über.py\", \"limit\": 3}" } },
{ "id": "call_c", "type": "function", "function": { "name": "ping", "arguments": "{}" } } ] },
{ "role": "tool", "tool_call_id": "call_a", "content": "{\"ok\": true}" },
{ "role": "tool", "tool_call_id": "call_b", "content": "x = 1\n" },
{ "role": "tool", "tool_call_id": "call_c", "content": "pong" } ] },
{ "name": "no_generation_prompt",
"add_generation_prompt": false,
"messages": [
{ "role": "user", "content": "Hi." },
{ "role": "assistant", "content": "Hello." } ] },
{ "name": "unicode_text",
"tools": true,
"messages": [ { "role": "user", "content": "Übersetze: 日本語 🙂 \"quoted\" \\ back" } ] },
{ "name": "effort_low",
"kwargs": { "reasoning_effort": "low" },
"messages": [ { "role": "user", "content": "Hi." } ] },
{ "name": "effort_the_template_refuses",
"kwargs": { "reasoning_effort": "high" },
"messages": [ { "role": "user", "content": "Hi." } ] },
{ "name": "a_picture_between_text",
"models": ["qwen3.8", "qwen3.6", "gemma4"],
"messages": [
{ "role": "user", "content": [
{ "type": "text", "text": "Describe" },
{ "type": "media_marker", "text": "<__media__>" },
{ "type": "text", "text": "briefly." } ] } ] }
]
}
@@ -0,0 +1,4 @@
<s><|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,4 @@
<s><|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,12 @@
<s><|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
<think>
Thinking about the first.
</think>
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,12 @@
<s><|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
<think>
Thinking about the first.
</think>
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,12 @@
<s><|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
<think>
Thinking about the first.
</think>
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,8 @@
<s><|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
</think>
Hello.<|im_end|>
@@ -0,0 +1,39 @@
<s><|im_start|>system
# Tools
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
Tool usage guidelines:
- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.
- When calling a function, return an XML object within <function ... </function> using:
<function name="function-name"><param name="param-name">param-value</param></function>
- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param><|im_end|>
<|im_start|>user
Edit both files, then ping.<|im_end|>
<|im_start|>assistant
<think>
</think>
Doing all three.
<function name="edit"><param name="path">/work/a.py</param><param name="edits">[{'oldText': ' return a\n', 'newText': " return a < b & c # it's\n"}, {'oldText': 'x\ty', 'newText': '\\"'}]</param><param name="dry_run">False</param><param name="mode">safe</param></function>
<function name="read"><param name="path">/work/über.py</param><param name="limit">3</param></function>
<function name="ping"></function><|im_end|>
<|im_start|>user
<tool_response>
{"ok": true}
</tool_response>
<tool_response>
x = 1
</tool_response>
<tool_response>
pong
</tool_response><|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,6 @@
<s><|im_start|>system
You are terse.<|im_end|>
<|im_start|>user
What is 2+2?<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,7 @@
<s><|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
</think>
@@ -0,0 +1,38 @@
<s><|im_start|>system
# Tools
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
Tool usage guidelines:
- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.
- When calling a function, return an XML object within <function ... </function> using:
<function name="function-name"><param name="param-name">param-value</param></function>
- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<function name="read"><param name="path">/work/a.py</param><param name="limit">40</param></function><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>assistant
<think>
</think>
It prints 1.<|im_end|>
<|im_start|>user
Now make it print 2.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,30 @@
<s><|im_start|>system
# Tools
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
Tool usage guidelines:
- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.
- When calling a function, return an XML object within <function ... </function> using:
<function name="function-name"><param name="param-name">param-value</param></function>
- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<function name="read"><param name="path">/work/a.py</param><param name="limit">40</param></function><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,32 @@
<s><|im_start|>system
# Tools
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
Tool usage guidelines:
- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.
- When calling a function, return an XML object within <function ... </function> using:
<function name="function-name"><param name="param-name">param-value</param></function>
- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<function name="read"><param name="path">/work/a.py</param></function><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>user
Go on.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,19 @@
<s><|im_start|>system
# Tools
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
Tool usage guidelines:
- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.
- When calling a function, return an XML object within <function ... </function> using:
<function name="function-name"><param name="param-name">param-value</param></function>
- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param><|im_end|>
<|im_start|>user
Read /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,21 @@
<s><|im_start|>system
You are a coding agent.
# Tools
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
Tool usage guidelines:
- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.
- When calling a function, return an XML object within <function ... </function> using:
<function name="function-name"><param name="param-name">param-value</param></function>
- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param><|im_end|>
<|im_start|>user
Read /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,19 @@
<s><|im_start|>system
# Tools
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
Tool usage guidelines:
- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.
- When calling a function, return an XML object within <function ... </function> using:
<function name="function-name"><param name="param-name">param-value</param></function>
- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param><|im_end|>
<|im_start|>user
Übersetze: 日本語 🙂 "quoted" \ back<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,4 @@
<|im_start|>user
Describe<|vision_start|><|image_pad|><|vision_end|>briefly.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,4 @@
<|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,4 @@
<|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,8 @@
<|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,8 @@
<|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,12 @@
<|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
<think>
Thinking about the first.
</think>
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,8 @@
<|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
</think>
Hello.<|im_end|>
@@ -0,0 +1,84 @@
<|im_start|>system
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Edit both files, then ping.<|im_end|>
<|im_start|>assistant
<think>
</think>
Doing all three.
<tool_call>
<function=edit>
<parameter=path>
/work/a.py
</parameter>
<parameter=edits>
[{"oldText": " return a\n", "newText": " return a < b & c # it's\n"}, {"oldText": "x\ty", "newText": "\\\""}]
</parameter>
<parameter=dry_run>
false
</parameter>
<parameter=mode>
safe
</parameter>
</function>
</tool_call>
<tool_call>
<function=read>
<parameter=path>
/work/über.py
</parameter>
<parameter=limit>
3
</parameter>
</function>
</tool_call>
<tool_call>
<function=ping>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
{"ok": true}
</tool_response>
<tool_response>
x = 1
</tool_response>
<tool_response>
pong
</tool_response><|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,6 @@
<|im_start|>system
You are terse.<|im_end|>
<|im_start|>user
What is 2+2?<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,7 @@
<|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
</think>
@@ -0,0 +1,56 @@
<|im_start|>system
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<tool_call>
<function=read>
<parameter=path>
/work/a.py
</parameter>
<parameter=limit>
40
</parameter>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>assistant
It prints 1.<|im_end|>
<|im_start|>user
Now make it print 2.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,56 @@
<|im_start|>system
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<tool_call>
<function=read>
<parameter=path>
/work/a.py
</parameter>
<parameter=limit>
40
</parameter>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,55 @@
<|im_start|>system
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<tool_call>
<function=read>
<parameter=path>
/work/a.py
</parameter>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>user
Go on.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,37 @@
<|im_start|>system
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Read /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,39 @@
<|im_start|>system
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT>
You are a coding agent.<|im_end|>
<|im_start|>user
Read /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,37 @@
<|im_start|>system
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Übersetze: 日本語 🙂 "quoted" \ back<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,6 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.<|im_end|>
<|im_start|>user
Describe<|vision_start|><|image_pad|><|vision_end|>briefly.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,6 @@
<|im_start|>system
Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.<|im_end|>
<|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1 @@
Unexpected reasoning effort high. Supported types are xhigh (default), medium, and low.
@@ -0,0 +1,14 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.<|im_end|>
<|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
<think>
Thinking about the first.
</think>
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,10 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.<|im_end|>
<|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,14 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.<|im_end|>
<|im_start|>user
First question.<|im_end|>
<|im_start|>assistant
<think>
Thinking about the first.
</think>
First answer.<|im_end|>
<|im_start|>user
Second question.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,10 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.<|im_end|>
<|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
</think>
Hello.<|im_end|>
@@ -0,0 +1,86 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Edit both files, then ping.<|im_end|>
<|im_start|>assistant
<think>
</think>
Doing all three.
<tool_call>
<function=edit>
<parameter=path>
/work/a.py
</parameter>
<parameter=edits>
[{"oldText": " return a\n", "newText": " return a < b & c # it's\n"}, {"oldText": "x\ty", "newText": "\\\""}]
</parameter>
<parameter=dry_run>
false
</parameter>
<parameter=mode>
safe
</parameter>
</function>
</tool_call>
<tool_call>
<function=read>
<parameter=path>
/work/über.py
</parameter>
<parameter=limit>
3
</parameter>
</function>
</tool_call>
<tool_call>
<function=ping>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
{"ok": true}
</tool_response>
<tool_response>
x = 1
</tool_response>
<tool_response>
pong
</tool_response><|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,8 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
You are terse.<|im_end|>
<|im_start|>user
What is 2+2?<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,7 @@
<|im_start|>user
Hi.<|im_end|>
<|im_start|>assistant
<think>
</think>
@@ -0,0 +1,66 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<tool_call>
<function=read>
<parameter=path>
/work/a.py
</parameter>
<parameter=limit>
40
</parameter>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>assistant
<think>
</think>
It prints 1.<|im_end|>
<|im_start|>user
Now make it print 2.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,58 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<tool_call>
<function=read>
<parameter=path>
/work/a.py
</parameter>
<parameter=limit>
40
</parameter>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,57 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Fix /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
Read it first.
</think>
<tool_call>
<function=read>
<parameter=path>
/work/a.py
</parameter>
</function>
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
print(1)
</tool_response><|im_end|>
<|im_start|>user
Go on.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,39 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Read /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,41 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT>
You are a coding agent.<|im_end|>
<|im_start|>user
Read /work/a.py.<|im_end|>
<|im_start|>assistant
<think>
@@ -0,0 +1,39 @@
<|im_start|>system
Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.
# Tools
You have access to the following functions:
<tools>
{"type": "function", "function": {"name": "read", "description": "Read a file.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute path"}, "limit": {"type": "integer"}}, "required": ["path"]}}}
{"type": "function", "function": {"name": "edit", "description": "Apply edits — exact text, «quoted» & <tagged>, 日本語.", "parameters": {"type": "object", "properties": {"path": {"type": "string"}, "edits": {"type": "array", "items": {"type": "object", "properties": {"oldText": {"type": "string"}, "newText": {"type": "string"}}, "required": ["oldText", "newText"]}}, "dry_run": {"type": "boolean"}, "mode": {"type": "string", "enum": ["fast", "safe"]}}, "required": ["path", "edits"]}}}
{"type": "function", "function": {"name": "ping", "description": "Takes no arguments.", "parameters": {"type": "object", "properties": {}}}}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT><|im_end|>
<|im_start|>user
Übersetze: 日本語 🙂 "quoted" \ back<|im_end|>
<|im_start|>assistant
<think>
+17 -5
View File
@@ -1,8 +1,9 @@
# tests/data/media
One solid red picture in every still format `core/mm/media.cpp` admits, and one short solid red
clip in each container and codec it admits; `mm_test` decodes every one and checks it is red at
its size. They were made with FFmpeg 8.1 (libx264, libx265, libvpx, libsvtav1, libaom, libtheora,
Fixtures for `mm_test`. Solid red: a picture in eleven of the still formats `core/mm/media.cpp`
admits (PNG, APNG, JPEG, WebP, GIF, BMP, TIFF, QOI, PPM, JPEG-LS, AVIF) and a short clip in nine of
the container and codec pairs it admits. The test decodes each one and checks that it is red at its
size. They were made with FFmpeg 8.1 (libx264, libx265, libvpx, libsvtav1, libaom, libtheora,
libwebp):
```sh
@@ -31,8 +32,19 @@ ffmpeg $V -c:v mpeg4 red-mpeg4.avi
ffmpeg $V -c:v libtheora red-theora.ogv
```
`red-1788x282.jpg` is 4:2:0 at a width the scaler's vectors do not divide: converted to RGB it
is written 12 bytes past width x 3 (`a_picture_of_an_awkward_width_converts_inside_its_buffer`).
`red-1788x282.jpg` is 4:2:0 at a width the scaler's vectors do not divide: converting it to RGB,
the scaler writes 12 bytes past width x 3, and
`a_picture_of_an_awkward_width_converts_inside_its_buffer` checks that the output buffer holds
them.
The Theora clip repeats its first frame with empty packets, which is how Ogg Theora encodes a frame
that does not change.
`quad.png`, `quad.bmp`, `quad.jpg` (quality 95, 4:4:4), `quad.webp` (lossless) and `quad-alpha.png`
are written by Pillow (`python3 tests/mkimggolden.py`): 33 x 17 pixels, red top left, green top
right, blue bottom left, white bottom right, split at x = 16 and y = 8. A decoder that flips the
row order (BMP stores rows bottom up), mirrors a row or takes the wrong stride at an odd width puts
a wrong colour in some quadrant, which a solid picture cannot show.
`pictures_decode_the_right_way_up_and_the_right_way_round` checks them. `quad-alpha.png` carries
the same colours with alpha round(255 x / 32) in column x, for
`the_rgba_decode_keeps_alpha_and_the_rgb_decode_drops_it_uncomposited`.
Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B