Fix bugs from comprehensive code review (v0.3.1) - #11
Merged
Merged
Conversation
Addresses findings from Gafton, Margo, and Scout reviewers across 8 files: - Fix SSE streaming: add \n\n delimiters (were dropping blank-line separators) - Fix streaming errors: yield SSE error events instead of crashing silently - Add CancelledError handling to vLLM streaming (was leaking connections) - Replace vLLM assert with RuntimeError (safe under python -O) - Fix vLLM constrained decoding schema (arguments as string, not object) - Replace bare _in_flight counter with _RequestCounter class - Graceful backend startup (tolerate failures, don't crash app) - Add 5s timeout to backend shutdown (prevent hanging) - Add per-chunk streaming timeout (60s, prevents stalled backend hangs) - Ensure content field in synthesized SSE delta (OpenAI client compat) - Classify HTTP errors in retry loop (4xx=permanent, 5xx/timeout=retry) - Increase retry budget minimum buffer from 10s to 20s - Fix pythonic rescue regex to handle quoted strings with parens - Try all bracket groups in rescue (not just first match) - Skip appending empty escalation summary message - Bound _think_re_cache with lru_cache(maxsize=32) - Fix temperature_override default (None=passthrough, not 0.0) - Filter additionalProperties in jsonschema validation (was double-reporting) All 77 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive bug fix release addressing findings from three independent code reviewers (Gafton, Margo, Scout). Fixes span 8 source files across reliability, correctness, and edge case handling.
HIGH severity fixes
\n\ndelimiters between events (were malformed — missing blank-line separators)0.0toNoneso profiles without it passthrough client temperatureMEDIUM severity fixes
contentpresent in synthesized SSE delta (OpenAI client compat)python -Oargumentstyped as string (not nested object) for constrained decodingLOW severity fixes
_think_re_cache: Bounded withlru_cache(maxsize=32)instead of unbounded dictadditionalPropertieserrors from jsonschema (was double-reporting)_in_flightcounter: Encapsulated in_RequestCounterclass with drain eventVersion bump
0.3.0→0.3.1Test plan
🤖 Generated with Claude Code