- Remove empty JSON part objects from request.systemInstruction.parts in ConvertGeminiRequestToAntigravity after system_instruction key normalization so upstream Cloud Code Assist does not fail Part.data oneof deserialization with HTTP 400.
- Delete request.systemInstruction when all of its parts are empty objects while preserving zero-copy pass-through when all parts are non-empty.
Closes: #7136
- Add Capabilities.AuthProviders and MultiAuthProvider (Identifiers() []string) in sdk/pluginapi, bump sdk/pluginabi.SchemaVersion to 10, and forward AuthProviders in sdk/pluginhost
- Extend internal/pluginhost to register, expose, and route multiple OAuth login identifiers per plugin across StartLogin, PollLogin, RefreshAuth, ParseAuths, and ExchangeCallback, while preserving per-credential oauth_provider/portal attribution for shared credential providers
- Expose oauth_providers alongside primary oauth_provider in RegisteredPluginInfo and GET /v0/management/plugins, and support target-credential re-login (StartOAuthV8) across sibling portals
Closes: #7126
- Add `client.claude.show-codex-commentary` config and propagate the request-scoped display policy through HTTP and WebSocket Codex executors.
- Mirror public Codex `commentary` messages into visible Claude text blocks alongside the `cpa:commentary:v1` thinking marker in streaming and non-streaming responses without altering genuine reasoning or token accounting.
- Deduplicate only the exact adjacent mirrored commentary text block during Claude-to-Codex request replay when enabled.
Closes: #7129
- Add ProviderModels, Registrations, MultiProviderModels, and SchemaVersionMultiProviderModels so a single plugin can register model catalogs across multiple providers while preserving single-provider compatibility.
- Track per-plugin provider sets and multi-provider model registrations in the plugin host for catalog aggregation, per-auth model discovery matching, and targeted unload cleanup.
Closes: #7115
- Emit Responses additional_tools items for mid-conversation tool_addition blocks in ConvertClaudeRequestToCodex while preserving top-level tools and tool-result adjacency.
- Include inline tool_addition definitions in Codex short-name bidirectional maps and merge them into top-level tools for OpenAI Chat Completions requests.
- Add regression tests covering inline tool definitions, tool references, deferred tool-result ordering, long MCP tool name round-tripping, and JSON escape handling.
Closes: #7112
- Mark locally synthesized missing-[DONE] stream errors as stream-truncated in OpenAICompatExecutor so auth cooldown and cross-credential replay are skipped while preserving the 502 error.
- Add regression tests verifying that incomplete HTTP 200 OpenAI-compatible streams do not cool down credentials or exhaust the pool into auth_unavailable.
Closes: #5283
With a relative auth-dir the file synthesizer records an auth file as
"<auth-dir>/<name>.json" (filepath.Join(ctx.AuthDir, name)), while
stateRelativePath stripped the auth dir only from absolute paths. The store,
rooted at the auth dir, then wrote "<auth-dir>/<auth-dir>/<name>.cds".
Keep the error-only upstream request capture policy on the connection
context, before model routing and upstream execution begin. Check it before
accessing pooled Gin state so delayed plugin callbacks retain the policy
even after cancellation or Gin context reuse.
Preserve ordinary HTTP error capture, failed upgrade handling, and full
request logging. Cover large repeated requests, late callbacks, real
WebSocket logging, and Codex duplex routing with regression tests.
Related: #6960
Skip registering the AI Studio websocket gateway in Home
mode since it is not supported there, and force websocket
authentication in the Home runtime config.
- Update the Gemini OpenAI Responses tool search call item ID prefix from ts_ to tsc_ so replayed search items pass Codex upstream validation after switching models.
- Normalize legacy ts_ and unprefixed tool_search_call item IDs in SanitizeCodexInputItemIDs on outbound Codex requests while preserving call_id and avoiding ID collisions.
Closes: #7084
Existing request interceptors wrap the full request body in a JSON RPC envelope with Base64 encoding and skip subsequent duplex WebSocket business frames, causing ~3.33x memory and CPU amplification when rewriting small fields such as Codex `<timezone>` and `<current_date>` in large contexts.
- Add schema v8 raw request body patch methods (`request.patch_body_before` and `request.patch_body_after`) and capabilities (`request_interceptor_patch_body_before/after`, `request_body_patcher_before/after`) that pass raw `Body []byte` directly across the C ABI without JSON/Base64 request wrapping
- Add `RequestBodyEdit`, `RequestBodyPatchResponse`, and `RequestBodyPatcher` in `sdk/pluginapi` with single-pass host splicing, bounds/overlap validation, `json.Valid` verification, no-op original body reuse, and sequential multi-plugin chaining
- Eliminate redundant full-body slice clones in handler/conductor request interceptor application paths
- Run before-auth and after-auth request interceptors on subsequent duplex WebSocket `response.create`, `response.append`, and `response.steer` messages
Closes: #7072
- Let schema v7+ frontend auth providers opt out of receiving request bodies via frontend_auth_provider_omit_body / frontend_auth_omit_body so metadata-only auth plugins skip reading, decoding, cloning, and marshaling the request body during authentication.
- Avoid cloning the buffered request body slice before JSON serialization when invoking RPC-backed frontend auth providers that still inspect the body.
Closes: #7071
- Track the running response identity in the Codex websocket session and reject interrupts that do not target it, so an interrupt after response.completed is never forwarded upstream while turn teardown is pending.
- Gate the handler's local interrupt path by explicit turn ownership and close it before terminal payloads are written downstream, preventing fabricated response.incomplete events and silently dropped claimed frames.
- Add deterministic regression tests covering late and unknown interrupts across completion, failure, queued rejection, upstream loss, and HTTP fallback turns.
Closes: #7065
- Filter out internal metadata events such as moderation data for standard clients in OpenAI responses API and websocket streams.
- Enhance `responsesSSEFramer` and frame accumulator to robustly handle fragmented JSON payloads, empty data fields, and recovery of split SSE fields.
- Add comprehensive unit tests covering SSE metadata filtering, fragmented frame recovery, and websocket message handling.
BenchmarkResponseCompressionOpenStreams took its baseline after one GC,
which only moves pooled encoders to the sync.Pool victim cache. Streams
then reused memory the baseline already counted, so heap per open stream
collapsed toward zero once b.N > 1. Run two GC cycles before the baseline
so every sample starts with empty pools.
TestResponseCompressionReusesPooledEncoders now counts encoder creations
and fails when finished encoders are not returned to the pool. It also
interleaves responses whose client writes fail, so an encoder pooled
after an error must still produce correct output.
Every compressed response created a new encoder: zstd with its default
8 MiB window allocated about 18 MB, gzip about 1 MB, and an open SSE
stream held that for its whole life. Pool zstd and gzip encoders, and
give zstd a 1 MiB window with lower encoder memory; API responses are
far smaller than the window, so the wire size is unchanged. finish now
returns the encoder to the pool and fails later writes instead of
sending them uncompressed under Content-Encoding.