agent: increase tool result hard limit from 32KB to 128KB
This commit is contained in:
parent
3f9f4753ef
commit
c1888d31fe
|
|
@ -37,12 +37,12 @@ const (
|
||||||
// Truncation stack (from outer to inner):
|
// Truncation stack (from outer to inner):
|
||||||
// - Server 10MB (toolsrv/shell.go limitedWriter): OOM safety. Prevents runaway
|
// - Server 10MB (toolsrv/shell.go limitedWriter): OOM safety. Prevents runaway
|
||||||
// process output from exhausting memory. Well above model limit.
|
// process output from exhausting memory. Well above model limit.
|
||||||
// - Agent 32KB (this constant): The model-facing cap. Applied in two places:
|
// - Agent 128KB (this constant): The model-facing cap. Applied in two places:
|
||||||
// streaming path (caps real-time chunks sent to UI) and post-hoc (caps stored
|
// streaming path (caps real-time chunks sent to UI) and post-hoc (caps stored
|
||||||
// result). Both use this constant — it's one policy, two enforcement points.
|
// result). Both use this constant — it's one policy, two enforcement points.
|
||||||
// - Detach 64KB ring (toolsrv/detach.go): Separate system for background
|
// - Detach 64KB ring (toolsrv/detach.go): Separate system for background
|
||||||
// processes. Unrelated to the model context.
|
// processes. Unrelated to the model context.
|
||||||
const defaultToolResultMaxBytes = 32 * 1024
|
const defaultToolResultMaxBytes = 128 * 1024
|
||||||
|
|
||||||
// MemoryTier classifies how long a tool result stays in the hot message list.
|
// MemoryTier classifies how long a tool result stays in the hot message list.
|
||||||
type MemoryTier int
|
type MemoryTier int
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue