Improved ChatGPT/OpenAI-compatible connection rate-limit handling, caching, and diagnostics - #168
Merged
oleg68 merged 2 commits intoJul 21, 2026
Conversation
Starting work on OpenAI proxy rate-limit error classification and prompt-caching improvements. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ching, and diagnostics Bundles the ChatGPT-subscription rate-limit investigation and follow-up work: - Classified OpenAI-compatible rate-limit/quota errors as rate_limit_error so Claude Code reports them immediately instead of retrying up to 10 times - Keyed prompt_cache_key to Claude Code's own stable session id (instead of an internal id that rotated on every restart) so caching survives Continue/Resume session, and enabled it for the OpenAI-compatible connection type, which previously sent no cache key at all - Added an experimental per-model "Explicit Cache" option in Model Aliases for GPT-5.6-family models, defaulting on for that family; older GPT models get extended 24h cache retention instead - Detected empty completions from the provider (e.g. when a conversation grows too large for the model's context/output limit) and substituted an explanatory notice, including the size of the triggering request, instead of silently returning to the idle prompt - Added a "Session Statistics…" context menu item (prompt area and terminal) showing per-model cumulative token/cache usage and last-request size, shown only for sessions using the OpenAI-compatible or ChatGPT Subscription connection types - Clarified in the user manual that /usage never reflects ChatGPT subscription quota, since no account-wide usage endpoint is queried Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
oleg68
deleted the
feature/openai-proxy-rate-limit-and-cache-improvements
branch
July 21, 2026 19:02
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
rate_limit_errorso Claude Code reports them immediately instead of retrying up to 10 timesprompt_cache_keyto Claude Code's own stable session id (survives Continue/Resume session) and enables it for the OpenAI-compatible connection type, which previously had none/usagenever reflects ChatGPT subscription quotaTest plan
mvn test— 1016 tests passingmvn package/mvn nbm:nbm— builds successfully🤖 Generated with Claude Code