fix: dont compact standalone websearch schema (#24660)

add new `parse_tool_input_schema_without_compaction` to bypass the
existing compaction/trimming of client-provided tool schemas that are
over 4k bytes.

we want this for standalone web search to keep field guidance/metadata
on certain fields; this keeps us closer to parity with existing hosted
tool schema (which didnt go through this 4k byte filter).
This commit is contained in:
sayan-oai
2026-05-27 01:05:19 +00:00
committed by GitHub
parent 0d37db4b2b
commit 9fe55d68e6
6 changed files with 53 additions and 10 deletions
@@ -112,9 +112,12 @@ async fn standalone_web_search_round_trips_encrypted_output() -> Result<()> {
assert_eq!(requests.len(), 2);
let first_response = requests[0].body_json();
assert!(
requests[0].tool_by_name("web", "run").is_some(),
"web.run should be sent to the model"
let web_run = requests[0]
.tool_by_name("web", "run")
.context("web.run should be sent to the model")?;
assert_eq!(
web_run.pointer("/parameters/properties/time/description"),
Some(&json!("Get time for the given UTC offsets."))
);
assert!(
!has_hosted_web_search(&first_response),