- Attach request-scoped web search result cache lookup before Responses to Claude request translation so cached search hits are restored before evaluating turn citations.
- Strip web_search_result_location citations from assistant text blocks whenever a web_search_tool_result in the same assistant turn ends up without content while preserving the response text.
Closes: #7213
- Reset supports_image_detail_original to false in nullCodexClientRequiredOptions and non-template modality metadata while preserving image input modalities.
- Add regression coverage ensuring Claude and non-Codex routes advertise supports_image_detail_original as false while pure Codex template models keep it enabled.
Closes: #7209
- Map upstream safety and content-filter finishReason values to Claude stop_reason "refusal" across streaming, non-streaming, and grounded web search response paths while preserving tool_use precedence.
- Prevent trailing streaming chunks with an empty finishReason from overwriting a previously recorded non-empty finishReason while keeping HasFinishReason set so buffered web search text still drains.
- Add unit tests covering non-streaming refusal mappings, empty-part streaming safety refusals, trailing empty finishReason chunks, and grounded web search finish reasons.
Closes: #7201
- Rewrite embedded exec_command and write_stdin phrases across all Devin tool descriptions regardless of tool name or mixed occurrences so Codex code-mode exec tools are not rejected.
- Classify Devin MCP configuration and content-policy 403 permission_denied errors as request faults in clienterror.IsRequestFault so the conductor neither retries nor cools down credentials.
Closes: #7198
- Treat a rejected overage or 7d_oi response with an allowed 7d window and omitted 5h headers as model-scoped while keeping present malformed or exhausted 5h utilization credential-scoped.
- Add unit and executor regression tests verifying that Fable weekly rejections without 5h headers do not cool the credential or block sibling Opus requests.
Closes: #7197
- Defer refresh scheduling to access token expiry or unschedule when a disabled credential encounters a terminal refresh error or holds an unchanged rejected refresh token.
- Preserve access token expiry scheduling on early return in refreshAuthForRequestAtEpoch and retain StatusDisabled when expired disabled credentials are unscheduled.
- Add regression coverage verifying disabled Codex credentials with rejected refresh tokens and unexpired access tokens do not spin the auto-refresh loop.
Closes: #7183
- Replace tidwall/gjson and tidwall/sjson with github.com/MoeForge/moego/ojson
and encoding/base64 with github.com/MoeForge/moego/base64 across the main
module and examples
- Introduce cross-method *ojson.Doc request rewriting pipelines across
thinking, signature, client/codex, runtime/executor/helps, pluginhost, and
all provider executors with FinalizePayloadDoc as the final semantic barrier
- Convert all consecutive JSON mutations (>= 2 Set/SetRaw/Delete operations)
to batch edits on ojson.Doc
- Upgrade read-only byte paths to ojson.GetBytesNoCopy,
ojson.GetManyBytesNoCopy, and util.ParseGJSONBytesNoCopy with explicit
strings.Clone ownership protection across streaming and persistent state
- Use base64.StdEncoding.ValidateString for zero-allocation signature checks
and base64.EncodeDataURL for single-allocation data URL construction
- Normalize Gemini contents[].role in OpenAI, Claude, and Codex request translators via NormalizeGeminiTurnRole (mapping function/tool to user and inferring omitted/unrecognized roles from functionCall/functionResponse parts or previousRole without copying raw bytes)
- Support snake_case function_call and function_response parts consistently across Gemini ingress translators
- Skip appending a trailing empty outer message in ConvertGeminiRequestToOpenAI when a turn only contains functionResponse parts
- Add regression tests for omitted roles, role alternation, snake_case tool parts, and functionResponse turns
Fixes#7186
- Allow collectOpenAIResponsesFunctionCallOutputs to continue collecting tool outputs across intervening developer and system messages while pending tool calls remain.
- Compute the subsequent history slice start from one past the last consumed output index to handle non-contiguous output collection accurately.
- Add regression tests covering parallel text and image tool outputs across developer and system notices, turn boundaries, and orphan outputs.
Closes: #7177
- Preserve original developer message roles, content, and relative positions when converting OpenAI Responses input items to Chat Completions messages while keeping unsupported attachment refusal scoped to user turns.
- Add translator and openai-compat executor regression tests covering system, developer, user, assistant, and tool-call message ordering across streaming and non-streaming requests.
Closes: #7174
- Add AuthProviderEntry and AuthProviderEntries in sdk/pluginapi, forward entries over auth.identifier RPC, and send multi_auth_providers in lifecycle requests.
- Normalize per-entry OAuth display metadata with plugin metadata fallbacks in RegisteredPluginInfo while preserving legacy fields when entries are omitted.
- Expose HTML-sanitized oauth_provider_entries in management plugin list responses alongside oauth_provider and oauth_providers.
Closes: #7170
Defer wrapper.Finalize(c) in RequestLoggingMiddleware, stamp a 500 status when
a handler panics before writing a response, and mark the wrapper finalized so
outer recovery middleware does not reopen a second streaming log writer. Also
pass the chunk channel and stream writer by value to processStreamingChunks to
avoid racing with Finalize clearing wrapper fields.
Fixes#7161
Include normalized per-credential connection-pool settings in Gemini/Interactions
and Vertex-compatible API key deduplication keys so entries that differ only in
connection-pool configuration are not silently dropped during sanitization.
Fixes#7163
- Strip intermediate hex instance identifiers from overlong gateway-namespaced MCP tool names so the shortened 64-character candidate preserves both the server words and the distinct tool name.
- Reuse shortenNameIfNeeded as the base candidate function in buildShortNameMap to keep single-name shortening and reverse tool name mapping consistent.
Closes: #7155
Bind modelStreamBridge entries to the caller's plugin ID and callback instance
so host.model.stream_read and host.model.stream_close reject cross-plugin or
cross-instance access. Also close model streams when callback instances or
plugins are torn down.
Fixes#7159
Ensure TransportCache.Get and detachMatching always release c.mu via defer
when a caller-supplied callback panics, preventing the cache mutex from being
permanently wedged after recovery. Also mark entries as retired in Purge() to
match evictLocked, CloseKey, and detachMatching.
Fixes#7162
Credential connection-pool blocks are intentionally absent from the default-value pruning whitelist: a block already present on disk is merged in place and survives, and only zero-valued blocks that exist solely in an in-memory Config are pruned.
Also note that the block is excluded from nested-key pruning, because a removed pool sub-key can mean either delete or inherit the group value.
Comments only, no behavior change.
- Hash the original email or subject into the xAI credential filename so distinct accounts that sanitize identically no longer overwrite each other.
- Migrate pre-hash and identity-subset predecessors on re-login, keeping the richest known filename and preserved settings without claiming foreign files.
Closes: #7145
- Sanitize only upstream-originated replay copies (transcript merge and tool-call repair cache entries) so another credential cannot reject them as unknown input.
- Match passthrough members by decoded key name across duplicates and escaped spellings, drop objects emptied by removal, and leave client input, downstream payloads, and invalid JSON unchanged.
Closes: #7146
Plugin executor streams whose output format equaled the requested format bypassed stream translation, so SSE-framed chunks ("data: {...}" plus "data: [DONE]") reached the OpenAI/Gemini handlers unchanged. Those handlers add their own "data:" prefix and terminal marker, producing a doubled "data: data:" prefix and a duplicated [DONE] on the wire.
Built-in executors always run TranslateStream, and the registered same-format translators strip that framing. Route same-format plugin executor streams through the same translation instead of returning the channel or payload unchanged. Formats without a same-format translator keep the existing behavior via the TranslateStream fallback, which returns the payload unchanged, and the OpenAI Responses usage-details fixup still runs after translation.
Co-Authored-By: Claude Code <noreply@anthropic.com>
- Fail forced refreshes when rejected refresh tokens remain unchanged without disk rotation and preserve rejected access token markers across no-op refreshes.
- Require a valid active access token when sign-in is required before restoring active routing status during refresh and lifecycle updates.
- Return the redacted credential entry view from the v8 management credential refresh endpoint.
Closes: #7135
- Resolve strict "<level>-fast" requests (parenthesis suffix or body thinking_level) to "<base>-<clamped-level>-fast" in ResolveDevinChatModelUID instead of silently falling back to the default effort.
- Treat a bare "fast" request as the default-effort fast variant so "(fast)" no longer resolves to the plain default UID; private aliases, special families, and the lightning tier keep their existing handling.
- Add regression coverage for the fast suffix and body-level forms plus pinning cases for private aliases and lightning models.
Closes: #7144
Subscription keys return HTTP 403 client_attestation_denied when the
request still looks like muse-build/1.3.0. Stamp the headers captured
from Muse Code 1.4.14-R7309.1: muse-build/1.4.14, X-Client-Id tbh:exec,
and a fresh session id set.
- Keep an empty connection-pool block as an opt-in. Synthesising it to nil
silently disabled pooling for `connection-pool: {}` and for keys inheriting
an empty group block.
- Fold the transport kind into the pool key and pool the Claude Code uTLS
transport per credential. Anthropic upstreams previously shared one
transport across keys and ignored the key's pool settings.
- Fence generations per publisher instead of process-wide. Building or
reloading one service no longer retires the pools another service is
still serving, which degraded it to one transport per request.
Describe the api-keys `connection-pool` block in the shipped template: writing it
is the opt-in, pools stay per key, authenticated proxy URLs are isolated by a
digest of their proxy credentials, the defaults are a 300s idle window and two
idle connections per host, and zero or negative values disable keep-alives. Note
that no global pooling switch exists and that Antigravity keeps its own
antigravity.connection-pool settings.
Give the generic proxy-aware clients a reusable transport per api-key
credential, driven by the `connection-pool` block added in the previous commit.
- Pools are keyed by credential scope (auth ID, then path/source, then a digest
of refresh/access/API-key material, then anonymous), normalized proxy target
(authenticated proxies fold a SHA-256 digest of user:pass into the key so each
proxy identity or sticky-session username keeps its own pool without storing
plaintext secrets in the cache key or logs), and the resolved settings. Two
keys therefore never share a TCP/TLS connection regardless of whether the
proxy is unauthenticated, authenticated, direct, or inherited.
- Capacity is a 512-entry LRU: one key keeps a warm pool, 100 keys keep one each,
and 100000 keys fall back to the historical one-transport-per-request behavior
when the cache is full. Each transport is bounded to MaxIdleConnsPerHost
instead of the cloned default of 100 idle sockets, so idle sockets stay at
capacity*max no matter how many keys exist.
- Dead peers are detected without request timeouts: 30s TCP keepalive on every
dialed connection (including SOCKS5, which used proxy.Direct before) plus the
idle timeout, 300s by default. Measured against ollama.com, an idle pooled
connection was still reusable after 600s; the 90s that used to bound this path
was net/http's own IdleConnTimeout, not an upstream limit.
- Explicit 0 or negative values disable keep-alives (including when proxy-url is
empty), invalid durations are parsed once per pool instead of warning per
request, and pooling works with or without an explicit proxy-url while keeping
priority for context-injected RoundTrippers when proxy-url is empty.
- Config snapshots carry a generation so a request holding an obsolete snapshot
cannot repopulate the cache after a reload. Generation 0 means the config never
passed the fence and stays poolable, so callers that build their own config are
not silently downgraded.