v0.6.24 - Fix context overflow error classification
Bug fix
- Fix: Context overflow errors now correctly return HTTP 400 (
context_length_exceeded) instead of HTTP 500 (server_error). Fixes #13.
The error classification didn't recognize re-thrown ApfelError instances, causing them to fall through to .unknown (500). Now passes through the original error unchanged.
Before: 500 - "The operation couldn't be completed. (ApfelCore.ApfelError error 3.)"
After: 400 - "Input exceeds the 4096-token context window. Shorten the conversation history."
Clients sending oversized system prompts (like opencode's ~45KB default) now get a clear, actionable error instead of a cryptic 500.