fix: handle hook stdin EPIPE#105
Merged
Merged
Conversation
VickyXAI
pushed a commit
that referenced
this pull request
Jul 18, 2026
Two community PRs from @0xCheetah1: - #106: Ctrl+A expands the /model picker to the full live gateway catalog, grouped by provider and ranked by version/tier; Esc no longer quits an idle session (Ctrl+C / /exit do); bare 'claude' shortcut → Opus. - #105: hook child stdin EPIPE now handled via the stream error event (async EPIPE the old sync try/catch missed — latent crash risk); EPIPE ignored (fail-open), other write errors logged. 625 tests pass.
VickyXAI
pushed a commit
that referenced
this pull request
Jul 20, 2026
Adds the gateway's Qwen flagship — $1.475/$4.425 per 1M tokens, 1M context, 65K max output — to pricing, the /model picker, and the provider grouping. Rebased onto main (the PR branch predated #105/#106 and would have reverted Sonnet 5 → 4.6, GPT-5.6 Sol → 5.5, and deleted moonshot/kimi-k3), then carried through every table keyed on a model id, each of which defaults silently when an entry is missing: - Shortcut is `qwen-max`, not bare `qwen`. `qwen` is a long-standing alias for the FREE nvidia/qwen3-next default and repointing it at a paid model both duplicated an object key (TS1117) and moved users onto paid inference without consent. test/local.mjs pins the free aliases at $0. - MODEL_CONTEXT_WINDOWS: 1M. Without it the generic `qwen` fallback returns 128k and compacts ~8x too early. - MODEL_MAX_OUTPUT: 65_536. Without it getMaxOutputTokens() returns the 16K default, and the max_tokens recovery path in loop.ts escalates to 65_536 only to be clamped straight back — truncating long answers and burning USDC on continuation calls that can never succeed. Same gap the kimi-k3 entry above it documents. - getModelGuidance(): the medium branch's bare `qwen` substring predates paid Qwen SKUs and shadowed the strong branch, giving a premium flagship guidance tuned for Haiku/Flash. Free nvidia qwen SKUs stay where they were. - PROVIDER_ORDER / PROVIDER_LABELS: the expanded picker (#106) sorted Qwen last under a raw lowercase heading. Three tests pin the rates, both token tables, the guidance bucket, the paid aliases, and the free-alias-stays-free guardrail. Pre-existing gaps found during review, left for follow-up: the proxy's hardcoded modelCap ladder (src/proxy/server.ts:387) ignores MODEL_MAX_OUTPUT for every model; 5 picker rows still fall through the 128k context default and 11 through the 16K output default.
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
Verification