mirror of
https://github.com/openai/codex.git
synced 2026-05-05 22:01:37 +03:00
Avoid double truncation (#6631)
1. Avoid double truncation by giving 10% above the tool default constant 2. Add tests that fails when const = 1
This commit is contained in:
@@ -9,6 +9,8 @@ pub mod runtimes;
|
||||
pub mod sandboxing;
|
||||
pub mod spec;
|
||||
|
||||
use crate::context_manager::MODEL_FORMAT_MAX_BYTES;
|
||||
use crate::context_manager::MODEL_FORMAT_MAX_LINES;
|
||||
use crate::context_manager::format_output_for_model_body;
|
||||
use crate::exec::ExecToolCallOutput;
|
||||
pub use router::ToolRouter;
|
||||
@@ -75,5 +77,5 @@ pub fn format_exec_output_str(exec_output: &ExecToolCallOutput) -> String {
|
||||
};
|
||||
|
||||
// Truncate for model consumption before serialization.
|
||||
format_output_for_model_body(&body)
|
||||
format_output_for_model_body(&body, MODEL_FORMAT_MAX_BYTES, MODEL_FORMAT_MAX_LINES)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user