Replace string pool keys and map-based credit state with SHA-256
digest keys and sorted slice members holding weight, current, and
pending credits in a single allocation. Reservations now retain
only the member index instead of a weights map and auth ID.
Verify full pool identity on digest hits and chain collisions so
unrelated candidate pools never share credits or weights. Update
tests to access pool credits through test helpers.
Charge session-affinity hits, parent inheritance, LCP matches,
and pinned requests against the eligible weighted pool without
moving existing bindings, so new sessions favor under-served
credentials and request ratios stay approximately weighted.
Scope settled credits per eligible credential set, capped at
+/-32 pool rounds, with in-flight reservations that commit on
local selection success and release on failure.
Map IsFork metadata to X-Node-Kind: fork when dispatching to
Home so forked sessions keep their lineage kind alongside
explicit kinds such as compaction. Clone dispatch headers
before adding the Home-only header to avoid mutating caller
headers, and cover fork, compaction, and ordinary children
with session hierarchy tests.
- Normalize model state, scheduler shard, and cooldown lookups case-insensitively while preserving stored model key casing.
- Atomically migrate route-alias cooldowns to the resolved upstream model key when OAuth model aliases or credentials are updated.
- Add regression tests covering mixed-case alias targets, pre-existing alias cooldown migration, and concurrent persistence windows.
Closes: #7360
- Add optional credential_scoped metadata and documented routing/cooldown error code constants to pluginabi.Error so plugin executors can report account-wide 429 limits.
- Preserve credential-scoped classification on rpcError across synchronous RPC envelopes and streaming error callbacks while prioritizing credential quota scope over model-only or cooldown-skipping error codes.
- Recognize credential_quota error codes in core auth cooldown classification and cover whole-credential cooldown propagation and error events with regression tests.
Closes: #7359
- Revert post-message_stop response body draining and detachable request context from Claude streaming execution so completed streams close immediately instead of returning connections to the idle pool.
- Set MaxIdleConnsPerHost to -1 on the default Claude Code uTLS transport to disable idle connection reuse for OAuth and unpooled credentials while preserving the Connection: keep-alive wire header and explicit connection-pool opt-in.
- Add regression tests verifying short-lived default Claude Code connections, explicit per-key pool reuse, and non-reused streaming connections.
Closes: #7357
- Add the "never" option for routing.session-affinity-rebind-on to preserve established session bindings across all credential failures and refuse cross-credential failover across primary, fallback-key, and Merkle LCP paths.
- Scope retry rounds and Antigravity credits fallback to the bound credential under "never" mode, returning 503 session_auth_retry on transient unavailability and 429 or upstream errors on quota/auth blocks.
- Add unit and end-to-end regression tests covering selector refusal, retry rounds, empty candidate sets, Antigravity credits fallback, and runtime config reload.
Closes: #7348
- Accept refresh=true or refresh=1 on the plugin store listing endpoint to bypass the 1-hour latest-release cache TTL for installed plugins.
- Track last check timestamps on release cache entries with a 10-second per-key refresh floor while preserving GitHub rate-limit cooldowns and in-flight coalescing.
- Add unit tests and update v8 management API documentation for the refresh query parameter.
Closes: #7333
- Track SSE event newline boundaries across streamed image chunks and suppress keep-alive comments while inside an incomplete SSE event.
- Reset streaming keep-alive tickers when downstream bytes are written and ensure terminal error events start on a clean SSE boundary.
Closes: #7330
- Map explicit output_config.effort to reasoning_effort in ConvertClaudeRequestToOpenAI when the thinking object is omitted.
- Preserve existing budget_tokens, disabled thinking, model suffix, and final payload rule precedence across translation and thinking stages.
- Add regression tests for standalone effort translation, chained thinking normalization, and finalized OpenAICompatExecutor payloads.
Closes: #7327
- Add NewDetachableContext in executor helpers so upstream requests follow downstream cancellation until message_stop and detach afterward before the handler cancels the request context.
- Close the output stream channel first and then drain up to 64 KiB of the remaining raw upstream response body to EOF so net/http returns completed streaming connections to the idle pool.
- Treat valid message_stop data lines in the translated streaming path as completion before translation so terminal-event cancellation does not abort connection pooling.
Closes: #7326
- Ignore whitespace-only reasoning deltas and non-streaming reasoning entries when no thinking block is currently active so Anthropic-incompatible blank thinking blocks are never emitted.
- Allow whitespace reasoning segments to extend already-open streaming thinking blocks, tool-call-buffered thinking chunks, and non-streaming thinking builders.
- Add streaming and non-streaming regression tests covering whitespace-only and intra-thought whitespace reasoning.
Closes: #7325
Preserve unknown refresh recovery state without inventing an access-token rejection. Evaluate availability for the requested partition and block missing tokens before model-level selection in both auth guards.
Cover partial refresh and later inference through real OAuth HTTP responses, CodexExecutor, and Manager execution. Auth, executor, integration, race, and build checks pass. The full suite encounters an existing WebSocket temporary-log cleanup race, reproduced on clean dev.
- Treat empty-text thoughtSignature carrier parts as non-content payloads in Gemini and Antigravity OpenAI Chat Completions response translators so trailing signature parts do not overwrite earlier deltas.
- Accumulate reasoning_content and content across all parts within a candidate chunk using strings.Builder before writing the delta fields.
- Add regression tests covering trailing empty-text signature parts and multi-part thought and text concatenation.
Closes: #7315
- Emit mid-session text-only system and developer message items as role=system turns immediately after the next user message while preserving source order for top-level fallbacks.
- Pin system item placement in the Claude executor before translation so legacy models, strict or uncloaked wire policies, mid-system rebuilds, and local token counts retain the top-level path.
- Centralize the legacy system-reminder model allowlist in internal/util for shared lookup across the translator and executor.
Closes: #7310
Use a Claude-specific 256-bit base64url state for CLI and management logins. Include the native Console scope only during authorization while preserving existing token refresh scopes. Cover callback state preservation and case-sensitive session checks. Refs #7316.
- Flatten nested custom tool definitions and grammar formats into Responses API declarations while resolving nested names for tool choice, shortening, reverse mapping, and conversation history.
- Normalize nested custom tool declarations when collecting response metadata so custom apply_patch calls emit the JSON input wrapper across streaming and non-streaming responses.
Closes: #7300
- Raise positive integer max_output_tokens below 16 to the Codex minimum on the translated payload across HTTP and WebSocket paths, before user payload rules.
- Send inference verification with a 16-token budget so healthy Codex OAuth credentials are no longer rejected by the upstream minimum.
- Add regression coverage for VerifyInference and small budgets from every Codex source format.
Closes: #7304
Report the OAuth login entry a credential was signed in through, resolved
from Attributes then Metadata via oauth_provider and portal and normalized
the way sign-in and re-login already resolve it. A console can then group
credentials of a multi-entry plugin by entry instead of by provider.
The field is v8-only, so the deprecated /v0/management/auth-files response
keeps its frozen shape, and it is omitted when a credential carries no
entry, leaving built-in providers, single-entry plugins and files written
before #7126 unchanged. type and provider stay as they are because routing
and quota lookup key on them.
Fixes#7307
- Preserve refresh failure stages and prevent immediate or later grant replay.
- Coordinate durable claims and recovery receipts across file, PostgreSQL, Git, and S3 stores.
- Add regression coverage for retries, concurrency, persistence, and recovery.
Closes: #7289
- Detect compaction_trigger in DevinExecutor Execute/ExecuteStream, generate the summary through the same Devin model, and synthesize a sealed single-item compaction response and SSE stream via the shared helpers.
- Expand replayed CPA compaction capsules into summary context before translation and drop foreign compaction items, so repeated compaction keeps prior context.
- Add a native Devin regression test covering streaming/non-streaming triggers, summary history and tool preservation, payload-rule final barrier, capsule replay, repeated compaction, and OriginalRequest-only triggers.
Closes: #7291
Treat preserved terminal responses as request-scoped unless the executor
marks a credential-specific rejection. Reuse the existing request error
policy to stop credential retries, unauthorized refresh, and cooldown
without changing explicit continue rules or ordinary failover.
End stopped Home stream selections without waiting for a redispatch
release acknowledgement that could replace the original response.
Cover local and Home execute, count, stream and bootstrap paths, exact
response preservation, missing release acknowledgements, and terminal
401 refresh suppression.
Refs: router-for-me/CLIProxyAPIHome#178
- Raise small Claude output budgets to the Codex minimum before payload rules.
- Cover model selection and budget boundaries across HTTP and WebSocket paths.
Closes: #7282
- Place Gemini tool results in user messages while preserving call pairing.
- Omit incompatible thought signatures and normalize native Base64 for Go clients.
Closes: #7279
- Register gpt-6-chat-thinking with 272k context, 128k max completion tokens, and thinking levels (low/medium/high/xhigh/max) across four model groups.
- Enable native web_search capability and configuration update support for the new model entry.