-
Stefy Lanza (nextime / spora ) authored
Add a model-level max_tokens authority: per-model models.json "max_tokens" wins, else a new node-wide models.max_tokens (default None = no cap). A client's requested max_tokens is honored only when it is SMALLER than the model-level cap; a larger or absent request is clamped to the model-level value. Applied before auto-compaction so the window-fit trim works off the clamped value. When no cap is configured, behavior is unchanged (client value, or the 2048 fallback). Co-Authored-By:
Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
3ea876db