Constants§
- CLAUDE_
MAX_ PROMPT_ SIZE - Maximum prompt size for Claude-based agents.
- GLM_
MAX_ PROMPT_ SIZE - Maximum prompt size for GLM-like agents (GLM, Zhipu, Qwen,
DeepSeek). - MAX_
SAFE_ PROMPT_ SIZE - Maximum safe prompt size in bytes before pre-truncation.
Functions§
- effective_
model_ budget_ bytes - model_
budget_ bytes_ for_ agent_ name - Get the maximum safe prompt size for a specific agent.
- truncate_
diff_ if_ large - Truncate diff if it’s too large for agents with small context windows.
- truncate_
diff_ to_ model_ budget - truncate_
lines_ to_ fit