feat: Cascade reuse optimization for single-user setups & HTTPS proxy#181
Open
Fermiz wants to merge 1 commit into
Open
feat: Cascade reuse optimization for single-user setups & HTTPS proxy#181Fermiz wants to merge 1 commit into
Fermiz wants to merge 1 commit into
Conversation
- Add HTTPS reverse proxy (HTTP/2 + HTTP/1.1) with CORS for Office plugins - Add CASCADE_REUSE_BY_CALLER env var for session-pinned cascade reuse - Add CASCADE_POOL_MAX env var to configure pool size (default 500) - Add modelKey to pool entries for caller-based fallback lookup - Add local-setup.md with step-by-step HTTPS setup guide - Add *.pem to .gitignore
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
This PR improves cascade conversation reuse for personal/single-user setups (e.g., Claude Code, Claude Desktop, Claude for Office plugins) and adds an HTTPS reverse proxy for clients that require TLS.
Problem
When using WindsurfAPI with Claude Code in a single-user setup:
Changes
Caller-based cascade reuse fallback
CASCADE_REUSE_BY_CALLER=1: adds a secondary index(callerKey + model) -> cascadein the conversation poolConfigurable pool size
CASCADE_POOL_MAX=N(default 500): set to1-5for single-user setups to minimize memory usageHTTPS reverse proxy
https-proxy.js: lightweight HTTP/2 + HTTP/1.1 reverse proxy with full CORS supportmkcertfor locally-trusted certificatesDocumentation
local-setup.md: step-by-step guide for HTTPS setup with mkcert.env.example,README.md,README.en.mdwith new env varsRecommended .env for single-user personal use
Files changed
src/conversation-pool.js— configurable pool max, caller-based fallback indexsrc/handlers/chat.js— pass modelKey to pool checkout/checkinhttps-proxy.js— new HTTPS reverse proxylocal-setup.md— setup guide.env.example,.gitignore,README.md,README.en.md— docsTesting