mirror of
https://github.com/openai/codex.git
synced 2026-11-17 14:58:36 +00:00
[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:
1 parent
5c7624a69e
commit
b6f9aee16d
2 files changed
+8
-8
No files matched your search
@@ -912,7 +912,7 @@ fn many_string_properties(count: usize) -> serde_json::Map<String, serde_json::V
|
||||
fn parse_large_tool_input_schema_compacts_descriptions_only_on_default_path() {
|
||||
let input_schema = serde_json::json!({
|
||||
"type": "object",
|
||||
"description": "x".repeat(4_500),
|
||||
"description": "x".repeat(5_500),
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"$ref": "#/$defs/metadata"
|
||||
@@ -949,7 +949,7 @@ fn parse_large_tool_input_schema_compacts_descriptions_only_on_default_path() {
|
||||
serde_json::to_value(schema).expect("serialize schema"),
|
||||
serde_json::json!({
|
||||
"type": "object",
|
||||
"description": "x".repeat(4_500),
|
||||
"description": "x".repeat(5_500),
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"$ref": "#/$defs/metadata"
|
||||
@@ -978,7 +978,7 @@ fn parse_large_tool_input_schema_ignores_dropped_metadata_for_budget() {
|
||||
"type": "object",
|
||||
"examples": [
|
||||
{
|
||||
"payload": "x".repeat(4_500)
|
||||
"payload": "x".repeat(5_500)
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
@@ -1021,7 +1021,7 @@ fn parse_large_tool_input_schema_ignores_dropped_metadata_for_budget() {
|
||||
fn parse_large_tool_input_schema_stops_after_dropping_root_definitions_when_under_budget() {
|
||||
let schema = parse_tool_input_schema(&serde_json::json!({
|
||||
"type": "object",
|
||||
"description": "x".repeat(4_500),
|
||||
"description": "x".repeat(5_500),
|
||||
"properties": {
|
||||
"event": {
|
||||
"type": "object",
|
||||
@@ -1081,7 +1081,7 @@ fn parse_large_tool_input_schema_stops_after_dropping_root_definitions_when_unde
|
||||
fn parse_large_tool_input_schema_strips_descriptions_without_removing_description_property() {
|
||||
let schema = parse_tool_input_schema(&serde_json::json!({
|
||||
"type": "object",
|
||||
"description": "x".repeat(4_500),
|
||||
"description": "x".repeat(5_500),
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string",
|
||||
@@ -1225,7 +1225,7 @@ fn parse_large_tool_input_schema_prunes_single_composition_variant_if_still_over
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["x".repeat(4_500)]
|
||||
"enum": ["x".repeat(5_500)]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1248,7 +1248,7 @@ fn parse_large_tool_input_schema_prunes_single_composition_variant_if_still_over
|
||||
fn parse_large_tool_input_schema_preserves_object_enum_literal_descriptions() {
|
||||
let schema = parse_tool_input_schema(&serde_json::json!({
|
||||
"type": "object",
|
||||
"description": "x".repeat(4_500),
|
||||
"description": "x".repeat(5_500),
|
||||
"properties": {
|
||||
"choice": {
|
||||
"enum": [
|
||||
|
||||
Reference in new issue
Block a user