github Arthur-Ficial/apfel v0.6.24
v0.6.24 - Fix context overflow error classification

latest releases: v1.8.4, v1.8.3, v1.8.2...
3 months ago

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.

Don't miss a new apfel release

NewReleases is sending notifications on new releases.