[codex] increase tool schema compaction threshold (#31497)

## Why

The 4,000-byte limit is compacting the tool schemas of some hero
usecases.

## What changed

Raise the limit to 5,000 bytes and update compaction test fixtures
accordingly.
This commit is contained in:
fbauer33 authored and GitHub committed 2026-07-08 15:14:23 -07:00
1 parent 5c7624a69e
commit b6f9aee16d
2 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ fn deserialize_tool_input_schema(input_schema: JsonValue) -> Result<JsonSchema,
// Use compact normalized JSON bytes as a cheap local proxy for the 1k-token
// schema budget.
const MAX_COMPACT_TOOL_SCHEMA_BYTES: usize = 4_000;
const MAX_COMPACT_TOOL_SCHEMA_BYTES: usize = 5_000;
const MAX_COMPACT_TOOL_SCHEMA_DEPTH: usize = 3;
/// Shrink unusually large tool schemas while preserving the top-level argument