web_search 的 maxResults 类型错回显改用 not_text_repr

- direct_tool_bridge 里 MaxResultsNotInteger.got 由 value.to_string() 换成 not_text_repr(value)
- 与 query 的 QueryNotText 一致:不受信回显按 120 字符截断,不再把整段值带进错误消息与序列化 typed error
This commit is contained in:
2026-10-01 17:54:51 +08:00
parent 75e3152412
commit 47b6454696
@@ -3490,7 +3490,7 @@ pub(in crate::agent) fn web_search_input(
Some(value) => value
.as_u64()
.ok_or_else(|| WebSearchError::MaxResultsNotInteger {
got: value.to_string(),
got: not_text_repr(value),
max: DIRECT_TOOL_BRIDGE_MAX_SEARCH_RESULTS as u64,
})?,
};