diff --git a/Cargo.lock b/Cargo.lock index 26b4a127..cbe0acee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1139,6 +1139,12 @@ version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "memo-map" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c8c750f1a07ea702bbd212bd999fceece9b3d1508b17023b3e174583124b" + [[package]] name = "micromap" version = "0.3.0" @@ -1151,6 +1157,27 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minijinja" +version = "2.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86886cf6dbf4e614b19c9a1eec9775f021869d7eadde0fc73921a81b90c9b4c9" +dependencies = [ + "indexmap", + "memo-map", + "serde", +] + +[[package]] +name = "minijinja-contrib" +version = "2.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd3e5f077bc2379f0f7d911e7cfdd921114ed99fc884533dca502944cb355b11" +dependencies = [ + "minijinja", + "serde", +] + [[package]] name = "mio" version = "1.2.4" @@ -2081,6 +2108,8 @@ dependencies = [ "leleka-quant-core", "leleka-tokenizer", "libc", + "minijinja", + "minijinja-contrib", "regex", "regex-syntax", "reqwest", diff --git a/control-plane/Cargo.toml b/control-plane/Cargo.toml index bdede00f..862b1efe 100644 --- a/control-plane/Cargo.toml +++ b/control-plane/Cargo.toml @@ -20,6 +20,8 @@ leleka-quant-core = { path = "../crates/quant-core" } http-body = "1" jsonschema = { version = "0.58.4", default-features = false } libc = "0.2" +minijinja = { version = "=2.24.0", default-features = false, features = ["builtins", "macros", "multi_template", "adjacent_loop_items", "serde", "preserve_order", "loop_controls"] } +minijinja-contrib = { version = "=2.24.0", default-features = false, features = ["pycompat"] } reqwest = { version = "0.13.5", default-features = false, features = ["rustls"] } regex = "1.13.1" regex-syntax = "0.8.11" diff --git a/control-plane/src/main.rs b/control-plane/src/main.rs index 336ff3b2..063bebfd 100644 --- a/control-plane/src/main.rs +++ b/control-plane/src/main.rs @@ -805,6 +805,36 @@ async fn main() -> Result<(), Box> { } Ok(()) } + // JSON lines {"messages": [...], "tools": [...]|null, "add_generation_prompt": true, "kwargs": {...}} -> + // {"ok": ""} or {"error": ""}: the pinned chat template, for scripts/offline/diff_chat_template.py. + [model, action] if model == "model" && action == "render-chat" => { + use strata_control::prompt::{ChatInput, Json, pinned}; + for line in std::io::stdin().lines() { + let request: Json = serde_json::from_str(&line?)?; + let array = |key: &str| match request.get(key) { + Some(Json::Array(items)) => Some(items.as_slice()), + _ => None, + }; + let kwargs = match request.get("kwargs") { + Some(Json::Object(fields)) => fields.iter().map(|(k, v)| (k.as_str(), v.clone())).collect(), + _ => Vec::new(), + }; + let rendered = pinned().render(&ChatInput { + messages: array("messages").unwrap_or(&[]), + tools: array("tools"), + add_generation_prompt: !matches!(request.get("add_generation_prompt"), Some(Json::Bool(false))), + kwargs, + }); + println!( + "{}", + match rendered { + Ok(text) => serde_json::json!({"ok": text}), + Err(message) => serde_json::json!({"error": message}), + } + ); + } + Ok(()) + } [model, action, path] if model == "model" && action == "detokenize-batch" => { let tokenizer = tokenizer::Tokenizer::from_assets(Path::new(path))?; for line in std::io::stdin().lines() { @@ -822,7 +852,7 @@ async fn main() -> Result<(), Box> { print!("{}", include_str!("../third_party/ggml/LICENSE")); Ok(()) } - _ => Err("usage: strata-next [service-switch --catalog FILE [--from ID] --to ID --state-dir ABSOLUTE_DIR|service-switch reconcile --catalog FILE --state-dir DIR --expected-journal-sha SHA256|api-key init --file ABSOLUTE_PATH|serve [--config FILE]|provision --config FILE [--defer-memory-check]|check-config [--config FILE]|wait-ready --url LOOPBACK_ORIGIN --model ID [--key-file FILE] [--timeout-s N]|service-control status|start|stop|restart|enable|disable|start-ready|restart-ready|drain-stop|resume --config ABSOLUTE_FILE --working-dir ABSOLUTE_DIR [--env-file ABSOLUTE_FILE] [--unit strata-next[-NAME].service] [--ready-url LOOPBACK_ORIGIN --ready-model ID [--ready-key-file FILE] [--ready-timeout-s N]]|service-unit --config ABSOLUTE_FILE --working-dir ABSOLUTE_DIR [--env-file ABSOLUTE_FILE]|service-install --config ABSOLUTE_FILE --working-dir ABSOLUTE_DIR [--env-file ABSOLUTE_FILE] [--unit strata-next[-NAME].service] [--enable] [--start|--start-ready --ready-url ORIGIN --ready-model ID [--ready-key-file FILE] [--ready-timeout-s N]]|doctor|engine-info|engine-help|--ggml-license|model prepare-native-pack MANIFEST --source-dir DIR --output DIR [--compat-bf16] [--experts-bin] [--base BASE_PACK_DIR]|model smoke-fixture --output FILE.kar|model fetch MANIFEST --output DIR|model verify MANIFEST --output DIR|model ensure-sharded-preview MANIFEST --source-dir DIR --output FILE.kar --levels N|model ensure-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N|model ensure-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N --ple-part-elements E|model export-tensor-f32 FILE.gguf TENSOR --output FILE.f32|model inspect FILE.gguf|model inspect-metadata FILE.gguf|model index FILE.gguf [--hash]|model derive-iq3-identity FILE.gguf|model derive-mixed-identity FILE.gguf|model derive-sharded-identity MANIFEST --source-dir DIR|model prepare-f32-preview FILE.gguf --output FILE.kar --levels N|model prepare-iq3-preview FILE.gguf --output FILE.kar --levels N|model prepare-mixed-preview FILE.gguf --output FILE.kar --levels N|model prepare-sharded-preview MANIFEST --source-dir DIR --output FILE.kar --levels N|model prepare-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N|model prepare-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N --ple-part-elements E|model inspect-kar FILE.kar|model plan-kar-memory FILE.kar --level N --budget-mib M|model plan-kar-overlay-memory --base BASE.kar --overlay OVERLAY.kar --base-level N --overlay-level N --budget-mib M|model resolve-kar-overlay --base FILE.kar --overlay FILE.kar|model checksum-kar-preview FILE.kar TENSOR LEVEL|model checksum-kar-row FILE.kar TENSOR LEVEL --row ROW_ID|model verify-kar FILE.kar [--manifest SPEC --source-dir DIR]|model verify-iq3-preview FILE.kar --source FILE.gguf|model verify-mixed-preview FILE.kar --source FILE.gguf|model verify-sharded-preview FILE.kar --manifest SPEC --source-dir DIR|model verify-sharded-streamed FILE.kar --manifest SPEC --source-dir DIR --levels N|model verify-sharded-streamed FILE.kar --manifest SPEC --source-dir DIR --levels N --ple-part-elements E|model extract-tokenizer FILE.gguf --output DIR|model tokenize TOKENIZER_DIR TEXT [--special]|model tokenize TOKENIZER_DIR --stdin [--special]|model pre-tokenize-batch|model tokenize-batch TOKENIZER_DIR [--special]|model detokenize-batch TOKENIZER_DIR|model detokenize TOKENIZER_DIR IDS|tools embd-bf16-pack --model DIR --out FILE.gguf|tools ple-fp8-pack --model DIR --out FILE.gguf|tools draft-vocab --gguf FIRST.gguf [--base IDS.bin] [--add han,kana,hangul,cjk_punct,cjk,cyrillic] [--out IDS.bin] [--stats]|tools make-profile [TRACE ...] (--base PROFILE.bin | --no-base) --out PROFILE.bin [--n-expert N]|tools mtp-rt --gguf mtp-q2_0.gguf --out DIR [--n-expert N]|tools mtp-fetch inventory|fetch|verify --out DIR [--only SUBSTR] [--repo URL] [--sha256-file FILE]]".into()), + _ => Err("usage: strata-next [service-switch --catalog FILE [--from ID] --to ID --state-dir ABSOLUTE_DIR|service-switch reconcile --catalog FILE --state-dir DIR --expected-journal-sha SHA256|api-key init --file ABSOLUTE_PATH|serve [--config FILE]|provision --config FILE [--defer-memory-check]|check-config [--config FILE]|wait-ready --url LOOPBACK_ORIGIN --model ID [--key-file FILE] [--timeout-s N]|service-control status|start|stop|restart|enable|disable|start-ready|restart-ready|drain-stop|resume --config ABSOLUTE_FILE --working-dir ABSOLUTE_DIR [--env-file ABSOLUTE_FILE] [--unit strata-next[-NAME].service] [--ready-url LOOPBACK_ORIGIN --ready-model ID [--ready-key-file FILE] [--ready-timeout-s N]]|service-unit --config ABSOLUTE_FILE --working-dir ABSOLUTE_DIR [--env-file ABSOLUTE_FILE]|service-install --config ABSOLUTE_FILE --working-dir ABSOLUTE_DIR [--env-file ABSOLUTE_FILE] [--unit strata-next[-NAME].service] [--enable] [--start|--start-ready --ready-url ORIGIN --ready-model ID [--ready-key-file FILE] [--ready-timeout-s N]]|doctor|engine-info|engine-help|--ggml-license|model prepare-native-pack MANIFEST --source-dir DIR --output DIR [--compat-bf16] [--experts-bin] [--base BASE_PACK_DIR]|model smoke-fixture --output FILE.kar|model fetch MANIFEST --output DIR|model verify MANIFEST --output DIR|model ensure-sharded-preview MANIFEST --source-dir DIR --output FILE.kar --levels N|model ensure-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N|model ensure-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N --ple-part-elements E|model export-tensor-f32 FILE.gguf TENSOR --output FILE.f32|model inspect FILE.gguf|model inspect-metadata FILE.gguf|model index FILE.gguf [--hash]|model derive-iq3-identity FILE.gguf|model derive-mixed-identity FILE.gguf|model derive-sharded-identity MANIFEST --source-dir DIR|model prepare-f32-preview FILE.gguf --output FILE.kar --levels N|model prepare-iq3-preview FILE.gguf --output FILE.kar --levels N|model prepare-mixed-preview FILE.gguf --output FILE.kar --levels N|model prepare-sharded-preview MANIFEST --source-dir DIR --output FILE.kar --levels N|model prepare-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N|model prepare-sharded-streamed MANIFEST --source-dir DIR --output FILE.kar --levels N --ple-part-elements E|model inspect-kar FILE.kar|model plan-kar-memory FILE.kar --level N --budget-mib M|model plan-kar-overlay-memory --base BASE.kar --overlay OVERLAY.kar --base-level N --overlay-level N --budget-mib M|model resolve-kar-overlay --base FILE.kar --overlay FILE.kar|model checksum-kar-preview FILE.kar TENSOR LEVEL|model checksum-kar-row FILE.kar TENSOR LEVEL --row ROW_ID|model verify-kar FILE.kar [--manifest SPEC --source-dir DIR]|model verify-iq3-preview FILE.kar --source FILE.gguf|model verify-mixed-preview FILE.kar --source FILE.gguf|model verify-sharded-preview FILE.kar --manifest SPEC --source-dir DIR|model verify-sharded-streamed FILE.kar --manifest SPEC --source-dir DIR --levels N|model verify-sharded-streamed FILE.kar --manifest SPEC --source-dir DIR --levels N --ple-part-elements E|model extract-tokenizer FILE.gguf --output DIR|model tokenize TOKENIZER_DIR TEXT [--special]|model tokenize TOKENIZER_DIR --stdin [--special]|model pre-tokenize-batch|model tokenize-batch TOKENIZER_DIR [--special]|model detokenize-batch TOKENIZER_DIR|model render-chat|model detokenize TOKENIZER_DIR IDS|tools embd-bf16-pack --model DIR --out FILE.gguf|tools ple-fp8-pack --model DIR --out FILE.gguf|tools draft-vocab --gguf FIRST.gguf [--base IDS.bin] [--add han,kana,hangul,cjk_punct,cjk,cyrillic] [--out IDS.bin] [--stats]|tools make-profile [TRACE ...] (--base PROFILE.bin | --no-base) --out PROFILE.bin [--n-expert N]|tools mtp-rt --gguf mtp-q2_0.gguf --out DIR [--n-expert N]|tools mtp-fetch inventory|fetch|verify --out DIR [--only SUBSTR] [--repo URL] [--sha256-file FILE]]".into()), } } diff --git a/control-plane/src/prompt.rs b/control-plane/src/prompt.rs index a7f1e02f..4c25c224 100644 --- a/control-plane/src/prompt.rs +++ b/control-plane/src/prompt.rs @@ -1,8 +1,467 @@ -//! Supported text subset of the pinned Strata Qwen chat template. -//! The no-tool path and a representative tool continuation are byte-for-byte -//! checked against upstream golden cases. Tool definitions are adapted from -//! Responses function objects. -use serde_json::Value; +//! Chat prompt rendering: the model's real Jinja chat template, executed natively. +//! +//! The pinned Strata template (`engine/strata/serve/chat_template.jinja`, the Qwen3.8-Flash-Next template with +//! Unsloth's developer-role and tool fixes) is rendered with `minijinja`, configured like the Python server's +//! `ChatTemplate` (`serve/frontend.py`): `trim_blocks` and `lstrip_blocks`, no autoescape, Python-style string +//! methods, a `raise_exception` global, and Python-compatible `tojson` and `trim` filters. All ten cases of +//! `serve/chat_golden.json` render byte for byte; `scripts/offline/diff_chat_template.py` compares the two renderers +//! over generated conversations. +//! +//! * [`Renderer`] renders any template source with arbitrary JSON messages, tools and keyword arguments +//! ([`ChatInput`]); [`pinned`] is the compiled default. +//! * [`render`] / [`render_with_tools`] are the typed entry points the Responses path uses. +//! +//! Object key order matters to the model: `tojson` prints keys in the order they were given. [`Json`] keeps that +//! order when it is deserialized directly from request text. Values that already went through `serde_json::Value` +//! have lost it (the map is sorted), which is what [`Json::from_value`] and the tool schema heuristic in +//! [`schema_order`] work around for the Responses path. +use std::{collections::BTreeMap, fmt, sync::OnceLock}; + +use minijinja::{ + Environment, Error, ErrorKind, State, Value, + value::{Kwargs, ValueKind}, +}; +use serde::{ + Deserialize, Serialize, Serializer, + de::{MapAccess, SeqAccess, Visitor}, + ser::{SerializeMap, SerializeSeq}, +}; +use serde_json::Value as Plain; + +/// The pinned chat template, embedded at build time. +pub const PINNED_TEMPLATE: &str = include_str!("../../engine/strata/serve/chat_template.jinja"); + +// --------------------------------------------------------------------------------------------------------------- +// ordered JSON + +/// JSON that remembers object key order (`serde_json::Value` sorts keys unless its `preserve_order` feature is on, +/// which would change every response's key order in this binary). +#[derive(Clone, Debug, PartialEq)] +pub enum Json { + Null, + Bool(bool), + Number(serde_json::Number), + String(String), + Array(Vec), + Object(Vec<(String, Json)>), +} + +impl Json { + pub fn object(fields: [(&str, Json); N]) -> Self { + Self::Object(fields.into_iter().map(|(k, v)| (k.to_owned(), v)).collect()) + } + + pub fn str(value: &str) -> Self { + Self::String(value.to_owned()) + } + + pub fn get(&self, key: &str) -> Option<&Json> { + match self { + Self::Object(fields) => fields.iter().find(|(k, _)| k == key).map(|(_, v)| v), + _ => None, + } + } + + /// From a `serde_json::Value`, whose maps are sorted: keys come out sorted. + pub fn from_value(value: &Plain) -> Self { + match value { + Plain::Null => Self::Null, + Plain::Bool(b) => Self::Bool(*b), + Plain::Number(n) => Self::Number(n.clone()), + Plain::String(s) => Self::String(s.clone()), + Plain::Array(items) => Self::Array(items.iter().map(Self::from_value).collect()), + Plain::Object(fields) => Self::Object( + fields + .iter() + .map(|(k, v)| (k.clone(), Self::from_value(v))) + .collect(), + ), + } + } + + /// Like [`Json::from_value`], but every object that has a `"type"` key is ordered the way JSON Schema is + /// conventionally written (see [`schema_order`]). Tool parameter schemas reach the server through + /// `serde_json::Value`, so the client's own key order is gone; this is the order that matches it most often. + pub fn from_schema_value(value: &Plain) -> Self { + match value { + Plain::Array(items) => Self::Array(items.iter().map(Self::from_schema_value).collect()), + Plain::Object(fields) => { + let mut keys: Vec<&String> = fields.keys().collect(); + if fields.contains_key("type") { + keys.sort_by_key(|key| (schema_order(key), key.as_str())); + } + Self::Object( + keys.into_iter() + .map(|k| (k.clone(), Self::from_schema_value(&fields[k]))) + .collect(), + ) + } + other => Self::from_value(other), + } + } +} + +/// Position of a JSON Schema keyword in the conventional writing order. +pub fn schema_order(key: &str) -> u8 { + match key { + "type" => 0, + "properties" => 1, + "required" => 2, + "items" => 3, + "enum" => 4, + "description" => 5, + "additionalProperties" => 6, + _ => 7, + } +} + +impl Serialize for Json { + fn serialize(&self, serializer: S) -> Result { + match self { + Self::Null => serializer.serialize_unit(), + Self::Bool(b) => serializer.serialize_bool(*b), + Self::Number(n) => n.serialize(serializer), + Self::String(s) => serializer.serialize_str(s), + Self::Array(items) => { + let mut seq = serializer.serialize_seq(Some(items.len()))?; + for item in items { + seq.serialize_element(item)?; + } + seq.end() + } + Self::Object(fields) => { + let mut map = serializer.serialize_map(Some(fields.len()))?; + for (k, v) in fields { + map.serialize_entry(k, v)?; + } + map.end() + } + } + } +} + +impl<'de> Deserialize<'de> for Json { + fn deserialize>(deserializer: D) -> Result { + struct V; + impl<'de> Visitor<'de> for V { + type Value = Json; + + fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str("any JSON value") + } + + fn visit_unit(self) -> Result { + Ok(Json::Null) + } + + fn visit_none(self) -> Result { + Ok(Json::Null) + } + + fn visit_some>(self, d: D) -> Result { + Json::deserialize(d) + } + + fn visit_bool(self, v: bool) -> Result { + Ok(Json::Bool(v)) + } + + fn visit_i64(self, v: i64) -> Result { + Ok(Json::Number(v.into())) + } + + fn visit_u64(self, v: u64) -> Result { + Ok(Json::Number(v.into())) + } + + fn visit_f64(self, v: f64) -> Result { + serde_json::Number::from_f64(v) + .map(Json::Number) + .ok_or_else(|| E::custom("non-finite number")) + } + + fn visit_str(self, v: &str) -> Result { + Ok(Json::String(v.to_owned())) + } + + fn visit_string(self, v: String) -> Result { + Ok(Json::String(v)) + } + + fn visit_seq>(self, mut seq: A) -> Result { + let mut items = Vec::new(); + while let Some(item) = seq.next_element()? { + items.push(item); + } + Ok(Json::Array(items)) + } + + fn visit_map>(self, mut map: A) -> Result { + let mut fields: Vec<(String, Json)> = Vec::new(); + while let Some((key, value)) = map.next_entry::()? { + // a repeated key keeps its first position and takes the last value, as a Python dict does + match fields.iter_mut().find(|(k, _)| *k == key) { + Some(slot) => slot.1 = value, + None => fields.push((key, value)), + } + } + Ok(Json::Object(fields)) + } + } + deserializer.deserialize_any(V) + } +} + +// --------------------------------------------------------------------------------------------------------------- +// Python-compatible filters + +/// `str.isspace()` for one character: Unicode White_Space plus the four separator controls U+001C-U+001F. +fn py_space(c: char) -> bool { + c.is_whitespace() || ('\u{1c}'..='\u{1f}').contains(&c) +} + +/// Jinja's `trim` filter is `str.strip(chars)`. +fn trim(value: Value, chars: Option) -> String { + let text = if value.is_undefined() { + String::new() + } else { + value.to_string() + }; + match chars { + None => text.trim_matches(py_space).to_owned(), + Some(set) => text.trim_matches(|c| set.contains(c)).to_owned(), + } +} + +/// Python's `repr(float)` as `json.dumps` writes it: shortest round-trip digits, exponent form outside 1e-4..1e16. +fn python_float(value: f64) -> String { + if value == 0.0 { + return if value.is_sign_negative() { + "-0.0" + } else { + "0.0" + } + .to_owned(); + } + let scientific = format!("{value:e}"); // shortest digits: "-1.2345e-5" + let (mantissa, exponent) = scientific.split_once('e').expect("exponent"); + let exponent: i32 = exponent.parse().expect("exponent digits"); + let (sign, digits) = match mantissa.strip_prefix('-') { + Some(rest) => ("-", rest), + None => ("", mantissa), + }; + let digits: String = digits.chars().filter(|c| *c != '.').collect(); + if (-4..16).contains(&exponent) { + if exponent >= 0 { + let point = exponent as usize + 1; + if digits.len() <= point { + format!("{sign}{digits}{}.0", "0".repeat(point - digits.len())) + } else { + format!("{sign}{}.{}", &digits[..point], &digits[point..]) + } + } else { + format!("{sign}0.{}{digits}", "0".repeat((-exponent - 1) as usize)) + } + } else { + let mut out = format!("{sign}{}", &digits[..1]); + if digits.len() > 1 { + out.push('.'); + out.push_str(&digits[1..]); + } + format!( + "{out}e{}{:02}", + if exponent < 0 { '-' } else { '+' }, + exponent.abs() + ) + } +} + +fn json_string(text: &str, ensure_ascii: bool, out: &mut String) { + out.push('"'); + for c in text.chars() { + match c { + '"' => out.push_str("\\\""), + '\\' => out.push_str("\\\\"), + '\n' => out.push_str("\\n"), + '\r' => out.push_str("\\r"), + '\t' => out.push_str("\\t"), + '\u{8}' => out.push_str("\\b"), + '\u{c}' => out.push_str("\\f"), + c if (c as u32) < 0x20 => out.push_str(&format!("\\u{:04x}", c as u32)), + c if ensure_ascii && !c.is_ascii() => { + let mut units = [0u16; 2]; + for unit in c.encode_utf16(&mut units) { + out.push_str(&format!("\\u{unit:04x}")); + } + } + c => out.push(c), + } + } + out.push('"'); +} + +fn write_json( + value: &Value, + sort_keys: bool, + ensure_ascii: bool, + out: &mut String, +) -> Result<(), Error> { + match value.kind() { + ValueKind::None => out.push_str("null"), + ValueKind::Bool => out.push_str(if value.is_true() { "true" } else { "false" }), + ValueKind::Number => { + if value.is_integer() { + out.push_str(&value.to_string()); + } else { + let float = f64::try_from(value.clone())?; + if !float.is_finite() { + out.push_str(if float.is_nan() { + "NaN" + } else if float > 0.0 { + "Infinity" + } else { + "-Infinity" + }); + } else { + out.push_str(&python_float(float)); + } + } + } + ValueKind::String => json_string(value.as_str().unwrap_or_default(), ensure_ascii, out), + ValueKind::Seq | ValueKind::Iterable => { + out.push('['); + for (at, item) in value.try_iter()?.enumerate() { + if at > 0 { + out.push_str(", "); + } + write_json(&item, sort_keys, ensure_ascii, out)?; + } + out.push(']'); + } + ValueKind::Map => { + let mut keys: Vec = value.try_iter()?.collect(); + if sort_keys { + keys.sort_by_key(|k| k.to_string()); + } + out.push('{'); + for (at, key) in keys.iter().enumerate() { + if at > 0 { + out.push_str(", "); + } + let Some(name) = key.as_str() else { + return Err(Error::new( + ErrorKind::InvalidOperation, + "tojson keys must be strings", + )); + }; + json_string(name, ensure_ascii, out); + out.push_str(": "); + write_json(&value.get_item(key)?, sort_keys, ensure_ascii, out)?; + } + out.push('}'); + } + other => { + return Err(Error::new( + ErrorKind::InvalidOperation, + format!("Object of type {other:?} is not JSON serializable"), + )); + } + } + Ok(()) +} + +/// The server's `tojson`: `json.dumps(x, ensure_ascii=False, indent=None, separators=None, sort_keys=False)`. +fn tojson(_state: &State, value: Value, kwargs: Kwargs) -> Result { + let ensure_ascii = kwargs.get::>("ensure_ascii")?.unwrap_or(false); + let sort_keys = kwargs.get::>("sort_keys")?.unwrap_or(false); + let indent: Option = kwargs.get("indent")?; + let separators: Option = kwargs.get("separators")?; + kwargs.assert_all_used()?; + if indent.is_some_and(|v| !v.is_none()) || separators.is_some_and(|v| !v.is_none()) { + return Err(Error::new( + ErrorKind::InvalidOperation, + "tojson with indent or separators is not supported by the native renderer", + )); + } + let mut out = String::new(); + write_json(&value, sort_keys, ensure_ascii, &mut out)?; + Ok(out) +} + +// --------------------------------------------------------------------------------------------------------------- +// the renderer + +/// One rendering: what `ChatTemplate.render(messages, tools, add_generation_prompt, **kwargs)` takes. +#[derive(Debug)] +pub struct ChatInput<'a> { + pub messages: &'a [Json], + pub tools: Option<&'a [Json]>, + pub add_generation_prompt: bool, + /// Extra template variables (`enable_thinking`, `reasoning_effort`, `preserve_thinking`, ...). + pub kwargs: Vec<(&'a str, Json)>, +} + +pub struct Renderer { + env: Environment<'static>, +} + +impl Renderer { + /// A template configured like `ChatTemplate`: `trim_blocks`, `lstrip_blocks`, no autoescape, Python string + /// methods, `raise_exception`, `tojson`, `trim`. + pub fn new(source: &str) -> Result { + let mut env = Environment::new(); + env.set_trim_blocks(true); + env.set_lstrip_blocks(true); + env.set_keep_trailing_newline(false); + env.set_auto_escape_callback(|_| minijinja::AutoEscape::None); + env.set_unknown_method_callback(minijinja_contrib::pycompat::unknown_method_callback); + env.add_filter("tojson", tojson); + env.add_filter("trim", trim); + env.add_function( + "raise_exception", + |message: String| -> Result { + Err(Error::new(ErrorKind::InvalidOperation, message)) + }, + ); + env.add_template_owned("chat", source.to_owned()) + .map_err(|e| format!("chat template does not compile: {e:#}"))?; + Ok(Self { env }) + } + + pub fn render(&self, input: &ChatInput<'_>) -> Result { + let mut context: BTreeMap<&str, Value> = BTreeMap::new(); + context.insert("messages", Value::from_serialize(input.messages)); + context.insert( + "tools", + input.tools.map_or(Value::from(()), Value::from_serialize), + ); + context.insert( + "add_generation_prompt", + Value::from(input.add_generation_prompt), + ); + for (name, value) in &input.kwargs { + context.insert(name, Value::from_serialize(value)); + } + self.env + .get_template("chat") + .and_then(|template| template.render(&context)) + .map_err(|error| { + error + .detail() + .map_or_else(|| error.to_string(), str::to_owned) + }) + } +} + +/// The compiled pinned template. +pub fn pinned() -> &'static Renderer { + static PINNED: OnceLock = OnceLock::new(); + PINNED + .get_or_init(|| Renderer::new(PINNED_TEMPLATE).expect("the pinned chat template compiles")) +} + +// --------------------------------------------------------------------------------------------------------------- +// typed entry points #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Role { @@ -12,6 +471,17 @@ pub enum Role { Assistant, } +impl Role { + fn name(self) -> &'static str { + match self { + Self::System => "system", + Self::Developer => "developer", + Self::User => "user", + Self::Assistant => "assistant", + } + } +} + #[derive(Clone, Copy, Debug)] pub struct Message<'a> { pub role: Role, @@ -29,20 +499,53 @@ pub enum Effort { XHigh, } -const XHIGH: &str = "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."; -const LOW: &str = "Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration."; +impl Effort { + /// `serve/frontend.py::effort_kwargs`: the template's `enable_thinking` / `reasoning_effort`. + pub fn kwargs(self) -> Vec<(&'static str, Json)> { + match self { + Self::None => vec![("enable_thinking", Json::Bool(false))], + Self::Low => vec![("reasoning_effort", Json::str("low"))], + Self::Medium => vec![("reasoning_effort", Json::str("medium"))], + Self::High => vec![("reasoning_effort", Json::str("high"))], + Self::XHigh => vec![("reasoning_effort", Json::str("xhigh"))], + } + } +} -pub fn render(messages: &[Message<'_>], effort: Effort) -> Result { +pub fn render(messages: &[Message<'_>], effort: Effort) -> Result { render_with_tools(messages, effort, &[]) } +/// Adapt a flat Responses function object to the `{"type": "function", "function": {...}}` form the template +/// prints. Field order is the template-conventional one; the parameter schema keeps [`Json::from_schema_value`] order. +pub fn chat_tool(tool: &Plain) -> Result { + let name = tool + .get("name") + .and_then(Plain::as_str) + .ok_or("tool needs a name")?; + let mut function = vec![("name".to_owned(), Json::str(name))]; + if let Some(description) = tool.get("description").and_then(Plain::as_str) { + function.push(("description".to_owned(), Json::str(description))); + } + if let Some(parameters) = tool.get("parameters") { + function.push(("parameters".to_owned(), Json::from_schema_value(parameters))); + } + if let Some(strict) = tool.get("strict") { + function.push(("strict".to_owned(), Json::from_schema_value(strict))); + } + Ok(Json::object([ + ("type", Json::str("function")), + ("function", Json::Object(function)), + ])) +} + pub fn render_with_tools( messages: &[Message<'_>], effort: Effort, - tools: &[Value], -) -> Result { + tools: &[Plain], +) -> Result { if messages.is_empty() { - return Err("prompt needs a message"); + return Err("prompt needs a message".into()); } let first_non_system = messages .iter() @@ -53,141 +556,90 @@ pub fn render_with_tools( .iter() .any(|message| matches!(message.role, Role::System | Role::Developer)) { - return Err("system and developer messages must be at the beginning"); + return Err("system and developer messages must be at the beginning".into()); } if messages .last() .is_none_or(|message| message.role != Role::User) { - return Err("generation needs a final user message"); + return Err("generation needs a final user message".into()); } - - let system = messages[..first_non_system] + let chat: Vec = messages .iter() - .map(|message| message.content.trim()) - .filter(|content| !content.is_empty()) - .collect::>() - .join("\n"); - let instruction = match effort { - Effort::None | Effort::Medium => "", - Effort::Low => LOW, - Effort::High | Effort::XHigh => XHIGH, - }; - let mut prompt = String::new(); - if !instruction.is_empty() || !system.is_empty() || !tools.is_empty() { - prompt.push_str("<|im_start|>system\n"); - prompt.push_str(instruction); - if !tools.is_empty() { - if !instruction.is_empty() { - prompt.push_str("\n\n"); + .map(|message| { + let mut fields = vec![ + ("role".to_owned(), Json::str(message.role.name())), + ("content".to_owned(), Json::str(message.content)), + ]; + if let Some(reasoning) = message.reasoning { + fields.push(("reasoning_content".to_owned(), Json::str(reasoning))); } - prompt.push_str("# Tools\n\nYou have access to the following functions:\n\n"); - for tool in tools { - let name = tool - .get("name") - .and_then(Value::as_str) - .ok_or("tool needs a name")?; - prompt.push('\n'); - prompt.push_str("{\"type\": \"function\", \"function\": {\"name\": "); - prompt.push_str(&serde_json::to_string(name).expect("string JSON")); - if let Some(description) = tool.get("description").and_then(Value::as_str) { - prompt.push_str(", \"description\": "); - prompt.push_str(&serde_json::to_string(description).expect("string JSON")); - } - if let Some(parameters) = tool.get("parameters") { - prompt.push_str(", \"parameters\": "); - write_template_json(parameters, &mut prompt); - } - if let Some(strict) = tool.get("strict") { - prompt.push_str(", \"strict\": "); - write_template_json(strict, &mut prompt); - } - prompt.push_str("}}"); - } - prompt.push_str("\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n"); - } - if !system.is_empty() && (!instruction.is_empty() || !tools.is_empty()) { - prompt.push_str("\n\n"); - } - prompt.push_str(&system); - prompt.push_str("<|im_end|>\n"); - } - for message in &messages[first_non_system..] { - match message.role { - Role::User => { - prompt.push_str("<|im_start|>user\n"); - prompt.push_str(message.content.trim()); - prompt.push_str("<|im_end|>\n"); - } - Role::Assistant => { - prompt.push_str("<|im_start|>assistant\n\n"); - prompt.push_str(message.reasoning.unwrap_or("").trim()); - prompt.push_str("\n\n\n"); - prompt.push_str(message.content.trim()); - prompt.push_str("<|im_end|>\n"); - } - Role::System | Role::Developer => unreachable!(), - } - } - prompt.push_str("<|im_start|>assistant\n\n"); - if effort == Effort::None { - prompt.push_str("\n\n\n"); - } - Ok(prompt) -} - -fn write_template_json(value: &Value, output: &mut String) { - match value { - Value::Object(fields) => { - let mut keys = fields.keys().collect::>(); - if fields.contains_key("type") { - let priority = |key: &str| match key { - "type" => 0, - "properties" => 1, - "required" => 2, - "items" => 3, - "enum" => 4, - "description" => 5, - "additionalProperties" => 6, - _ => 7, - }; - keys.sort_by_key(|key| (priority(key), key.as_str())); - } - output.push('{'); - for (index, key) in keys.into_iter().enumerate() { - if index > 0 { - output.push_str(", "); - } - output.push_str(&serde_json::to_string(key).expect("object key JSON")); - output.push_str(": "); - write_template_json(&fields[key], output); - } - output.push('}'); - } - Value::Array(items) => { - output.push('['); - for (index, item) in items.iter().enumerate() { - if index > 0 { - output.push_str(", "); - } - write_template_json(item, output); - } - output.push(']'); - } - _ => output.push_str(&value.to_string()), - } + Json::Object(fields) + }) + .collect(); + let tools = tools.iter().map(chat_tool).collect::, _>>()?; + pinned().render(&ChatInput { + messages: &chat, + tools: (!tools.is_empty()).then_some(&tools), + add_generation_prompt: true, + kwargs: effort.kwargs(), + }) } #[cfg(test)] mod tests { use super::*; - use serde_json::{Value, json}; + use serde_json::json; + + #[derive(Deserialize)] + struct Case { + name: String, + messages: Vec, + #[serde(default)] + tools: Option>, + #[serde(default)] + add_generation_prompt: Option, + #[serde(default)] + enable_thinking: Option, + rendered: String, + hf: String, + error: Option, + } + + fn golden() -> Vec { + serde_json::from_str(include_str!("../../engine/strata/serve/chat_golden.json")).unwrap() + } + + /// All ten cases of `serve/chat_golden.json`, straight through the Jinja template: system merging, tool + /// definitions, assistant `tool_calls` with mapping arguments, `tool` messages, thinking on and off, and no + /// generation prompt. + #[test] + fn all_ten_golden_cases_render_byte_for_byte() { + let cases = golden(); + assert_eq!(cases.len(), 10); + for case in cases { + assert!(case.error.is_none(), "{}", case.name); + assert_eq!(case.rendered, case.hf, "{}", case.name); + let kwargs = case + .enable_thinking + .map(|b| ("enable_thinking", Json::Bool(b))) + .into_iter() + .collect(); + let got = pinned() + .render(&ChatInput { + messages: &case.messages, + tools: case.tools.as_deref(), + add_generation_prompt: case.add_generation_prompt.unwrap_or(true), + kwargs, + }) + .unwrap_or_else(|e| panic!("{}: {e}", case.name)); + assert_eq!(got, case.rendered, "{}", case.name); + } + } #[test] - fn text_prompt_matches_upstream_golden_bytes() { - let golden: Vec = - serde_json::from_str(include_str!("../../engine/strata/serve/chat_golden.json")) - .unwrap(); + fn typed_text_prompts_match_the_golden_bytes() { + let cases = golden(); for name in [ "single user", "system + user", @@ -198,21 +650,29 @@ mod tests { "whitespace and newlines", "thinking disabled", ] { - let case = golden.iter().find(|case| case["name"] == name).unwrap(); - let messages = case["messages"] - .as_array() - .unwrap() + let case = cases.iter().find(|case| case.name == name).unwrap(); + let messages = case + .messages .iter() .map(|message| Message { - role: match message["role"].as_str().unwrap() { - "system" => Role::System, - "developer" => Role::Developer, - "user" => Role::User, - "assistant" => Role::Assistant, - role => panic!("unsupported role: {role}"), + role: match message.get("role") { + Some(Json::String(role)) => match role.as_str() { + "system" => Role::System, + "developer" => Role::Developer, + "user" => Role::User, + "assistant" => Role::Assistant, + role => panic!("unsupported role: {role}"), + }, + _ => panic!("role"), + }, + content: match message.get("content") { + Some(Json::String(text)) => text, + _ => panic!("content"), + }, + reasoning: match message.get("reasoning_content") { + Some(Json::String(text)) => Some(text), + _ => None, }, - content: message["content"].as_str().unwrap(), - reasoning: message["reasoning_content"].as_str(), }) .collect::>(); let effort = if name == "thinking disabled" { @@ -220,53 +680,41 @@ mod tests { } else { Effort::XHigh }; - assert_eq!( - render(&messages, effort).unwrap(), - case["rendered"], - "{name}" - ); + assert_eq!(render(&messages, effort).unwrap(), case.rendered, "{name}"); } } #[test] - fn representative_tool_prompt_matches_upstream_golden_bytes() { - let golden: Vec = - serde_json::from_str(include_str!("../../engine/strata/serve/chat_golden.json")) - .unwrap(); - let case = golden - .iter() - .find(|case| case["name"] == "tool call and response") + fn flattened_tool_continuation_matches_the_golden_bytes() { + let case = golden() + .into_iter() + .find(|c| c.name == "tool call and response") .unwrap(); - let function = &case["tools"][0]["function"]; + let function = case.tools.as_ref().unwrap()[0].get("function").unwrap(); let tools = [json!({ - "type":"function", "name":function["name"], "description":function["description"], - "parameters":function["parameters"] + "type":"function", + "name": serde_json::to_value(function.get("name")).unwrap(), + "description": serde_json::to_value(function.get("description")).unwrap(), + "parameters": serde_json::to_value(function.get("parameters")).unwrap(), })]; + let user = |content| Message { + role: Role::User, + content, + reasoning: None, + }; let messages = [ - Message { - role: Role::User, - content: "Weather in Oslo?", - reasoning: None, - }, + user("Weather in Oslo?"), Message { role: Role::Assistant, content: "\n\n\nOslo\n\n\n", reasoning: None, }, - Message { - role: Role::User, - content: "\n{\"temp\": 3}\n", - reasoning: None, - }, - Message { - role: Role::User, - content: "And in Bergen?", - reasoning: None, - }, + user("\n{\"temp\": 3}\n"), + user("And in Bergen?"), ]; assert_eq!( render_with_tools(&messages, Effort::XHigh, &tools).unwrap(), - case["rendered"] + case.rendered ); } @@ -284,5 +732,127 @@ mod tests { }; assert!(render(&[user, system], Effort::XHigh).is_err()); assert!(render(&[system], Effort::XHigh).is_err()); + assert!(render(&[], Effort::XHigh).is_err()); + } + + #[test] + fn efforts_select_the_template_instructions() { + let user = [Message { + role: Role::User, + content: "hi", + reasoning: None, + }]; + let text = |effort| render(&user, effort).unwrap(); + assert!(text(Effort::XHigh).contains("Reasoning effort is set to xhigh.")); + assert!(text(Effort::High).contains("Reasoning effort is set to xhigh.")); + assert!(text(Effort::Low).contains("Reasoning effort is set to low.")); + assert_eq!( + text(Effort::Medium), + "<|im_start|>user\nhi<|im_end|>\n<|im_start|>assistant\n\n" + ); + assert_eq!( + text(Effort::None), + "<|im_start|>user\nhi<|im_end|>\n<|im_start|>assistant\n\n\n\n\n" + ); + } + + #[test] + fn raise_exception_surfaces_the_template_message() { + let messages = [Json::object([ + ("role", Json::str("tool")), + ("content", Json::str("x")), + ])]; + let bad = pinned().render(&ChatInput { + messages: &[Json::object([ + ("role", Json::str("robot")), + ("content", Json::str("x")), + ])], + tools: None, + add_generation_prompt: true, + kwargs: vec![], + }); + assert_eq!(bad.unwrap_err(), "Unexpected message role."); + let effort = pinned().render(&ChatInput { + messages: &[Json::object([ + ("role", Json::str("user")), + ("content", Json::str("x")), + ])], + tools: None, + add_generation_prompt: true, + kwargs: vec![("reasoning_effort", Json::str("extreme"))], + }); + assert_eq!( + effort.unwrap_err(), + "Unexpected reasoning effort extreme. Supported types are xhigh (default), medium, and low." + ); + let _ = messages; + } + + #[test] + fn tojson_matches_python_json_dumps() { + let renderer = Renderer::new("{{ value | tojson }}").unwrap(); + let render = |json: &str| { + let value: Json = serde_json::from_str(json).unwrap(); + let mut context = BTreeMap::new(); + context.insert("value", Value::from_serialize(&value)); + renderer + .env + .get_template("chat") + .unwrap() + .render(&context) + .unwrap() + }; + assert_eq!( + render(r#"{"b": 1, "a": [1.0, 2.5, "x\ny"], "c": null, "d": true}"#), + r#"{"b": 1, "a": [1.0, 2.5, "x\ny"], "c": null, "d": true}"# + ); + assert_eq!( + render(r#"["é", "\u0001", "\u007f", "😀", "\u2028"]"#), + "[\"é\", \"\\u0001\", \"\u{7f}\", \"😀\", \"\u{2028}\"]" + ); + assert_eq!( + render("[1e16, 1e15, 1.5e-5, 0.0001, 123456789012345680000.0, -0.0, 100.0]"), + "[1e+16, 1000000000000000.0, 1.5e-05, 0.0001, 1.2345678901234568e+20, -0.0, 100.0]" + ); + assert_eq!( + render("[18446744073709551615, -9223372036854775808]"), + "[18446744073709551615, -9223372036854775808]" + ); + } + + #[test] + fn trim_is_pythons_strip() { + let renderer = Renderer::new("[{{ value | trim }}]").unwrap(); + let render = |text: &str| { + let mut context = BTreeMap::new(); + context.insert("value", Value::from(text)); + renderer + .env + .get_template("chat") + .unwrap() + .render(&context) + .unwrap() + }; + // U+001C..U+001F are whitespace to Python's str.strip() but not to Unicode White_Space + assert_eq!(render("\u{1c}\u{1f} a b \u{a0}\u{3000}\n"), "[a b]"); + } + + #[test] + fn objects_keep_the_order_they_were_written_in() { + let tools: Vec = + serde_json::from_str(r#"[{"type":"function","function":{"name":"f","parameters":{"z":1,"a":{"y":2,"b":3}}}}]"#) + .unwrap(); + let out = pinned() + .render(&ChatInput { + messages: &[Json::object([ + ("role", Json::str("user")), + ("content", Json::str("x")), + ])], + tools: Some(&tools), + add_generation_prompt: true, + kwargs: vec![("enable_thinking", Json::Bool(false))], + }) + .unwrap(); + assert!(out.contains(r#"{"type": "function", "function": {"name": "f", "parameters": {"z": 1, "a": {"y": 2, "b": 3}}}}"#), "{out}"); } } diff --git a/control-plane/src/responses.rs b/control-plane/src/responses.rs index 4f488a07..906d1d04 100644 --- a/control-plane/src/responses.rs +++ b/control-plane/src/responses.rs @@ -1664,7 +1664,6 @@ fn render_request_prompt(request: &CreateRequest) -> Result { &catalog.flat }, ) - .map_err(str::to_owned) } fn stream_live_text( diff --git a/control-plane/tests/chat_template_oracle.rs b/control-plane/tests/chat_template_oracle.rs new file mode 100644 index 00000000..91221a52 --- /dev/null +++ b/control-plane/tests/chat_template_oracle.rs @@ -0,0 +1,71 @@ +//! The native Jinja renderer against the Python server's `ChatTemplate` (jinja2) on generated conversations. +//! +//! `tests/fixtures/offline/chat_template_oracle.json` comes from `scripts/offline/gen_goldens.py chat_template_oracle`: +//! 90 renders (every role incl. developer and tool, list content with image/video parts, assistant `tool_calls` +//! with mapping arguments, tools, `enable_thinking` / `reasoning_effort` / `preserve_thinking`, no generation +//! prompt) and 25 conversations the template refuses, with the exact `raise_exception` message. +//! `scripts/offline/diff_chat_template.py` runs the same generator live over thousands of cases. +use serde::Deserialize; +use strata_control::prompt::{ChatInput, Json, pinned}; + +#[derive(Deserialize)] +struct Case { + messages: Vec, + tools: Option, + add_generation_prompt: bool, + kwargs: Json, + rendered: Option, + error: Option, +} + +#[derive(Deserialize)] +struct Golden { + ok: Vec, + raised: Vec, +} + +fn render(case: &Case) -> Result { + let tools = match &case.tools { + Some(Json::Array(items)) => Some(items.as_slice()), + _ => None, // null, or a mapping the template ignores + }; + let kwargs = match &case.kwargs { + Json::Object(fields) => fields + .iter() + .map(|(k, v)| (k.as_str(), v.clone())) + .collect(), + _ => Vec::new(), + }; + pinned().render(&ChatInput { + messages: &case.messages, + tools, + add_generation_prompt: case.add_generation_prompt, + kwargs, + }) +} + +fn golden() -> Golden { + serde_json::from_str(include_str!("fixtures/offline/chat_template_oracle.json")).unwrap() +} + +#[test] +fn renders_are_byte_identical_to_jinja2() { + let golden = golden(); + assert!(golden.ok.len() >= 90); + for (at, case) in golden.ok.iter().enumerate() { + assert_eq!( + render(case), + Ok(case.rendered.clone().unwrap()), + "case {at}" + ); + } +} + +#[test] +fn refusals_carry_the_templates_own_message() { + let golden = golden(); + assert!(golden.raised.len() >= 25); + for (at, case) in golden.raised.iter().enumerate() { + assert_eq!(render(case), Err(case.error.clone().unwrap()), "case {at}"); + } +} diff --git a/control-plane/tests/fixtures/offline/chat_template_oracle.json b/control-plane/tests/fixtures/offline/chat_template_oracle.json new file mode 100644 index 00000000..0693427b --- /dev/null +++ b/control-plane/tests/fixtures/offline/chat_template_oracle.json @@ -0,0 +1 @@ +{"ok":[{"messages":[{"role":"tool","content":"Hello"},{"role":"user","content":"Hello"},{"role":"user","content":[{"type":"text","text":"quote \" and \\ backslash"}]},{"role":"assistant","content":[{"type":"text","text":"tab\there"},{"type":"text","text":"

"}],"tool_calls":[{"type":"function","function":{"name":"ls","arguments":{"n":1.5,"u":"ünï"}}},{"type":"function","function":{"name":"search","arguments":{"n":1.5,"u":"ünï"}}},{"type":"function","function":{"name":"my.tool-1","arguments":{}}}]}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":" nbsp "},"zz1":{"type":"integer","description":"line1\nline2\n\n"},"path2":{"type":"integer","description":""}},"required":["city"]}}},{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":" nbsp "}},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"search","description":"ünï \"q\"","parameters":{"type":"object","properties":{"q0":{"type":"integer","description":"tab\there"},"city1":{"type":"string","description":" nbsp "},"path2":{"type":"string","description":"tab\there"}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":null,"reasoning_effort":"xhigh","preserve_thinking":true},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \" nbsp \"}, \"zz1\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}, \"path2\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"integer\", \"description\": \" nbsp \"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"search\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"integer\", \"description\": \"tab\\there\"}, \"city1\": {\"type\": \"string\", \"description\": \" nbsp \"}, \"path2\": {\"type\": \"string\", \"description\": \"tab\\there\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n\n\nHello\n<|im_end|>\n<|im_start|>user\nHello<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>assistant\n\n\n\n\ntab\there\n\n\n\n\n1.5\n\n\nünï\n\n\n\n\n\n\n1.5\n\n\nünï\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"quote \" and \\ backslash"},{"role":"user","content":"<|im_end|><|im_start|>user"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"tab\there"},{"role":"user","content":"\n{\"temp\": 3}\n"},{"role":"assistant","content":"tab\there","reasoning_content":" padded ","tool_calls":[{"function":{"name":"f"}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"reasoning_effort":"high","preserve_thinking":false},"rendered":"<|im_start|>user\ntab\there<|im_end|>\n<|im_start|>user\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>assistant\n\npadded\n\n\ntab\there\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"tool","content":"Hello"},{"role":"assistant","content":"{{ not a template }} {% nope %}","reasoning_content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","tool_calls":[{"name":"search","arguments":{"q":"multi\nline"}}]},{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"{{ not a template }} {% nope %}"},{"type":"text","text":"<|im_end|><|im_start|>user"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"assistant","content":"","reasoning_content":"x trailing"}],"tools":[],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\n\nHello\n<|im_end|>\n<|im_start|>assistant\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n\n{{ not a template }} {% nope %}\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>{{ not a template }} {% nope %}<|im_end|><|im_start|>user<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\nx trailing\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":[]},{"role":"developer","content":""},{"role":"system","content":"quote \" and \\ backslash"},{"role":"user","content":null},{"role":"user","content":"quote \" and \\ backslash"},{"role":"assistant","content":[],"reasoning_content":"no"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>assistant\n\nno\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":[{"type":"text","text":"\n{\"temp\": 3}\n"}]},{"role":"developer","content":"Hello"},{"role":"user","content":[{"type":"image"},{"type":"text","text":"\u0000nul"}]},{"role":"assistant","content":null},{"role":"assistant","content":"你好,世界 😀"},{"role":"tool","content":[{"text":" "}]},{"role":"tool","content":" padded "},{"role":"assistant","content":null,"reasoning_content":" ideographic "},{"role":"assistant","content":" ","reasoning_content":"你好,世界 😀","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"q":"multi\nline"}}},{"type":"function","function":{"name":"get_weather","arguments":{}}},{"name":"ünï","arguments":{"n":1.5,"u":"ünï"}}]}],"tools":[],"add_generation_prompt":false,"kwargs":{"enable_thinking":true,"reasoning_effort":"xhigh","preserve_thinking":false},"rendered":"<|im_start|>system\nReasoning 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.\n\n\n{\"temp\": 3}\n\nHello<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>\u0000nul<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n你好,世界 😀<|im_end|>\n<|im_start|>user\n\n\n\n\npadded\n<|im_end|>\n<|im_start|>assistant\n\nideographic\n\n\n<|im_end|>\n<|im_start|>assistant\n\n你好,世界 😀\n\n\n\n\n\nmulti\nline\n\n\n\n\n\n\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n"},{"messages":[{"role":"tool","content":" padded "},{"role":"user","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":"Hello"},{"role":"user","content":" "}],"tools":[{"type":"function","function":{"name":"ls","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"a b","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":"line1\nline2\n\n"},"q1":{"type":"string","description":"line1\nline2\n\n"},"q2":{"type":"integer","description":""}},"required":["city"]}}},{"name":"a b","description":"ünï \"q\"","parameters":{"type":"object","properties":{"q0":{"type":"string","description":" padded "},"path1":{"type":"integer","description":"tab\there"}},"required":["city"]}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"high"},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}, \"q1\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"q2\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"]}}}\n{\"name\": \"a b\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"string\", \"description\": \" padded \"}, \"path1\": {\"type\": \"integer\", \"description\": \"tab\\there\"}}, \"required\": [\"city\"]}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n\n\npadded\n<|im_end|>\n<|im_start|>user\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>user\nHello<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"developer","content":"Hello"},{"role":"tool","content":"x trailing"},{"role":"assistant","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","tool_calls":[{"function":{"name":"ls","arguments":""}},{"name":"get_weather","arguments":{}},{"type":"function","function":{"name":"a b","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}}]},{"role":"assistant","content":null},{"role":"user","content":[]},{"role":"user","content":"\u001c\u001dsep\u001f"},{"role":"user","content":[]}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"medium"},"rendered":"<|im_start|>system\néééééééééééééééééééééééééééééééééééééééé\nHello<|im_end|>\n<|im_start|>user\n\nx trailing\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n\n\n\n\n\n\n\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":" padded "},{"role":"assistant","content":"line1\nline2\n\n","reasoning_content":"\n{\"temp\": 3}\n"},{"role":"user","content":"你好,世界 😀"},{"role":"user","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"tool","content":" nbsp "},{"role":"user","content":"x trailing"}],"tools":null,"add_generation_prompt":false,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\npadded<|im_end|>\n<|im_start|>assistant\n\n\n{\"temp\": 3}\n\n\n\nline1\nline2<|im_end|>\n<|im_start|>user\n你好,世界 😀<|im_end|>\n<|im_start|>user\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\n\nnbsp\n<|im_end|>\n<|im_start|>user\nx trailing<|im_end|>\n"},{"messages":[{"role":"assistant","content":"你好,世界 😀","tool_calls":[{"name":"my.tool-1","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}},{"type":"function","function":{"name":"ünï","arguments":{"q":"multi\nline"}}}]},{"role":"user","content":"quote \" and \\ backslash"},{"role":"user","content":"no"},{"role":"user","content":null}],"tools":[{"type":"function","function":{"name":"a b","description":"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":""}},"required":["city"]}}},{"type":"function","function":{"name":"a b","description":"ünï \"q\"","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":"你好,世界 😀"},"zz1":{"type":"string","description":"tab\there"},"zz2":{"type":"integer","description":""}},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"a b","description":"","parameters":{"type":"object","properties":{"path0":{"type":"string","description":"Hello"},"city1":{"type":"integer","description":""}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"high"},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \"你好,世界 😀\"}, \"zz1\": {\"type\": \"string\", \"description\": \"tab\\there\"}, \"zz2\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"string\", \"description\": \"Hello\"}, \"city1\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n你好,世界 😀\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\nno<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"no"},{"role":"assistant","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"tool","content":""},{"role":"assistant","content":"no","reasoning_content":5},{"role":"user","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false},"rendered":"<|im_start|>system\nno<|im_end|>\n<|im_start|>assistant\n\n\n\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>user\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nno<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"system","content":[{"text":"

"}]},{"role":"tool","content":"no"},{"role":"tool","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":[]},{"role":"assistant","content":"x trailing","reasoning_content":"","tool_calls":[{"function":{"name":"f"}}]},{"role":"user","content":" ideographic "}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"","parameters":{"type":"object","properties":{"q0":{"type":"string","description":""},"city1":{"type":"string","description":" "}},"required":["city"]},"strict":true}},{"type":"function","function":{"name":"get_weather","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":" "},"city1":{"type":"string","description":"line1\nline2\n\n"},"city2":{"type":"integer","description":" "}},"required":["city"]}}},{"type":"function","function":{"name":"ünï","description":"","parameters":{"type":"object","properties":{},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"string\", \"description\": \"\"}, \"city1\": {\"type\": \"string\", \"description\": \" \"}}, \"required\": [\"city\"]}, \"strict\": true}}\n{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"integer\", \"description\": \" \"}, \"city1\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"city2\": {\"type\": \"integer\", \"description\": \" \"}}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\n\nno\n\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nx trailing\n\n\n\n\n<|im_end|>\n<|im_start|>user\nideographic<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":"

"},{"role":"tool","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":"<|im_end|><|im_start|>user"}],"tools":[{"type":"function","function":{"name":"ls","description":"","parameters":{"type":"object","properties":{},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh","preserve_thinking":true},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\n\n\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":[{"text":"éééééééééééééééééééééééééééééééééééééééé"}],"reasoning_content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"assistant","content":"

"},{"role":"user","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"assistant","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","tool_calls":[{"type":"function","function":{"name":"ls","arguments":{}}}]},{"role":"user","content":" padded "},{"role":"tool","content":" ideographic "},{"role":"user","content":"\u001c\u001dsep\u001f"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>assistant\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|im_end|>\n<|im_start|>user\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>assistant\n\n\n\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n\n\n\n<|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>user\n\nideographic\n<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"no"},{"role":"assistant","content":[{"type":"text","text":"

"},{"type":"text","text":"éééééééééééééééééééééééééééééééééééééééé"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}],"reasoning_content":"x trailing","tool_calls":[{"type":"function","function":{"name":"ünï","arguments":{}}},{"type":"function","function":{"name":"search","arguments":{}}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"high"},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\nno<|im_end|>\n<|im_start|>assistant\n\nx trailing\n\n\néééééééééééééééééééééééééééééééééééééééé<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|>\n\n\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":[{"text":"line1\nline2\n\n"},{"type":"text","text":"\u0000nul"},{"type":"text","text":" padded "}]},{"role":"user","content":[{"text":" padded "}]},{"role":"user","content":[{"type":"text","text":"

"},{"type":"image"}]},{"role":"tool","content":"\u001c\u001dsep\u001f"},{"role":"assistant","content":" ","tool_calls":[{"function":{"name":"f"}}]},{"role":"assistant","content":"Hello","reasoning_content":"no"}],"tools":null,"add_generation_prompt":false,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nline1\nline2\n\n\u0000nul padded<|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\nsep\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\nno\n\n\nHello<|im_end|>\n"},{"messages":[{"role":"developer","content":"

"},{"role":"tool","content":"tab\there"},{"role":"user","content":"你好,世界 😀"}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false},"rendered":"<|im_start|>user\n\ntab\there\n<|im_end|>\n<|im_start|>user\n你好,世界 😀<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"system","content":"no"},{"role":"assistant","content":"{{ not a template }} {% nope %}","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"city":"Oslo"}}},{"name":"ls","arguments":{}}]},{"role":"user","content":[]},{"role":"user","content":[]},{"role":"assistant","content":"你好,世界 😀","reasoning_content":" nbsp ","tool_calls":[{"name":"search","arguments":{}},{"type":"function","function":{"name":"ünï","arguments":{"q":"multi\nline"}}}]},{"role":"user","content":"x trailing"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nno<|im_end|>\n<|im_start|>assistant\n\n\n\n\n{{ not a template }} {% nope %}\n\n\n\n\nOslo\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\nnbsp\n\n\n你好,世界 😀\n\n\n\n\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>user\nx trailing<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":[{"type":"text","text":"x trailing"},{"text":""},{"type":"text","text":"{{ not a template }} {% nope %}"},{"type":"image"}],"reasoning_content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","tool_calls":[{"function":{"name":"f"}}]},{"role":"user","content":[{"type":"video","video":"x.mp4"},{"type":"text","text":" "}]},{"role":"user","content":[]},{"role":"tool","content":"no"},{"role":"user","content":"\u001c\u001dsep\u001f"},{"role":"user","content":null}],"tools":[{"type":"function","function":{"name":"ls","description":"","parameters":{"type":"object","properties":{"q0":{"type":"string","description":""},"q1":{"type":"integer","description":" padded "}},"required":["city"]},"strict":true}},{"type":"function","function":{"name":"my.tool-1","description":"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":" nbsp "},"path1":{"type":"integer","description":"Hello"},"zz2":{"type":"integer","description":"Hello"}},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"string\", \"description\": \"\"}, \"q1\": {\"type\": \"integer\", \"description\": \" padded \"}}, \"required\": [\"city\"]}, \"strict\": true}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"integer\", \"description\": \" nbsp \"}, \"path1\": {\"type\": \"integer\", \"description\": \"Hello\"}, \"zz2\": {\"type\": \"integer\", \"description\": \"Hello\"}}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>assistant\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n\nx trailing{{ not a template }} {% nope %}<|vision_start|><|image_pad|><|vision_end|>\n\n\n\n\n<|im_end|>\n<|im_start|>user\n<|vision_start|><|video_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n\nno\n<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"tool","content":"\u001c\u001dsep\u001f"},{"role":"tool","content":[{"type":"text","text":"x trailing"}]},{"role":"user","content":" nbsp "},{"role":"tool","content":""}],"tools":[{"name":"ls","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":" padded "},"q1":{"type":"integer","description":" padded "}},"required":["city"]}},{"type":"function","function":{"name":"ünï","description":"","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false},"strict":true}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":null},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"name\": \"ls\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"integer\", \"description\": \" padded \"}, \"q1\": {\"type\": \"integer\", \"description\": \" padded \"}}, \"required\": [\"city\"]}}\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>user\n\nsep\n\n\nx trailing\n<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>user\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":[],"tool_calls":[{"type":"function","function":{"name":"a b","arguments":{"n":1.5,"u":"ünï"}}},{"type":"function","function":{"name":"ünï","arguments":{}}},{"type":"function","function":{"name":"ls","arguments":{"n":1.5,"u":"ünï"}}}]},{"role":"tool","content":[{"type":"text","text":"\n{\"temp\": 3}\n"},{"text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]}],"tools":[{"name":"ünï","description":"ünï \"q\"","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":"你好,世界 😀"},"path1":{"type":"integer","description":"tab\there"},"path2":{"type":"string","description":" padded "}},"required":["city"]}},{"type":"function","function":{"name":"get_weather","description":"","parameters":{"type":"object","properties":{},"required":["city"]}}},{"type":"function","function":{"name":"get_weather","description":"ünï \"q\"","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":"line1\nline2\n\n"},"city1":{"type":"string","description":"Hello"},"q2":{"type":"string","description":"line1\nline2\n\n"}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"low"},"rendered":"<|im_start|>system\nReasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"name\": \"ünï\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"integer\", \"description\": \"你好,世界 😀\"}, \"path1\": {\"type\": \"integer\", \"description\": \"tab\\there\"}, \"path2\": {\"type\": \"string\", \"description\": \" padded \"}}, \"required\": [\"city\"]}}\n{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}, \"city1\": {\"type\": \"string\", \"description\": \"Hello\"}, \"q2\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n\n\n1.5\n\n\nünï\n\n\n\n\n\n\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n<|im_start|>user\n\n\n{\"temp\": 3}\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|>\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"quote \" and \\ backslash"},{"role":"assistant","content":"{{ not a template }} {% nope %}","reasoning_content":"{{ not a template }} {% nope %}","tool_calls":[{"type":"function","function":{"name":"a b","arguments":{"q":"multi\nline"}}},{"type":"function","function":{"name":"ünï","arguments":{"q":"multi\nline"}}}]}],"tools":[{"type":"function","function":{"name":"ünï","description":"Get the weather","parameters":{"type":"object","properties":{"q0":{"type":"string","description":"line1\nline2\n\n"},"q1":{"type":"integer","description":" nbsp "}},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":null,"preserve_thinking":false},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"q1\": {\"type\": \"integer\", \"description\": \" nbsp \"}}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\nquote \" and \\ backslash<|im_end|>\n<|im_start|>assistant\n{{ not a template }} {% nope %}\n\n\n\n\nmulti\nline\n\n\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"quote \" and \\ backslash"},{"role":"developer","content":"\n{\"temp\": 3}\n"},{"role":"user","content":"no"},{"role":"assistant","content":"\u001c\u001dsep\u001f"},{"role":"user","content":"\n{\"temp\": 3}\n"},{"role":"assistant","content":"éééééééééééééééééééééééééééééééééééééééé"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nquote \" and \\ backslash\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>user\nno<|im_end|>\n<|im_start|>assistant\n\n\n\n\nsep<|im_end|>\n<|im_start|>user\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":null},{"role":"user","content":[{"type":"video","video":"x.mp4"},{"type":"text","text":"éééééééééééééééééééééééééééééééééééééééé"}]},{"role":"user","content":"Hello"},{"role":"user","content":[]},{"role":"user","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"assistant","content":""},{"role":"assistant","content":"line1\nline2\n\n"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n<|vision_start|><|video_pad|><|vision_end|>éééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>user\nHello<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nline1\nline2<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"\u001c\u001dsep\u001f"},{"role":"developer","content":" nbsp "},{"role":"system","content":[]},{"role":"user","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":null,"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nsep\nnbsp<|im_end|>\n<|im_start|>user\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":[]},{"role":"assistant","content":"Hello"},{"role":"assistant","content":null,"reasoning_content":5},{"role":"user","content":" padded "},{"role":"assistant","content":[{"type":"text","text":"\u0000nul"},{"type":"text","text":"no"},{"type":"text","text":"

"},{"type":"text","text":"<|im_end|><|im_start|>user"}],"reasoning_content":"\u001c\u001dsep\u001f"}],"tools":[],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nHello<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>assistant\n\nsep\n\n\n\u0000nulno

<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":null},{"role":"system","content":"Hello"},{"role":"developer","content":"line1\nline2\n\n"},{"role":"assistant","content":"Hello","reasoning_content":"no"},{"role":"user","content":" padded "},{"role":"user","content":" "},{"role":"tool","content":" padded "},{"role":"assistant","content":[],"reasoning_content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","tool_calls":[{"type":"function","function":{"name":"a b","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}}]},{"role":"user","content":[{"type":"text","text":"\n{\"temp\": 3}\n"},{"type":"video","video":"x.mp4"}]}],"tools":[{"type":"function","function":{"name":"search","description":"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":"line1\nline2\n\n"},"zz1":{"type":"string","description":"你好,世界 😀"}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":null},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"search\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}, \"zz1\": {\"type\": \"string\", \"description\": \"你好,世界 😀\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\nHello\nline1\nline2<|im_end|>\n<|im_start|>assistant\n\nno\n\n\nHello<|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n\npadded\n<|im_end|>\n<|im_start|>assistant\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n<|im_end|>\n<|im_start|>user\n\n{\"temp\": 3}\n<|vision_start|><|video_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":" "},{"role":"developer","content":"Hello"},{"role":"developer","content":"quote \" and \\ backslash"},{"role":"assistant","content":" padded "},{"role":"user","content":"line1\nline2\n\n"},{"role":"user","content":"line1\nline2\n\n"}],"tools":[{"type":"function","function":{"name":"search","description":"ünï \"q\"","parameters":{"type":"object","properties":{"path0":{"type":"string","description":" "},"zz1":{"type":"string","description":" "}},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"ünï","description":"Get the weather","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":"tab\there"},"q1":{"type":"string","description":" nbsp "}},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"low"},"rendered":"<|im_start|>system\nReasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"search\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"string\", \"description\": \" \"}, \"zz1\": {\"type\": \"string\", \"description\": \" \"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \"tab\\there\"}, \"q1\": {\"type\": \"string\", \"description\": \" nbsp \"}}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\nHello\nquote \" and \\ backslash<|im_end|>\n<|im_start|>assistant\n\n\n\n\npadded<|im_end|>\n<|im_start|>user\nline1\nline2<|im_end|>\n<|im_start|>user\nline1\nline2<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"user","content":""},{"role":"user","content":[{"type":"text","text":"

"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"text":"Hello"}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"medium","preserve_thinking":false},"rendered":"<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>Hello<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":[]},{"role":"user","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"reasoning_effort":"xhigh"},"rendered":"<|im_start|>user\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"system","content":[]},{"role":"developer","content":[{"text":"x trailing"}]},{"role":"developer","content":"\n{\"temp\": 3}\n"},{"role":"tool","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"text":"\u0000nul"}]},{"role":"assistant","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}],"tools":[{"type":"function","function":{"name":"ünï","description":"","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{},"required":["city"]}}},{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{"q0":{"type":"integer","description":"你好,世界 😀"}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{"preserve_thinking":false},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"integer\", \"description\": \"你好,世界 😀\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\nx trailing\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>user\n\n<|vision_start|><|image_pad|><|vision_end|>\u0000nul\n<|im_end|>\n<|im_start|>assistant\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"line1\nline2\n\n"},{"role":"assistant","content":"\u0000nul"},{"role":"tool","content":[{"text":"{{ not a template }} {% nope %}"},{"type":"text","text":"quote \" and \\ backslash"},{"type":"text","text":"quote \" and \\ backslash"},{"type":"image"}]},{"role":"assistant","content":"

"},{"role":"assistant","content":"Hello"},{"role":"user","content":" ideographic "},{"role":"user","content":[{"type":"text","text":"\u0000nul"},{"type":"text","text":"no"}]}],"tools":[{"type":"function","function":{"name":"ls","description":"ünï \"q\"","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":" nbsp "},"city1":{"type":"integer","description":"tab\there"},"zz2":{"type":"string","description":" "}},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":"line1\nline2\n\n"}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"high"},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \" nbsp \"}, \"city1\": {\"type\": \"integer\", \"description\": \"tab\\there\"}, \"zz2\": {\"type\": \"string\", \"description\": \" \"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\nline1\nline2<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\u0000nul<|im_end|>\n<|im_start|>user\n\n{{ not a template }} {% nope %}quote \" and \\ backslashquote \" and \\ backslash<|vision_start|><|image_pad|><|vision_end|>\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nHello<|im_end|>\n<|im_start|>user\nideographic<|im_end|>\n<|im_start|>user\n\u0000nulno<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"assistant","content":[{"type":"text","text":" nbsp "},{"type":"text","text":"

"}]},{"role":"user","content":null},{"role":"tool","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"

"},{"type":"text","text":"no"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"assistant","content":"{{ not a template }} {% nope %}","reasoning_content":"<|im_end|><|im_start|>user","tool_calls":[{"type":"function","function":{"name":"ünï","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}}]}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":" nbsp "}},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \" nbsp \"}}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>assistant\n\n\n\n\nnbsp<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n\n<|vision_start|><|image_pad|><|vision_end|>

no<|vision_start|><|image_pad|><|vision_end|>\n<|im_end|>\n<|im_start|>assistant\n\n<|im_end|><|im_start|>user\n\n\n{{ not a template }} {% nope %}\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":""},{"role":"user","content":" nbsp "},{"role":"tool","content":"quote \" and \\ backslash"}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>user\n\nquote \" and \\ backslash\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":[]},{"role":"system","content":[]},{"role":"assistant","content":"","reasoning_content":"

","tool_calls":[{"name":"ünï","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}},{"name":"a b","arguments":{"q":"multi\nline"}}]},{"role":"user","content":" "},{"role":"tool","content":"tab\there"}],"tools":[{"type":"function","function":{"name":"a b","description":"","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"a b","description":"ünï \"q\"","parameters":{"type":"object","properties":{"city0":{"type":"string","description":"line1\nline2\n\n"},"zz1":{"type":"string","description":"line1\nline2\n\n"}},"required":["city"]}}},{"name":"get_weather","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":"line1\nline2\n\n"},"path1":{"type":"integer","description":"你好,世界 😀"},"path2":{"type":"integer","description":""}},"required":["city"]},"strict":true}],"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"zz1\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"]}}}\n{\"name\": \"get_weather\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"path1\": {\"type\": \"integer\", \"description\": \"你好,世界 😀\"}, \"path2\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"]}, \"strict\": true}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n\ntab\there\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":[]},{"role":"user","content":"line1\nline2\n\n"},{"role":"user","content":"x trailing"},{"role":"user","content":[{"type":"text","text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]},{"role":"assistant","content":"no","reasoning_content":"tab\there"},{"role":"tool","content":null},{"role":"tool","content":"你好,世界 😀"},{"role":"assistant","content":[{"type":"text","text":" ideographic "},{"type":"text","text":" padded "}]}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\nline1\nline2<|im_end|>\n<|im_start|>user\nx trailing<|im_end|>\n<|im_start|>user\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>assistant\n\ntab\there\n\n\nno<|im_end|>\n<|im_start|>user\n\n\n\n\n你好,世界 😀\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nideographic  padded<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":"<|im_end|><|im_start|>user","tool_calls":[{"name":"a b","arguments":{"city":"Oslo"}},{"type":"function","function":{"name":"my.tool-1","arguments":{"q":"multi\nline"}}},{"type":"function","function":{"name":"a b","arguments":{"q":"multi\nline"}}}]},{"role":"assistant","content":null,"reasoning_content":"tab\there"},{"role":"user","content":null},{"role":"tool","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":null},{"role":"assistant","content":"x trailing","reasoning_content":"\n{\"temp\": 3}\n"}],"tools":null,"add_generation_prompt":true,"kwargs":{"preserve_thinking":false},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>assistant\n<|im_end|><|im_start|>user\n\n\n\n\nOslo\n\n\n\n\n\n\nmulti\nline\n\n\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>assistant\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n\n<|vision_start|><|image_pad|><|vision_end|>\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n{\"temp\": 3}\n\n\n\nx trailing<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"system","content":"quote \" and \\ backslash"},{"role":"user","content":"\n{\"temp\": 3}\n"},{"role":"assistant","content":null,"tool_calls":[]},{"role":"user","content":"Hello"},{"role":"user","content":[{"type":"text","text":"\u001c\u001dsep\u001f"},{"type":"text","text":" padded "},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image"}]},{"role":"assistant","content":[{"type":"text","text":"Hello"},{"type":"text","text":"

"},{"type":"image"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}],"reasoning_content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"user","content":[{"text":"quote \" and \\ backslash"},{"type":"text","text":"你好,世界 😀"}]},{"role":"user","content":"\n{\"temp\": 3}\n"}],"tools":[{"type":"function","function":{"name":"ls","description":"Get the weather","parameters":{"type":"object","properties":{"q0":{"type":"string","description":" "},"q1":{"type":"string","description":"line1\nline2\n\n"},"q2":{"type":"integer","description":""}},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"preserve_thinking":false},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"string\", \"description\": \" \"}, \"q1\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"q2\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\néééééééééééééééééééééééééééééééééééééééé\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>assistant\n<|im_end|>\n<|im_start|>user\nHello<|im_end|>\n<|im_start|>user\nsep\u001f padded <|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\nHello

<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\nquote \" and \\ backslash你好,世界 😀<|im_end|>\n<|im_start|>user\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":" "}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{"path0":{"type":"string","description":" padded "},"zz1":{"type":"integer","description":"tab\there"}},"required":["city"]},"strict":true}},{"type":"function","function":{"name":"ls","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"]},"strict":true}}],"add_generation_prompt":false,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"string\", \"description\": \" padded \"}, \"zz1\": {\"type\": \"integer\", \"description\": \"tab\\there\"}}, \"required\": [\"city\"]}, \"strict\": true}}\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n"},{"messages":[{"role":"assistant","content":"\u0000nul","reasoning_content":"Hello","tool_calls":[{"name":"my.tool-1","arguments":{"city":"Oslo"}},{"type":"function","function":{"name":"ünï","arguments":{}}},{"name":"a b","arguments":{"n":1.5,"u":"ünï"}}]},{"role":"user","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":"x trailing"},{"role":"tool","content":null},{"role":"tool","content":"line1\nline2\n\n"},{"role":"tool","content":" padded "}],"tools":[{"type":"function","function":{"name":"ls","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":"你好,世界 😀"}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"preserve_thinking":true},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \"你好,世界 😀\"}}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>assistant\n\nHello\n\n\n\u0000nul\n\n\n\n\nOslo\n\n\n\n\n\n\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n<|im_start|>user\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>user\nx trailing<|im_end|>\n<|im_start|>user\n\n\n\n\nline1\nline2\n\n\npadded\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":null},{"role":"system","content":null},{"role":"assistant","content":"\u0000nul","reasoning_content":"Hello"},{"role":"user","content":null},{"role":"user","content":"quote \" and \\ backslash"},{"role":"user","content":"\u0000nul"}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>assistant\n\nHello\n\n\n\u0000nul<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\n\u0000nul<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"quote \" and \\ backslash"},{"role":"tool","content":null},{"role":"user","content":"{{ not a template }} {% nope %}"}],"tools":[{"type":"function","function":{"name":"search","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":"你好,世界 😀"},"path1":{"type":"string","description":"tab\there"},"city2":{"type":"integer","description":"line1\nline2\n\n"}},"required":["city"]}}},{"type":"function","function":{"name":"ls","description":"Get the weather","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"a b","description":"ünï \"q\"","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":"tab\there"},"path1":{"type":"string","description":" padded "}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"search\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \"你好,世界 😀\"}, \"path1\": {\"type\": \"string\", \"description\": \"tab\\there\"}, \"city2\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \"tab\\there\"}, \"path1\": {\"type\": \"string\", \"description\": \" padded \"}}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\n\n\n<|im_end|>\n<|im_start|>user\n{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"{{ not a template }} {% nope %}"},{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"user","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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.\n\n{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"\u001c\u001dsep\u001f"},{"role":"assistant","content":"tab\there","reasoning_content":null},{"role":"user","content":null},{"role":"user","content":[{"type":"video","video":"x.mp4"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":" nbsp "}]},{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"user","content":null}],"tools":[{"type":"function","function":{"name":"ünï","description":"","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false},"strict":true}}],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n<|im_start|>assistant\n\n\n\n\ntab\there<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n<|vision_start|><|video_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\n<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|> nbsp\n<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":" ideographic "},{"role":"user","content":[{"type":"text","text":"你好,世界 😀"},{"type":"image"}]},{"role":"assistant","content":"\u001c\u001dsep\u001f","reasoning_content":"quote \" and \\ backslash","tool_calls":[{"type":"function","function":{"name":"search","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}},{"type":"function","function":{"name":"get_weather","arguments":{}}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nideographic<|im_end|>\n<|im_start|>user\n你好,世界 😀<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\nquote \" and \\ backslash\n\n\nsep\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"{{ not a template }} {% nope %}"},{"role":"assistant","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image"},{"type":"text","text":" nbsp "},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}],"reasoning_content":"tab\there"},{"role":"user","content":"x trailing"},{"role":"tool","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":""}]},{"role":"tool","content":"

"},{"role":"user","content":[{"type":"text","text":" nbsp "},{"type":"video","video":"x.mp4"},{"text":"x trailing"}]},{"role":"user","content":"你好,世界 😀"}],"tools":[{"type":"function","function":{"name":"a b","description":"Get the weather","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":" padded "}},"required":["city"],"additionalProperties":false},"strict":true}},{"name":"search","description":"","parameters":{"type":"object","properties":{"q0":{"type":"string","description":"你好,世界 😀"},"zz1":{"type":"string","description":" "},"zz2":{"type":"integer","description":"你好,世界 😀"}},"required":["city"],"additionalProperties":false},"strict":true}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"high"},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \" padded \"}}, \"required\": [\"city\"], \"additionalProperties\": false}, \"strict\": true}}\n{\"name\": \"search\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"string\", \"description\": \"你好,世界 😀\"}, \"zz1\": {\"type\": \"string\", \"description\": \" \"}, \"zz2\": {\"type\": \"integer\", \"description\": \"你好,世界 😀\"}}, \"required\": [\"city\"], \"additionalProperties\": false}, \"strict\": true}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\n{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>assistant\n\ntab\there\n\n\n<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|> nbsp <|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\nx trailing<|im_end|>\n<|im_start|>user\n\n<|vision_start|><|image_pad|><|vision_end|>\n\n\n\n<|im_end|>\n<|im_start|>user\nnbsp <|vision_start|><|video_pad|><|vision_end|>x trailing<|im_end|>\n<|im_start|>user\n你好,世界 😀<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":null},{"role":"developer","content":null},{"role":"assistant","content":"{{ not a template }} {% nope %}","reasoning_content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","tool_calls":[{"name":"ls","arguments":{"q":"multi\nline"}}]},{"role":"user","content":"<|im_end|><|im_start|>user"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>assistant\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n\n{{ not a template }} {% nope %}\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"quote \" and \\ backslash"},{"role":"user","content":"tab\there"},{"role":"tool","content":"x trailing"},{"role":"assistant","content":[{"text":""}],"reasoning_content":"quote \" and \\ backslash","tool_calls":[{"name":"my.tool-1","arguments":{"n":1.5,"u":"ünï"}},{"function":{"name":"f"}}]},{"role":"user","content":[{"type":"video","video":"x.mp4"}]},{"role":"assistant","content":"\n{\"temp\": 3}\n"}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{"q0":{"type":"integer","description":" "}},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":"line1\nline2\n\n"},"zz1":{"type":"string","description":""}},"required":["city"],"additionalProperties":false}}},{"type":"function","function":{"name":"get_weather","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"string","description":"Hello"},"city1":{"type":"string","description":"line1\nline2\n\n"}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"reasoning_effort":"xhigh","preserve_thinking":false},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"integer\", \"description\": \" \"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"zz1\": {\"type\": \"string\", \"description\": \"\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"string\", \"description\": \"Hello\"}, \"city1\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\ntab\there<|im_end|>\n<|im_start|>user\n\nx trailing\n<|im_end|>\n<|im_start|>assistant\n\n\n\n1.5\n\n\nünï\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>user\n<|vision_start|><|video_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"tool","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"assistant","content":"\n{\"temp\": 3}\n","reasoning_content":null,"tool_calls":[{"function":{"name":"f"}},{"type":"function","function":{"name":"a b","arguments":{}}},{"type":"function","function":{"name":"a b","arguments":{}}}]},{"role":"user","content":"你好,世界 😀"},{"role":"assistant","content":" padded ","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"n":1.5,"u":"ünï"}}}]}],"tools":[],"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"rendered":"<|im_start|>system\nReasoning 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|>\n\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n{\"temp\": 3}\n\n\n\n\n\n\n\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>user\n你好,世界 😀<|im_end|>\n<|im_start|>assistant\n\n\n\n\npadded\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":" ideographic "},{"role":"assistant","content":"tab\there"},{"role":"user","content":""}],"tools":[{"type":"function","function":{"name":"ünï","description":"Get the weather","parameters":{"type":"object","properties":{"q0":{"type":"string","description":""},"zz1":{"type":"string","description":" nbsp "},"city2":{"type":"string","description":" nbsp "}},"required":["city"]}}},{"type":"function","function":{"name":"ls","description":"","parameters":{"type":"object","properties":{},"required":["city"]}}},{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{"city0":{"type":"string","description":" padded "},"city1":{"type":"string","description":"line1\nline2\n\n"},"city2":{"type":"integer","description":"你好,世界 😀"}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"string\", \"description\": \"\"}, \"zz1\": {\"type\": \"string\", \"description\": \" nbsp \"}, \"city2\": {\"type\": \"string\", \"description\": \" nbsp \"}}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"string\", \"description\": \" padded \"}, \"city1\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}, \"city2\": {\"type\": \"integer\", \"description\": \"你好,世界 😀\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\nideographic<|im_end|>\n<|im_start|>assistant\n\n\n\n\ntab\there<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":[{"type":"image"},{"type":"text","text":"\u0000nul"},{"type":"text","text":""},{"type":"image"}]},{"role":"user","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"user","content":" nbsp "},{"role":"tool","content":"

"},{"role":"assistant","content":[{"type":"text","text":" padded "},{"type":"text","text":"\u001c\u001dsep\u001f"},{"type":"image"}],"tool_calls":[{"type":"function","function":{"name":"my.tool-1","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}}]},{"role":"assistant","content":"\u001c\u001dsep\u001f","tool_calls":[{"type":"function","function":{"name":"my.tool-1","arguments":{"city":"Oslo"}}},{"type":"function","function":{"name":"ls","arguments":{}}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>\u0000nul<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>user\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\npadded \u001c\u001dsep\u001f<|vision_start|><|image_pad|><|vision_end|>\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nsep\n\n\n\n\nOslo\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":" ideographic "},{"role":"system","content":null},{"role":"system","content":[{"type":"text","text":"tab\there"}]},{"role":"user","content":"tab\there"},{"role":"assistant","content":"

","reasoning_content":"<|im_end|><|im_start|>user"}],"tools":{"type":"function"},"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nideographic\ntab\there<|im_end|>\n<|im_start|>user\ntab\there<|im_end|>\n<|im_start|>assistant\n\n<|im_end|><|im_start|>user\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"line1\nline2\n\n"},{"role":"tool","content":"

"},{"role":"assistant","content":"Hello","reasoning_content":null},{"role":"user","content":" padded "},{"role":"assistant","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"\u001c\u001dsep\u001f"},{"text":"tab\there"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":[{"type":"text","text":"line1\nline2\n\n"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"{{ not a template }} {% nope %}"}]}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\nline1\nline2<|im_end|>\n<|im_start|>user\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\nHello<|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|vision_start|><|image_pad|><|vision_end|>\u001c\u001dsep\u001ftab\there<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\nline1\nline2\n\n<|vision_start|><|image_pad|><|vision_end|>{{ not a template }} {% nope %}\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":" padded "},{"role":"assistant","content":[{"type":"text","text":" "},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}],"reasoning_content":"no"},{"role":"user","content":" padded "},{"role":"tool","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":"\n{\"temp\": 3}\n"},{"role":"user","content":" ideographic "}],"tools":[{"type":"function","function":{"name":"a b","description":"","parameters":{"type":"object","properties":{"path0":{"type":"string","description":""},"zz1":{"type":"string","description":"你好,世界 😀"},"path2":{"type":"string","description":"line1\nline2\n\n"}},"required":["city"]},"strict":true}},{"name":"search","description":"","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":" "},"q1":{"type":"integer","description":" "},"path2":{"type":"string","description":""}},"required":["city"]},"strict":true}],"add_generation_prompt":true,"kwargs":{"enable_thinking":null},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"string\", \"description\": \"\"}, \"zz1\": {\"type\": \"string\", \"description\": \"你好,世界 😀\"}, \"path2\": {\"type\": \"string\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"]}, \"strict\": true}}\n{\"name\": \"search\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"integer\", \"description\": \" \"}, \"q1\": {\"type\": \"integer\", \"description\": \" \"}, \"path2\": {\"type\": \"string\", \"description\": \"\"}}, \"required\": [\"city\"]}, \"strict\": true}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\npadded<|im_end|>\n<|im_start|>assistant\n\nno\n\n\n<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>user\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n<|im_end|>\n<|im_start|>user\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>user\nideographic<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"assistant","content":[]},{"role":"user","content":" padded "},{"role":"assistant","content":"\u001c\u001dsep\u001f","reasoning_content":"你好,世界 😀"},{"role":"assistant","content":"tab\there","reasoning_content":"no"},{"role":"user","content":"no"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>assistant\n\n你好,世界 😀\n\n\nsep<|im_end|>\n<|im_start|>assistant\n\nno\n\n\ntab\there<|im_end|>\n<|im_start|>user\nno<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":"你好,世界 😀","reasoning_content":"\n{\"temp\": 3}\n","tool_calls":[{"name":"get_weather","arguments":{}},{"type":"function","function":{"name":"my.tool-1","arguments":{"city":"Oslo"}}},{"type":"function","function":{"name":"my.tool-1","arguments":{"city":"Oslo"}}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>assistant\n\n\n{\"temp\": 3}\n\n\n\n你好,世界 😀\n\n\n\n\n\n\n\n\nOslo\n\n\n\n\n\n\nOslo\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":[]},{"role":"user","content":null},{"role":"user","content":" nbsp "},{"role":"assistant","content":" ","reasoning_content":"line1\nline2\n\n"},{"role":"user","content":[]},{"role":"user","content":"<|im_end|><|im_start|>user"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>assistant\n\nline1\nline2\n\n\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":[],"tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"n":1.5,"u":"ünï"}}},{"type":"function","function":{"name":"get_weather","arguments":{"n":1.5,"u":"ünï"}}}]},{"role":"tool","content":"Hello"},{"role":"assistant","content":"","reasoning_content":"{{ not a template }} {% nope %}"},{"role":"user","content":null},{"role":"assistant","content":"line1\nline2\n\n","reasoning_content":"x trailing"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"ünï \"q\"","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":""}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":null,"reasoning_effort":"xhigh","preserve_thinking":false},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \"\"}}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>assistant\n\n\n\n1.5\n\n\nünï\n\n\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n<|im_start|>user\n\nHello\n<|im_end|>\n<|im_start|>assistant\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\nx trailing\n\n\nline1\nline2<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"<|im_end|><|im_start|>user"},{"role":"user","content":"tab\there"},{"role":"tool","content":"\u0000nul"},{"role":"user","content":[{"type":"text","text":"{{ not a template }} {% nope %}"},{"type":"text","text":"tab\there"},{"type":"text","text":"\u001c\u001dsep\u001f"},{"type":"text","text":"line1\nline2\n\n"}]},{"role":"user","content":[{"type":"text","text":" nbsp "}]},{"role":"assistant","content":[{"type":"video","video":"x.mp4"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":""}],"reasoning_content":"no","tool_calls":[]}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"low"},"rendered":"<|im_start|>system\nReasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.\n\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\ntab\there<|im_end|>\n<|im_start|>user\n\n\u0000nul\n<|im_end|>\n<|im_start|>user\n{{ not a template }} {% nope %}tab\there\u001c\u001dsep\u001fline1\nline2<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>assistant\n\nno\n\n\n<|vision_start|><|video_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"{{ not a template }} {% nope %}"},{"role":"developer","content":"no"},{"role":"system","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"x trailing"}]},{"role":"assistant","content":"quote \" and \\ backslash"},{"role":"tool","content":"x trailing"},{"role":"user","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":"quote \" and \\ backslash"},{"role":"assistant","content":"éééééééééééééééééééééééééééééééééééééééé","reasoning_content":"Hello"}],"tools":null,"add_generation_prompt":false,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n{{ not a template }} {% nope %}\nno\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>x trailing<|im_end|>\n<|im_start|>assistant\n\n\n\n\nquote \" and \\ backslash<|im_end|>\n<|im_start|>user\n\nx trailing\n<|im_end|>\n<|im_start|>user\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>assistant\n\nHello\n\n\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n"},{"messages":[{"role":"developer","content":"<|im_end|><|im_start|>user"},{"role":"user","content":[{"type":"text","text":"quote \" and \\ backslash"},{"type":"text","text":"x trailing"},{"type":"text","text":" "}]},{"role":"user","content":" nbsp "}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":null},"rendered":"<|im_start|>system\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\nquote \" and \\ backslashx trailing<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":[{"text":"no"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\nno<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":"你好,世界 😀","reasoning_content":"tab\there","tool_calls":[{"name":"a b","arguments":{"city":"Oslo"}}]},{"role":"assistant","content":"{{ not a template }} {% nope %}"},{"role":"assistant","content":[{"type":"video","video":"x.mp4"},{"type":"text","text":"\u0000nul"},{"type":"text","text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>assistant\n\ntab\there\n\n\n你好,世界 😀\n\n\n\n\nOslo\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|vision_start|><|video_pad|><|vision_end|>\u0000nulaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":" nbsp "},{"role":"assistant","content":[],"tool_calls":[{"type":"function","function":{"name":"a b","arguments":{"q":"multi\nline"}}},{"name":"search","arguments":{"q":"multi\nline"}}]},{"role":"user","content":" "},{"role":"user","content":"line1\nline2\n\n"},{"role":"assistant","content":"你好,世界 😀","reasoning_content":"\u001c\u001dsep\u001f","tool_calls":[{"function":{"name":"get_weather","arguments":""}},{"type":"function","function":{"name":"ls","arguments":{"q":"multi\nline"}}},{"type":"function","function":{"name":"a b","arguments":{}}}]}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":"Hello"},"city1":{"type":"integer","description":"line1\nline2\n\n"}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \"Hello\"}, \"city1\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n\n\nmulti\nline\n\n\n\n\n\n\nmulti\nline\n\n\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nline1\nline2<|im_end|>\n<|im_start|>assistant\n\nsep\n\n\n你好,世界 😀\n\n\n\n\n\n\n\n\nmulti\nline\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"tool","content":"quote \" and \\ backslash"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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|>\n\n\nquote \" and \\ backslash\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"\u0000nul"},{"role":"user","content":" "},{"role":"user","content":"tab\there"},{"role":"user","content":"no"},{"role":"assistant","content":[{"type":"text","text":"{{ not a template }} {% nope %}"},{"type":"text","text":" nbsp "}],"tool_calls":[{"name":"my.tool-1","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"rendered":"<|im_start|>system\nReasoning 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.\n\n\u0000nul<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\ntab\there<|im_end|>\n<|im_start|>user\nno<|im_end|>\n<|im_start|>assistant\n\n\n\n\n{{ not a template }} {% nope %} nbsp\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":" nbsp "}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"assistant","content":[{"text":"line1\nline2\n\n"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}],"reasoning_content":" nbsp "},{"role":"user","content":"{{ not a template }} {% nope %}"},{"role":"assistant","content":"\u001c\u001dsep\u001f"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":null,"reasoning_effort":"high"},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"get_weather\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>assistant\n\nnbsp\n\n\nline1\nline2\n\n<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>assistant\n\n\n\n\nsep<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"\n{\"temp\": 3}\n"},{"role":"system","content":" nbsp "},{"role":"tool","content":"tab\there"},{"role":"assistant","content":" nbsp ","reasoning_content":"\n{\"temp\": 3}\n"},{"role":"user","content":"\u001c\u001dsep\u001f"}],"tools":[],"add_generation_prompt":false,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n\n{\"temp\": 3}\n\nnbsp<|im_end|>\n<|im_start|>user\n\ntab\there\n<|im_end|>\n<|im_start|>assistant\n\n\n{\"temp\": 3}\n\n\n\nnbsp<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n"},{"messages":[{"role":"tool","content":[{"type":"text","text":"quote \" and \\ backslash"}]},{"role":"user","content":null},{"role":"user","content":"\u001c\u001dsep\u001f"},{"role":"tool","content":"\n{\"temp\": 3}\n"}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{"path0":{"type":"integer","description":" nbsp "},"path1":{"type":"string","description":" nbsp "}},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"reasoning_effort":null},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"integer\", \"description\": \" nbsp \"}, \"path1\": {\"type\": \"string\", \"description\": \" nbsp \"}}, \"required\": [\"city\"]}, \"strict\": true}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n\n\nquote \" and \\ backslash\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n<|im_start|>user\n\n\n{\"temp\": 3}\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"developer","content":" nbsp "},{"role":"system","content":"\n{\"temp\": 3}\n"},{"role":"system","content":"Hello"}],"tools":[],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\nnbsp\n\n{\"temp\": 3}\n\nHello<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":" nbsp "},{"role":"user","content":[{"type":"image"}]},{"role":"tool","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"user","content":"{{ not a template }} {% nope %}"},{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"assistant","content":" ideographic "}],"tools":[{"type":"function","function":{"name":"ünï","description":"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":""},"zz1":{"type":"integer","description":" nbsp "},"q2":{"type":"string","description":" padded "}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":"high"},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \"\"}, \"zz1\": {\"type\": \"integer\", \"description\": \" nbsp \"}, \"q2\": {\"type\": \"string\", \"description\": \" padded \"}}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\n<|vision_start|><|image_pad|><|vision_end|>\n<|im_end|>\n<|im_start|>user\n{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\n\n\n\nideographic<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":"","reasoning_content":"tab\there"}],"tools":[{"type":"function","function":{"name":"search","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"string","description":"Hello"},"q1":{"type":"integer","description":"line1\nline2\n\n"},"city2":{"type":"string","description":""}},"required":["city"]}}},{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":false},"rendered":"<|im_start|>system\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"search\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city0\": {\"type\": \"string\", \"description\": \"Hello\"}, \"q1\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}, \"city2\": {\"type\": \"string\", \"description\": \"\"}}, \"required\": [\"city\"]}}}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>assistant\n\ntab\there\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"developer","content":[{"type":"text","text":"\u001c\u001dsep\u001f"},{"type":"text","text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]},{"role":"assistant","content":"line1\nline2\n\n","reasoning_content":" padded "},{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"assistant","content":[{"type":"text","text":" nbsp "},{"type":"text","text":"\u0000nul"}],"tool_calls":[{"type":"function","function":{"name":"my.tool-1","arguments":{"n":1.5,"u":"ünï"}}}]},{"role":"assistant","content":[{"type":"image"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}],"reasoning_content":" padded "},{"role":"tool","content":[{"type":"text","text":"

"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":" padded "}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":null},"rendered":"<|im_start|>system\nsep\u001faaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>assistant\n\npadded\n\n\nline1\nline2<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>assistant\n\n\n\n\nnbsp \u0000nul\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n<|im_start|>assistant\n\npadded\n\n\n<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\n<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|>\n\n\npadded\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":[{"type":"text","text":"\u001c\u001dsep\u001f"},{"type":"text","text":"\u0000nul"}]},{"role":"developer","content":" nbsp "},{"role":"assistant","content":[{"type":"image"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":" "}]},{"role":"user","content":"x trailing"},{"role":"user","content":"\u0000nul"},{"role":"user","content":"no"},{"role":"assistant","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image"}]},{"role":"assistant","content":"

","reasoning_content":"x trailing"}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false},"rendered":"<|im_start|>system\nsep\u001f\u0000nul\nnbsp<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\nx trailing<|im_end|>\n<|im_start|>user\n\u0000nul<|im_end|>\n<|im_start|>user\nno<|im_end|>\n<|im_start|>assistant\n\n\n\n\n<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\nx trailing\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"system","content":"\u001c\u001dsep\u001f"},{"role":"system","content":"\u0000nul"},{"role":"developer","content":" ideographic "},{"role":"user","content":" nbsp "},{"role":"assistant","content":[],"reasoning_content":" ","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{}}}]},{"role":"assistant","content":"

","reasoning_content":" ","tool_calls":[{"name":"a b","arguments":{"n":1.5,"u":"ünï"}}]},{"role":"tool","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{"preserve_thinking":true},"rendered":"<|im_start|>system\nReasoning 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.\n\nsep\n\u0000nul\nideographic<|im_end|>\n<|im_start|>user\nnbsp<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n<|im_start|>user\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"\n{\"temp\": 3}\n"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"\n{\"temp\": 3}\n"},{"role":"developer","content":"<|im_end|><|im_start|>user"},{"role":"system","content":""},{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":" nbsp "},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"{{ not a template }} {% nope %}"}]},{"role":"tool","content":"quote \" and \\ backslash"},{"role":"user","content":" "},{"role":"tool","content":"{{ not a template }} {% nope %}"}],"tools":[{"type":"function","function":{"name":"ünï","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"]}}},{"name":"ünï","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false}},{"type":"function","function":{"name":"a b","description":"Get the weather","parameters":{"type":"object","properties":{},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ünï\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n{\"name\": \"ünï\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}}\n{\"type\": \"function\", \"function\": {\"name\": \"a b\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\n\n{\"temp\": 3}\n\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|> nbsp <|vision_start|><|image_pad|><|vision_end|>{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>user\n\nquote \" and \\ backslash\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\n\n{{ not a template }} {% nope %}\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":" padded "},{"role":"system","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"user","content":"\u001c\u001dsep\u001f"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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.\n\npadded\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>user\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":"tab\there"},{"role":"user","content":null},{"role":"user","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"assistant","content":"éééééééééééééééééééééééééééééééééééééééé"}],"tools":[{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{},"required":["city"],"additionalProperties":false},"strict":true},{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":" "},"zz1":{"type":"integer","description":" nbsp "},"q2":{"type":"integer","description":"line1\nline2\n\n"}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"], \"additionalProperties\": false}, \"strict\": true}\n{\"type\": \"function\", \"function\": {\"name\": \"my.tool-1\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \" \"}, \"zz1\": {\"type\": \"integer\", \"description\": \" nbsp \"}, \"q2\": {\"type\": \"integer\", \"description\": \"line1\\nline2\\n\\n\"}}, \"required\": [\"city\"], \"additionalProperties\": false}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n<|im_start|>user\ntab\there<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<|im_end|>\n<|im_start|>assistant\n\n\n\n\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"\n{\"temp\": 3}\n"},{"role":"system","content":null},{"role":"user","content":[]}],"tools":[{"type":"function","function":{"name":"ls","description":"Get the weather","parameters":{"type":"object","properties":{"q0":{"type":"integer","description":"Hello"}},"required":["city"]}}},{"name":"search","description":"Get the weather","parameters":{"type":"object","properties":{"path0":{"type":"string","description":""}},"required":["city"],"additionalProperties":false},"strict":true}],"add_generation_prompt":true,"kwargs":{"preserve_thinking":false},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"type\": \"function\", \"function\": {\"name\": \"ls\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"q0\": {\"type\": \"integer\", \"description\": \"Hello\"}}, \"required\": [\"city\"]}}}\n{\"name\": \"search\", \"description\": \"Get the weather\", \"parameters\": {\"type\": \"object\", \"properties\": {\"path0\": {\"type\": \"string\", \"description\": \"\"}}, \"required\": [\"city\"], \"additionalProperties\": false}, \"strict\": true}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n\n\n\n{\"temp\": 3}\n<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"developer","content":"你好,世界 😀"},{"role":"system","content":""},{"role":"user","content":" ideographic "}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"low"},"rendered":"<|im_start|>system\nReasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.\n\n你好,世界 😀<|im_end|>\n<|im_start|>user\nideographic<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":""},{"role":"system","content":null},{"role":"assistant","content":"Hello","reasoning_content":" ","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"q":"multi\nline"}}},{"name":"search","arguments":{"q":"multi\nline"}},{"type":"function","function":{"name":"search","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}}]},{"role":"user","content":" padded "},{"role":"assistant","content":"\u001c\u001dsep\u001f","tool_calls":[{"name":"ls","arguments":{"q":"multi\nline"}},{"type":"function","function":{"name":"a b","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}},{"name":"search","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}]},{"role":"tool","content":""}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"preserve_thinking":true},"rendered":"<|im_start|>assistant\n\n\n\n\nHello\n\n\n\n\nmulti\nline\n\n\n\n\n\n\nmulti\nline\n\n\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n<|im_end|>\n<|im_start|>user\npadded<|im_end|>\n<|im_start|>assistant\n\n\n\n\nsep\n\n\n\n\nmulti\nline\n\n\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n\n\n\n\n1\n\n\n[1, 2]\n\n\n{\"y\": null, \"b\": true}\n\n\n<|im_end|>\n<|im_start|>user\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"tool","content":[{"type":"text","text":"x trailing"}]},{"role":"assistant","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"assistant","content":"Hello","reasoning_content":"\n{\"temp\": 3}\n"},{"role":"user","content":"\u001c\u001dsep\u001f"},{"role":"tool","content":"{{ not a template }} {% nope %}"},{"role":"tool","content":"你好,世界 😀"},{"role":"user","content":[{"type":"text","text":"éééééééééééééééééééééééééééééééééééééééé"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":" "},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]}],"tools":[{"name":"a b","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":""},"city1":{"type":"string","description":" "}},"required":["city"],"additionalProperties":false}},{"name":"search","description":"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":" nbsp "},"city1":{"type":"string","description":"你好,世界 😀"}},"required":["city"]}},{"type":"function","function":{"name":"search","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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.\n\n# Tools\n\nYou have access to the following functions:\n\n\n{\"name\": \"a b\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"string\", \"description\": \"\"}, \"city1\": {\"type\": \"string\", \"description\": \" \"}}, \"required\": [\"city\"], \"additionalProperties\": false}}\n{\"name\": \"search\", \"description\": \"\", \"parameters\": {\"type\": \"object\", \"properties\": {\"zz0\": {\"type\": \"integer\", \"description\": \" nbsp \"}, \"city1\": {\"type\": \"string\", \"description\": \"你好,世界 😀\"}}, \"required\": [\"city\"]}}\n{\"type\": \"function\", \"function\": {\"name\": \"search\", \"description\": \"ünï \\\"q\\\"\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": [\"city\"]}}}\n\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- 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\n<|im_end|>\n\n\nx trailing\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\néééééééééééééééééééééééééééééééééééééééé<|im_end|>\n<|im_start|>assistant\n\n\n{\"temp\": 3}\n\n\n\nHello<|im_end|>\n<|im_start|>user\nsep<|im_end|>\n<|im_start|>user\n\n{{ not a template }} {% nope %}\n\n\n你好,世界 😀\n<|im_end|>\n<|im_start|>user\néééééééééééééééééééééééééééééééééééééééé<|vision_start|><|image_pad|><|vision_end|> <|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"system","content":"tab\there"},{"role":"developer","content":"Hello"},{"role":"system","content":" "},{"role":"assistant","content":[{"type":"text","text":"你好,世界 😀"},{"type":"text","text":"Hello"}],"reasoning_content":"你好,世界 😀","tool_calls":[{"name":"my.tool-1","arguments":{}},{"type":"function","function":{"name":"my.tool-1","arguments":{}}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false},"rendered":"<|im_start|>system\ntab\there\nHello<|im_end|>\n<|im_start|>assistant\n\n你好,世界 😀\n\n\n你好,世界 😀Hello\n\n\n\n\n\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"user","content":null},{"role":"user","content":[{"type":"text","text":"no"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":"{{ not a template }} {% nope %}"},{"role":"tool","content":null}],"tools":{"type":"function"},"add_generation_prompt":true,"kwargs":{"reasoning_effort":"xhigh"},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nno<|vision_start|><|image_pad|><|vision_end|><|im_end|>\n<|im_start|>user\n\n{{ not a template }} {% nope %}\n\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"user","content":" ideographic "},{"role":"assistant","content":null,"reasoning_content":"no"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\nideographic<|im_end|>\n<|im_start|>assistant\n\nno\n\n\n<|im_end|>\n<|im_start|>assistant\n\n"},{"messages":[{"role":"assistant","content":[{"type":"video","video":"x.mp4"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":" ideographic "},{"type":"text","text":"tab\there"}],"reasoning_content":"你好,世界 😀"},{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"tool","content":"\u0000nul"},{"role":"assistant","content":"{{ not a template }} {% nope %}","reasoning_content":"\u001c\u001dsep\u001f"},{"role":"assistant","content":"quote \" and \\ backslash","reasoning_content":"<|im_end|><|im_start|>user","tool_calls":[{"type":"function","function":{"name":"a b","arguments":{"n":1.5,"u":"ünï"}}}]},{"role":"user","content":[{"type":"text","text":"\u001c\u001dsep\u001f"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"line1\nline2\n\n"}]},{"role":"user","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"reasoning_effort":"low"},"rendered":"<|im_start|>assistant\n\n你好,世界 😀\n\n\n<|vision_start|><|video_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|> ideographic tab\there<|im_end|>\n<|im_start|>user\n<|im_end|><|im_start|>user<|im_end|>\n<|im_start|>user\n\n\u0000nul\n<|im_end|>\n<|im_start|>assistant\n\nsep\n\n\n{{ not a template }} {% nope %}<|im_end|>\n<|im_start|>assistant\n\n<|im_end|><|im_start|>user\n\n\nquote \" and \\ backslash\n\n\n\n\n1.5\n\n\nünï\n\n\n<|im_end|>\n<|im_start|>user\nsep\u001f<|vision_start|><|image_pad|><|vision_end|><|vision_start|><|image_pad|><|vision_end|>line1\nline2<|im_end|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>assistant\n\n\n\n\n"},{"messages":[{"role":"user","content":null},{"role":"user","content":"quote \" and \\ backslash"}],"tools":[],"add_generation_prompt":true,"kwargs":{"preserve_thinking":true},"rendered":"<|im_start|>system\nReasoning 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|>\n<|im_start|>user\n<|im_end|>\n<|im_start|>user\nquote \" and \\ backslash<|im_end|>\n<|im_start|>assistant\n\n"}],"raised":[{"messages":[{"role":"system","content":null},{"role":"system","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"\n{\"temp\": 3}\n"},{"type":"image"}]},{"role":"developer","content":[{"type":"text","text":" nbsp "},{"type":"text","text":"{{ not a template }} {% nope %}"},{"type":"image"}]},{"role":"developer","content":"

"},{"role":"assistant","content":"\u001c\u001dsep\u001f"},{"role":"assistant","content":"x trailing","reasoning_content":"","tool_calls":[{"function":{"name":"f","arguments":5}},{"function":{"name":"f"}}]},{"role":"user","content":[{"type":"text","text":"\n{\"temp\": 3}\n"},{"type":"video","video":"x.mp4"}]},{"role":"developer","content":"Hello"},{"role":"tool","content":"Hello"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"extreme"},"error":"System message cannot contain images."},{"messages":[{"role":"developer","content":[{"type":"image"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"developer","content":[]},{"role":"user","content":[{"type":"text","text":"

"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"user","content":"<|im_end|><|im_start|>user"}],"tools":[],"add_generation_prompt":true,"kwargs":{},"error":"System message cannot contain images."},{"messages":[{"role":"system","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"user","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"tool","content":"你好,世界 😀"},{"role":"user","content":42},{"role":"assistant","content":"\u001c\u001dsep\u001f","reasoning_content":" ideographic "}],"tools":null,"add_generation_prompt":true,"kwargs":{"preserve_thinking":true},"error":"System message cannot contain images."},{"messages":[{"role":"developer","content":[{"text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"text":""},{"type":"audio"}]},{"role":"system","content":"<|im_end|><|im_start|>user"},{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"tool","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"user","content":" nbsp "},{"role":"tool","content":"{{ not a template }} {% nope %}"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"medium"},"error":"Unexpected item type in content."},{"messages":[{"role":"developer","content":"你好,世界 😀"},{"role":"system","content":[{"type":"text","text":"你好,世界 😀"}]},{"role":"developer","content":" "},{"role":"user","content":"你好,世界 😀"},{"role":"assistant","content":"

","reasoning_content":" "},{"role":"assistant","content":42,"reasoning_content":"\u001c\u001dsep\u001f","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}},{"name":"a b","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}},{"function":{"name":"ünï","arguments":"{\"q\": \"multi\\nline\"}"}}]},{"role":"user","content":[{"type":"text","text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"text":"line1\nline2\n\n"}]},{"role":"user","content":[]},{"role":"assistant","content":"\u0000nul","reasoning_content":"你好,世界 😀"},{"role":"developer","content":"Hello"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"Get the weather","parameters":{"type":"object","properties":{"q0":{"type":"integer","description":""},"city1":{"type":"integer","description":"tab\there"},"q2":{"type":"string","description":" nbsp "}},"required":["city"]}}},{"type":"function","function":{"name":"search","description":"ünï \"q\"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":" padded "}},"required":["city"],"additionalProperties":false}}}],"add_generation_prompt":true,"kwargs":{},"error":"Unexpected content type."},{"messages":[{"role":"user","content":42},{"role":"tool","content":" padded "},{"role":"user","content":[{"type":"text","text":""}]},{"role":"user","content":" padded "},{"role":"user","content":"no"},{"role":"user","content":" nbsp "},{"role":"tool","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{},"error":"Unexpected content type."},{"messages":[{"role":"developer","content":"\u001c\u001dsep\u001f"},{"role":"system","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]},{"role":"system","content":"Hello"},{"role":"assistant","content":[{"type":"image"},{"type":"text","text":"line1\nline2\n\n"}],"reasoning_content":"\u001c\u001dsep\u001f","tool_calls":[{"function":{"name":"search","arguments":"{\"city\": \"Oslo\"}"}},{"function":{"name":"f","arguments":5}},{"function":{"name":"f"}}]},{"role":"assistant","content":" padded ","reasoning_content":" padded ","tool_calls":[{"function":{"name":"f"}},{"function":{"name":"f","arguments":5}}]},{"role":"assistant","content":"tab\there","reasoning_content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"tool","content":"tab\there"},{"role":"tool","content":" padded "},{"role":"user","content":"Hello"},{"role":"assistant","content":"\u001c\u001dsep\u001f","reasoning_content":"{{ not a template }} {% nope %}"}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"]},"strict":true}},{"type":"function","function":{"name":"ls","description":"","parameters":{"type":"object","properties":{},"required":["city"]}}},{"type":"function","function":{"name":"a b","description":"ünï \"q\"","parameters":{"type":"object","properties":{},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":null},"error":"System message cannot contain images."},{"messages":[{"role":"tool","content":[{"type":"text","text":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"type":"text","text":" padded "}]},{"role":"user","content":"x trailing"},{"role":"developer","content":"你好,世界 😀"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"error":"System message must be at the beginning."},{"messages":[{"role":"user","content":" "},{"role":"tool","content":[{"type":"text","text":"éééééééééééééééééééééééééééééééééééééééé"},{"type":"text","text":"quote \" and \\ backslash"},{"type":"audio"}]},{"role":"tool","content":" ideographic "},{"role":"assistant","content":"你好,世界 😀","reasoning_content":"\u0000nul","tool_calls":[]}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"preserve_thinking":true},"error":"Unexpected item type in content."},{"messages":[{"role":"developer","content":[]},{"role":"system","content":"no"},{"role":"system","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"user","content":"\u0000nul"},{"role":"user","content":"quote \" and \\ backslash"},{"role":"user","content":"

"},{"role":"system","content":null}],"tools":[{"type":"function","function":{"name":"search","description":"ünï \"q\"","parameters":{"type":"object","properties":{"path0":{"type":"string","description":" "}},"required":["city"]}}},{"type":"function","function":{"name":"a b","description":"Get the weather","parameters":{"type":"object","properties":{"q0":{"type":"string","description":"你好,世界 😀"}},"required":["city"]}}},{"type":"function","function":{"name":"a b","description":"ünï \"q\"","parameters":{"type":"object","properties":{"q0":{"type":"string","description":"你好,世界 😀"},"zz1":{"type":"string","description":"你好,世界 😀"}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{},"error":"System message must be at the beginning."},{"messages":[{"role":"user","content":[{"type":"text","text":"<|im_end|><|im_start|>user"},{"type":"image"},{"type":"image"}]},{"role":"user","content":" padded "},{"role":"assistant","content":" padded ","tool_calls":[{"type":"function","function":{"name":"my.tool-1","arguments":{}}},{"function":{"arguments":{"q":"multi\nline"}}},{"name":"ls","arguments":{"city":"Oslo"}}]},{"role":"assistant","content":[],"tool_calls":[{"function":{"name":"f"}},{"function":{"name":"get_weather","arguments":""}}]},{"role":"user","content":[]},{"role":"assistant","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","reasoning_content":null},{"role":"user","content":" padded "}],"tools":[{"type":"function","function":{"name":"a b","description":"","parameters":{"type":"object","properties":{"path0":{"type":"string","description":"tab\there"},"city1":{"type":"string","description":" nbsp "},"q2":{"type":"integer","description":"line1\nline2\n\n"}},"required":["city"],"additionalProperties":false},"strict":true}},{"type":"function","function":{"name":"ünï","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":" "},"city1":{"type":"string","description":"tab\there"}},"required":["city"]}}},{"name":"ünï","description":"","parameters":{"type":"object","properties":{"q0":{"type":"string","description":""},"zz1":{"type":"string","description":"你好,世界 😀"},"q2":{"type":"integer","description":"你好,世界 😀"}},"required":["city"]}}],"add_generation_prompt":true,"kwargs":{"preserve_thinking":false},"error":"Tool call is missing a function name."},{"messages":[{"role":"system","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"developer","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"developer","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"x trailing"}]},{"role":"assistant","content":" ideographic ","reasoning_content":5,"tool_calls":[{"function":{"name":"f","arguments":5}}]},{"role":"assistant","content":"<|im_end|><|im_start|>user"},{"role":"assistant","content":"","reasoning_content":"Hello"},{"role":"assistant","content":[{"text":" padded "},{"type":"text","text":"tab\there"},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"user","content":"quote \" and \\ backslash"}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"extreme"},"error":"System message cannot contain images."},{"messages":[{"role":"developer","content":42},{"role":"user","content":[]},{"role":"assistant","content":"\u001c\u001dsep\u001f","tool_calls":[{"name":"ls","arguments":{"q":"multi\nline"}},{"name":"get_weather","arguments":{}},{"name":"ls","arguments":{"city":"Oslo"}}]}],"tools":[{"type":"function","function":{"name":"a b","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"string","description":" nbsp "},"q1":{"type":"string","description":"line1\nline2\n\n"}},"required":["city"]},"strict":true}},{"type":"function","function":{"name":"my.tool-1","description":"","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":" "},"q1":{"type":"string","description":"line1\nline2\n\n"},"path2":{"type":"string","description":"line1\nline2\n\n"}},"required":["city"]},"strict":true}}],"add_generation_prompt":true,"kwargs":{"reasoning_effort":null},"error":"Unexpected content type."},{"messages":[{"role":"developer","content":null},{"role":"user","content":" padded "},{"role":"assistant","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"system","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"tool","content":" padded "},{"role":"assistant","content":"<|im_end|><|im_start|>user"},{"role":"assistant","content":"\u0000nul","reasoning_content":5,"tool_calls":[{"function":{"arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}},{"function":{"name":"f"}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"reasoning_effort":"extreme","preserve_thinking":false},"error":"Unexpected reasoning effort extreme. Supported types are xhigh (default), medium, and low."},{"messages":[{"role":"user","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"role":"tool","content":" "},{"role":"user","content":"<|im_end|><|im_start|>user"},{"role":"assistant","content":[{"type":"image"}],"reasoning_content":"quote \" and \\ backslash","tool_calls":[{"type":"function","function":{"name":"ls","arguments":{}}},{"function":{"arguments":{"q":"multi\nline"}}},{"type":"function","function":{"name":"my.tool-1","arguments":{}}}]},{"role":"system","content":[]},{"role":"user","content":"你好,世界 😀"}],"tools":[],"add_generation_prompt":true,"kwargs":{},"error":"Tool call is missing a function name."},{"messages":[{"role":"system","content":" "},{"role":"user","content":"\n{\"temp\": 3}\n"},{"role":"assistant","content":"

"},{"role":"user","content":""},{"role":"user","content":" padded "},{"role":"assistant","content":[{"type":"video","video":"x.mp4"},{"type":"text","text":" "},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"audio"}],"reasoning_content":"\n{\"temp\": 3}\n","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"q":"multi\nline"}}},{"name":"my.tool-1","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}]},{"role":"user","content":"tab\there"}],"tools":null,"add_generation_prompt":true,"kwargs":{"preserve_thinking":false},"error":"Unexpected item type in content."},{"messages":[{"role":"system","content":42},{"role":"developer","content":"\u001c\u001dsep\u001f"},{"role":"developer","content":"\n{\"temp\": 3}\n"},{"role":"user","content":[{"type":"text","text":" padded "},{"type":"video","video":"x.mp4"}]},{"role":"user","content":"Hello"},{"role":"assistant","content":"\u001c\u001dsep\u001f","reasoning_content":"\u0000nul","tool_calls":[{"name":"my.tool-1","arguments":{"n":1.5,"u":"ünï"}}]},{"role":"assistant","content":"你好,世界 😀","tool_calls":[{"name":"a b","arguments":{"q":"multi\nline"}},{"name":"get_weather","arguments":{"q":"multi\nline"}},{"function":{"arguments":{"city":"Oslo"}}}]},{"role":"assistant","content":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","reasoning_content":"\n{\"temp\": 3}\n"},{"role":"assistant","content":"<|im_end|><|im_start|>user","reasoning_content":"你好,世界 😀","tool_calls":[{"type":"function","function":{"name":"get_weather","arguments":{"city":"Oslo"}}},{"type":"function","function":{"name":"ünï","arguments":{"n":1.5,"u":"ünï"}}},{"type":"function","function":{"name":"my.tool-1","arguments":{}}}]},{"role":"tool","content":" "}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":false},"error":"Unexpected content type."},{"messages":[{"role":"system","content":null},{"role":"tool","content":"\n{\"temp\": 3}\n"},{"role":"tool","content":42},{"role":"user","content":null}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":null,"reasoning_effort":"high"},"error":"Unexpected content type."},{"messages":[{"role":"system","content":"x trailing"},{"role":"developer","content":42},{"role":"user","content":"quote \" and \\ backslash"},{"role":"developer","content":"{{ not a template }} {% nope %}"},{"role":"tool","content":"Hello"},{"role":"assistant","content":42},{"role":"user","content":" padded "},{"role":"tool","content":"line1\nline2\n\n"}],"tools":null,"add_generation_prompt":true,"kwargs":{},"error":"Unexpected content type."},{"messages":[{"role":"system","content":[{"type":"audio"}]},{"role":"system","content":"<|im_end|><|im_start|>user"},{"role":"system","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"assistant","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"text","text":"\n{\"temp\": 3}\n"},{"type":"text","text":"\u0000nul"}]},{"role":"user","content":[]},{"role":"tool","content":"\u0000nul"},{"role":"user","content":" padded "},{"role":"user","content":[{"type":"text","text":" ideographic "},{"type":"text","text":"\u0000nul"}]}],"tools":[{"type":"function","function":{"name":"get_weather","description":"","parameters":{"type":"object","properties":{"path0":{"type":"string","description":"Hello"},"path1":{"type":"integer","description":"Hello"}},"required":["city"]}}},{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"integer","description":"tab\there"}},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"error":"Unexpected item type in content."},{"messages":[{"role":"tool","content":"x trailing"},{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}},{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"developer","content":"no"},{"role":"system","content":""}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":null},"error":"System message must be at the beginning."},{"messages":[{"role":"system","content":"

"},{"role":"system","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"system","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"user","content":"éééééééééééééééééééééééééééééééééééééééé"},{"role":"assistant","content":"\n{\"temp\": 3}\n","reasoning_content":" nbsp ","tool_calls":[]},{"role":"assistant","content":"<|im_end|><|im_start|>user","reasoning_content":"\n{\"temp\": 3}\n"},{"role":"user","content":null},{"role":"user","content":null},{"role":"tool","content":42},{"role":"assistant","content":" ideographic ","reasoning_content":"你好,世界 😀","tool_calls":[{"function":{"name":"get_weather","arguments":""}}]}],"tools":[{"name":"ünï","description":"","parameters":{"type":"object","properties":{"zz0":{"type":"string","description":"你好,世界 😀"},"zz1":{"type":"integer","description":"tab\there"}},"required":["city"]},"strict":true},{"type":"function","function":{"name":"search","description":"Get the weather","parameters":{"type":"object","properties":{"city0":{"type":"string","description":" padded "},"path1":{"type":"integer","description":" "},"path2":{"type":"string","description":" "}},"required":["city"]},"strict":true}},{"type":"function","function":{"name":"get_weather","description":"Get the weather","parameters":{"type":"object","properties":{},"required":["city"]}}}],"add_generation_prompt":true,"kwargs":{"enable_thinking":false,"reasoning_effort":"xhigh"},"error":"Unexpected content type."},{"messages":[{"role":"developer","content":null},{"role":"developer","content":" nbsp "},{"role":"user","content":null},{"role":"assistant","content":" padded ","reasoning_content":"no"},{"role":"assistant","content":"x trailing","tool_calls":[{"function":{"name":"search","arguments":"{\"city\": \"Oslo\"}"}},{"function":{"name":"ls","arguments":"{\"z\": 1, \"a\": [1, 2], \"m\": {\"y\": null, \"b\": true}}"}},{"type":"function","function":{"name":"ls","arguments":{"q":"multi\nline"}}}]},{"role":"assistant","content":"

"},{"role":"user","content":[{"type":"text","text":"{{ not a template }} {% nope %}"}]}],"tools":[{"type":"function","function":{"name":"my.tool-1","description":"Get the weather","parameters":{"type":"object","properties":{},"required":["city"]}}},{"type":"function","function":{"name":"ls","description":"","parameters":{"type":"object","properties":{"zz0":{"type":"integer","description":"Hello"},"path1":{"type":"integer","description":" "}},"required":["city"]}}}],"add_generation_prompt":false,"kwargs":{},"error":"Tool call arguments for function \"search\" were passed as a JSON string. Parse them into an object before calling apply_chat_template."},{"messages":[{"role":"developer","content":[{"type":"text","text":"éééééééééééééééééééééééééééééééééééééééé"},{"type":"image"},{"type":"text","text":" "}]},{"role":"developer","content":" nbsp "},{"role":"user","content":[{"type":"video","video":"x.mp4"},{"type":"text","text":"\u001c\u001dsep\u001f"}]}],"tools":[],"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"error":"System message cannot contain images."},{"messages":[{"role":"developer","content":""},{"role":"tool","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,AAAA"}}]},{"role":"assistant","content":" ideographic ","tool_calls":[{"name":"ünï","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}},{"name":"ls","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}]},{"role":"developer","content":[{"type":"video","video":"x.mp4"},{"type":"text","text":" ideographic "},{"type":"text","text":"Hello"}]},{"role":"assistant","content":"line1\nline2\n\n","reasoning_content":"line1\nline2\n\n","tool_calls":[{"function":{"name":"a b","arguments":"{\"n\": 1.5, \"u\": \"\\u00fcn\\u00ef\"}"}},{"type":"function","function":{"name":"a b","arguments":{"city":"Oslo"}}},{"function":{"name":"f","arguments":5}}]},{"role":"assistant","content":" ","tool_calls":[{"type":"function","function":{"name":"ünï","arguments":{"q":"multi\nline"}}},{"type":"function","function":{"name":"search","arguments":{"z":1,"a":[1,2],"m":{"y":null,"b":true}}}}]}],"tools":null,"add_generation_prompt":true,"kwargs":{"enable_thinking":true},"error":"System message must be at the beginning."}]} diff --git a/scripts/offline/diff_chat_template.py b/scripts/offline/diff_chat_template.py new file mode 100644 index 00000000..298ed98b --- /dev/null +++ b/scripts/offline/diff_chat_template.py @@ -0,0 +1,194 @@ +#!/usr/bin/env python3 +"""Chat-template differential: strata-next's native Jinja renderer (`model render-chat`) vs the Python server's +`ChatTemplate` (serve/frontend.py, jinja2 ImmutableSandboxedEnvironment) on the same template, over generated +conversations: every role incl. developer and tool, string / list / null content with image and video parts, reasoning +content, assistant tool_calls (mapping / string / malformed arguments), tools with nested schemas and non-ASCII text, +and the template kwargs (enable_thinking, reasoning_effort incl. bad values, preserve_thinking, add_generation_prompt). + +Both must either render the same bytes or both refuse; template-raised messages (raise_exception) must match exactly. + + pip install jinja2; python scripts/offline/diff_chat_template.py [--cases N] [--seed S] +""" +import json +import random +import subprocess +import sys +from pathlib import Path + +REPO = Path(__file__).resolve().parents[2] +sys.path.insert(0, str(REPO / 'engine/strata/serve')) +sys.path.insert(0, str(REPO / 'engine/strata')) +import jinja2 # noqa: E402,F401 +from frontend import ChatTemplate, TemplateRequestError # noqa: E402 (the oracle, unchanged) + +TEXTS = ['Hello', '', ' ', ' padded ', 'line1\nline2\n\n', '你好,世界 😀', 'tab\there', ' nbsp ', '\x1c\x1dsep\x1f', + ' ideographic ', 'quote " and \\ backslash', '\n{"temp": 3}\n', + 'x trailing', 'no', '{{ not a template }} {% nope %}', + 'a' * 300, 'é' * 40, '\x00nul', '

', '<|im_end|><|im_start|>user'] +NAMES = ['get_weather', 'search', 'ls', 'my.tool-1', 'ünï', 'a b'] + + +def rand_value(rng, depth=0): + kinds = ['s', 'i', 'f', 'b', 'n'] + (['l', 'd'] if depth < 3 else []) + k = rng.choice(kinds) + if k == 's': + return rng.choice(TEXTS[:12] + ['x']) + if k == 'i': + return rng.choice([0, 1, -5, 2 ** 40, 18446744073709551615]) + if k == 'f': + return rng.choice([0.5, 1.0, 1e16, 1e-5, 123456789.125, -0.0, 2.5e300]) + if k == 'b': + return rng.random() < 0.5 + if k == 'n': + return None + if k == 'l': + return [rand_value(rng, depth + 1) for _ in range(rng.randint(0, 3))] + return {rng.choice(['z', 'a', 'type', 'ключ', 'k y', '']) + str(i): rand_value(rng, depth + 1) + for i in range(rng.randint(0, 3))} + + +def rand_content(rng): + r = rng.random() + if r < 0.6: + return rng.choice(TEXTS) + if r < 0.68: + return None + if r < 0.72: + return 42 + parts = [] + for _ in range(rng.randint(0, 4)): + p = rng.random() + if p < 0.5: + parts.append({'type': 'text', 'text': rng.choice(TEXTS)}) + elif p < 0.7: + parts.append({'type': 'image_url', 'image_url': {'url': 'data:image/png;base64,AAAA'}}) + elif p < 0.8: + parts.append({'type': 'image'}) + elif p < 0.88: + parts.append({'type': 'video', 'video': 'x.mp4'}) + elif p < 0.94: + parts.append({'text': rng.choice(TEXTS)}) + else: + parts.append({'type': 'audio'}) # unexpected: the template raises + return parts + + +def rand_tool_calls(rng): + calls = [] + for _ in range(rng.randint(1, 3)): + r = rng.random() + args = rng.choice([{}, {'city': 'Oslo'}, {'z': 1, 'a': [1, 2], 'm': {'y': None, 'b': True}}, {'q': 'multi\nline'}, + {'n': 1.5, 'u': 'ünï'}]) + if r < 0.55: + calls.append({'type': 'function', 'function': {'name': rng.choice(NAMES), 'arguments': args}}) + elif r < 0.75: + calls.append({'name': rng.choice(NAMES), 'arguments': args}) + elif r < 0.82: + calls.append({'function': {'name': rng.choice(NAMES), 'arguments': json.dumps(args)}}) + elif r < 0.88: + calls.append({'function': {'name': rng.choice(NAMES), 'arguments': ''}}) + elif r < 0.92: + calls.append({'function': {'arguments': args}}) # no name: raises + elif r < 0.96: + calls.append({'function': {'name': 'f', 'arguments': 5}}) # not an object: raises + else: + calls.append({'function': {'name': 'f'}}) + return calls + + +def rand_messages(rng): + n = rng.randint(1, 7) + messages = [] + leading = rng.choice([0, 0, 1, 2, 3]) + for i in range(leading): + messages.append({'role': rng.choice(['system', 'developer']), 'content': rand_content(rng)}) + for _ in range(n): + role = rng.choices(['user', 'assistant', 'tool', 'system', 'developer', 'robot'], [8, 6, 3, 0.4, 0.3, 0.2])[0] + m = {'role': role, 'content': rand_content(rng)} + if role == 'assistant': + if rng.random() < 0.5: + m['reasoning_content'] = rng.choice(TEXTS + [None, 5]) + if rng.random() < 0.4: + m['tool_calls'] = rand_tool_calls(rng) + elif rng.random() < 0.1: + m['tool_calls'] = [] + messages.append(m) + return messages + + +def rand_tools(rng): + if rng.random() < 0.55: + return None + tools = [] + for _ in range(rng.randint(0, 3)): + schema = {'type': 'object', 'properties': {rng.choice(['city', 'path', 'q', 'zz']) + str(i): { + 'type': rng.choice(['string', 'integer']), 'description': rng.choice(TEXTS[:8])} for i in range(rng.randint(0, 3))}, + 'required': ['city']} + if rng.random() < 0.3: + schema['additionalProperties'] = False + fn = {'name': rng.choice(NAMES), 'description': rng.choice(['Get the weather', 'ünï "q"', '']), 'parameters': schema} + if rng.random() < 0.3: + fn['strict'] = True + tools.append({'type': 'function', 'function': fn} if rng.random() < 0.9 else fn) + return tools if rng.random() < 0.9 else rng.choice([[], {'type': 'function'}]) + + +def rand_kwargs(rng): + kw = {} + if rng.random() < 0.3: + kw['enable_thinking'] = rng.choice([True, False, None]) + if rng.random() < 0.4: + kw['reasoning_effort'] = rng.choice(['low', 'medium', 'high', 'xhigh', 'xhigh', 'extreme', None]) + if rng.random() < 0.2: + kw['preserve_thinking'] = rng.choice([True, False]) + return kw + + +def main(): + args = sys.argv[1:] + cases = int(args[args.index('--cases') + 1]) if '--cases' in args else 3000 + seed = int(args[args.index('--seed') + 1]) if '--seed' in args else 20261014 + binary = str(Path(args[0]).resolve()) + rng = random.Random(seed) + template = ChatTemplate(REPO / 'engine/strata/serve/chat_template.jinja') + requests, expected = [], [] + for _ in range(cases): + req = {'messages': rand_messages(rng), 'tools': rand_tools(rng), + 'add_generation_prompt': rng.random() < 0.9, 'kwargs': rand_kwargs(rng)} + requests.append(req) + try: + expected.append({'ok': template.render(req['messages'], req['tools'], req['add_generation_prompt'], + **req['kwargs'])}) + except TemplateRequestError as e: + expected.append({'error': str(e), 'raised': True}) + except Exception as e: # noqa: BLE001 (jinja2 UndefinedError, TypeError ...: the Python server answers 400/500) + expected.append({'error': f'{type(e).__name__}: {e}', 'raised': False}) + payload = ''.join(json.dumps(r, ensure_ascii=False) + '\n' for r in requests).encode('utf-8') + run = subprocess.run([binary, 'model', 'render-chat'], input=payload, capture_output=True) + if run.returncode: + print('FAIL render-chat exited', run.returncode, run.stderr.decode()[-300:]) + return 1 + got = [json.loads(l) for l in run.stdout.decode('utf-8').split('\n')[:-1]] + bad, both_error, agree_ok = [], 0, 0 + for i, (want, have, req) in enumerate(zip(expected, got, requests)): + if 'ok' in want and 'ok' in have: + if want['ok'] != have['ok']: + bad.append(f'case {i}: bytes differ\n python: {want["ok"]!r}\n rust: {have["ok"]!r}\n request: {json.dumps(req, ensure_ascii=False)[:400]}') + else: + agree_ok += 1 + elif 'error' in want and 'error' in have: + both_error += 1 + if want['raised'] and want['error'] != have['error']: + bad.append(f'case {i}: raise_exception messages differ: {want["error"]!r} vs {have["error"]!r}') + else: + bad.append(f'case {i}: python {list(want)} vs rust {list(have)}: {want.get("error") or have.get("error")}\n request: {json.dumps(req, ensure_ascii=False)[:400]}') + assert len(got) == len(expected) + for b in bad[:12]: + print('FAIL', b) + print(json.dumps({'cases': cases, 'identical_renders': agree_ok, 'both_refused': both_error, 'failures': len(bad), + 'jinja2': jinja2.__version__, 'oracle': 'serve/frontend.py ChatTemplate (unmodified)'})) + return 1 if bad else 0 + + +if __name__ == '__main__': + raise SystemExit(main()) diff --git a/scripts/offline/gen_goldens.py b/scripts/offline/gen_goldens.py index c9349f0f..dacc4ed8 100644 --- a/scripts/offline/gen_goldens.py +++ b/scripts/offline/gen_goldens.py @@ -272,6 +272,33 @@ def setup_policy(): (target / 'setup_policy_oracle.json').write_text(json.dumps(out, separators=(',', ':')) + '\n') +@golden +def chat_template_oracle(): + """Generated conversations (all roles, list content with image parts, tool_calls, tools, kwargs) and what the Python + server's ChatTemplate renders - or the message it raises - for each.""" + import random + import diff_chat_template as D + rng = random.Random(20261014) + template = D.ChatTemplate(REPO / 'engine/strata/serve/chat_template.jinja') + cases = {'ok': [], 'raised': []} + while len(cases['ok']) < 90 or len(cases['raised']) < 25: + req = {'messages': D.rand_messages(rng), 'tools': D.rand_tools(rng), + 'add_generation_prompt': rng.random() < 0.9, 'kwargs': D.rand_kwargs(rng)} + if len(json.dumps(req)) > 2500: + continue + try: + text = template.render(req['messages'], req['tools'], req['add_generation_prompt'], **req['kwargs']) + if len(cases['ok']) < 90: + cases['ok'].append({**req, 'rendered': text}) + except D.TemplateRequestError as e: + if len(cases['raised']) < 25: + cases['raised'].append({**req, 'error': str(e)}) + except Exception: # noqa: BLE001 (jinja2 errors: not part of the contract) + pass + (OUT / 'chat_template_oracle.json').write_text(json.dumps(cases, ensure_ascii=False, separators=(',', ':')) + '\n', + encoding='utf-8') + + def main(): OUT.mkdir(parents=True, exist_ok=True) names = sys.argv[1:] or list(GENERATORS)