February 12, 20260.1.23Jugg.ai
v0.1.23 — fix: correct Sonnet 4.5 max_tokens and add serverMaxTokens safety
Release v0.1.23: Fix Sonnet 4.5 Token Limits & Add Safety Clamp
February 12, 2026
What changed
- Bug fix: Claude Sonnet 4.5
maxOutputTokenscorrected from 16,384 → 64,000. Agents using this model were limited to 25% of their actual output capacity. - Safety mechanism: New
serverMaxTokensfield on all 11 models tracks the hard ceiling enforced by each provider's API. NewgetSafeMaxTokens()utility clamps requests to this ceiling, preventing API errors. - Base agent updated:
createAgentFunction()now usesgetSafeMaxTokens()instead ofgetMaxOutputTokens()for all API calls. - Test coverage: 20 new Vitest tests covering model lookups, token limit correctness, clamping behavior, and registry consistency.
Why it matters
Sonnet 4.5 agents can now use their full 64k output token capacity. The safety clamp ensures no model can accidentally request more tokens than its API allows, eliminating a class of silent failures.
Technical notes
- Fully backward compatible —
getMaxOutputTokens()still exported,serverMaxTokensis optional onModelDefinition - No database or schema changes
Release Notes
Successfully merged PR #63 and published release v0.1.23.
What was released:
- Bug Fix: Corrected Claude Sonnet 4.5
maxOutputTokensfrom 16,384 → 64,000 (was only 25% of actual capacity) - Safety Mechanism: Added
serverMaxTokensfield andgetSafeMaxTokens()utility to prevent API errors from exceeding provider-enforced token limits across all 11 models - Test Suite: Added 20 Vitest test cases covering the model registry, token limits, and consistency checks
- Vitest Config: New
vitest.config.tswith path alias support
Details:
- PR #63 merged via squash merge (sha: 28d2cce2)
- Release: https://github.com/dwdavies/AnyApp/releases/tag/v0.1.23
- Tag: v0.1.23
- Fully backward compatible — no breaking changes