Repository navigation
feat: stabilize custom Claude routing and quota failover - #156
baoluong2900 wants to merge 7 commits into
Conversation
Integrate external Anthropic/OpenAI routing on top of the latest stream-integrity fixes, with account cooldown enforcement, bounded Retry-After handling, circuit breaker admission, stop-hook normalization, and admin configuration.
|
Follow-up review fixes pushed in ce47c6b: Kiro endpoint fallback now retains the longest bounded Retry-After across all 429 responses, with a multi-endpoint regression test. The branch remains green on go test ./..., go vet ./..., and go build. |
|
Final review hardening pushed in 76e6398: buffered native Claude and OpenAI external responses are now fully read before committing headers or closing the circuit. A body-read/truncation error returns to the Kiro fallback with an untouched client response. Regression tests cover both helpers, including targeted race runs. Full tests, vet, and build remain green. |
|
Additional cleanup pushed: 7cf492c removes duplicate completed-request logging for retryable external attempts; 0648fcb restores deterministic per-request proxy-environment evaluation (fixing the full-suite proxy regression). Current verification: go test ./..., go vet ./..., go build, targeted race tests, and Docker build kiro-go:pr156-verify all pass. |
|
Completed the remaining buffered-response review coverage in 7400fdf: stop-hook normalization and Claude-to-OpenAI bridge now fully read the upstream body before circuit success or response commit; read/truncation failures cleanly return to Kiro fallback. New regression tests pass, including targeted race runs. Full go test ./..., vet, and build remain green. |
|
Stream completion hardening pushed in 34c33d3: native Claude and OpenAI external streams no longer close the circuit or log success when the upstream body terminates with a non-EOF read error after response commit. Such requests are recorded failed and feed the circuit breaker; regression and targeted race tests cover both paths. Full tests, vet, and build remain green. |
Summary
Verification
This supersedes #155, which was based on an older main and became conflicted after the stream-integrity merges.