- Add a lightweight per-request in-flight tracker on the auth manager that covers selection, upstream calls, retry waits, and the full stream lifetime; it stays disabled in Home mode where the execution registry is authoritative.
- Register GET /v8/management/observability/requests/in-flight returning counts only (in_flight, oldest_started_at, by_provider) with no request bodies or credential identifiers.
Closes: #7476
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Add server.shutdown-timeout config (default 0 = immediate close, preserving #6094 behavior); positive values drain in-flight HTTP requests via http.Server.Shutdown bounded by the configured seconds, then force-close the rest.
- Bound the drain by the configured timeout even when the caller's context is more generous, while a tighter parent deadline still wins; hijacked WebSocket connections remain managed by their own handlers.
- Cover drain completion, budget-expiry fallback, tighter parent ctx, zero default, and v8/legacy config parsing in tests.
Closes: #7475
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Prefer /v8/management endpoints for config, credentials, api-keys, logs, and OAuth flows, normalizing the v8 config tree to the TUI's flat view and falling back to /v0/management only when a route is genuinely unimplemented.
- Read access.api-keys from the same versioned root-config snapshot and write back with If-Match, refusing unconditional replaces and stale-index edits/deletes so concurrent changes are not lost.
- Return a non-zero exit via CheckManagementSupport when a server definitively exposes neither contract, while keeping transient probe failures and wrong-password retries non-fatal.
Closes: #7462
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Restore Claude signature carriers onto their original Gemini parts with message and semantic boundaries.
- Return Gemini tool signatures in streaming and non-streaming Chat Completions responses without weakening provider compatibility.
- Cover delayed signatures, metadata, unsupported payloads, and payload-rule precedence with regression tests.
Closes: #7484
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Run the reauthorization regression test with request logging both enabled and disabled.
- Drain WebSocket handlers and verify logging leaves no temporary files and records the revoked credential.
- Reuse successful wire beta snapshots across thread turns and executor reloads.
- Keep continuations on their original credential and honor explicit payload/header policies.
- Recover snapshots through KV and publish state before streaming completion, with regression coverage.
Closes: #7470
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Normalize native Responses baseline and configuration updates against model capabilities without flattening the update timeline.
- Preserve supported efforts, suffix overrides, and final user payload rules across Codex SIWC transports.
Closes: #7478
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Map upstream MAX_TOKENS to finish_reason "length" in the Antigravity and Gemini OpenAI Chat Completions translators (streaming and non-streaming), since "max_tokens" is not a valid OpenAI finish_reason and strict clients reject it.
- Keep native_finish_reason as the lowercased upstream value and preserve tool_calls precedence and content_filter handling, updating and adding regression test cases for each affected path.
Closes: #7463
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Require and validate a free-form type for server peers, accepting it from the query string or `X-Tunnel-Type` header.
- Include server types in server lists and online/offline events.
- Update tunnel documentation and integration coverage.
- Route pre-configuration startup logs to stderr and return exit status 1 from a deferred-safe run helper when config loading, store bootstrap, or TUI execution fails.
- Propagate synchronous proxy service build and runtime errors from StartServiceWithPluginHost to stderr and exit status 1 while preserving exit status 0 on graceful context cancellation.
- Add subprocess and unit regression tests covering missing config, malformed YAML, TUI failures, occupied ports, and interrupt shutdown.
Closes: #7459
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Parse typed delta.content arrays and structured reasoning fields in streaming responses to emit sequential reasoning and message items while preserving finalized message statuses across interleaved transitions.
- Extract thinking and visible text segments from non-streaming message.content arrays as reasoning fallback and assistant output text without leaking raw JSON arrays.
- Allow reasoning-only streams with an explicit finish_reason to finalize cleanly while keeping unfinished-stream guards intact.
Closes: #7455
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Introduce internal/wstunnel implementing a multi-tenant, many-to-many
opaque WebSocket data exchange hub over GET /v1/tunnel.
- Enforce strict access.api-keys authentication across all five standard
credential sources, rejecting unconfigured keys with 401, isolating
tenants per API key, and revoking removed keys on hot reload with
WebSocket close code 1008.
- Enforce per-tenant cross-role device UUID uniqueness (409 Conflict on
duplicates, generation-bound handshake reservations) while allowing
duplicate human-readable device names.
- Multiplex discovery and data exchange over a single WebSocket per
device: UTF-8 JSON TextMessage control frames (*ojson.Doc single-exit
serialization for server_list, server_online, server_offline,
list_servers, and error) and BinaryMessage frames carrying a 4-byte
header, source/destination UUIDs, and up to 64 MiB opaque payloads
with anti-spoofing and cross-role routing checks.
- Guard upgraded transports against post-upgrade socket deadlines
(including wrapped non-ALPN TLS connections and RFC 6455 protocol
error paths), enforce per-peer and per-tenant outbound byte budgets
retained across in-flight writes, and bound non-blocking close
reclamation.
- Mount /v1/tunnel on internal/api.Server (405 Allow: GET for non-GET
methods while preserving CORS OPTIONS) and add English and Chinese
integration guides under docs/websocket-tunnel.md and
docs/websocket-tunnel_CN.md.
- Classify clean-EOS zero-output completions and pre-output stream drops as HTTP 502 transient transport errors so Conductor rotates across credentials and fallback layers without cooling healthy Devin credentials, while marking mid-generation drops as stream-truncated.
- Record failed usage with any partial token details and upstream response summaries whenever unfinished Devin streams are canceled before completion instead of synthesizing fake interaction.completed events.
- Gate apply_patch error wrapping on observed patch tool-call activity and preserve stream-truncation and partial usage metadata across streaming and non-streaming failure paths.
Closes: #7442
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Add AICodeMirror sponsor row with logo, affiliate link, and promotional copy to README.md, README_CN.md, and README_JA.md.
- Include assets/aicodemirror.png logo image.
- Gate cloaked Claude server-side fallback injection behind an opt-in upstream.claude.server-side-fallback flag (default false) while preserving explicit caller fallbacks and payload filter precedence.
- Propagate authoritative upstream serving models and ordered fallback boundary metadata across OpenAI Chat Completions and Responses streaming and non-streaming translations.
- Track mid-stream fallback transitions in Claude response-model and usage observers and add regression coverage for single-hop, multi-hop, sticky default, and refusal paths.
Closes: #7440
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Extract Home credential_options.cloak and slice-valued cloak_sensitive_words under claudeDevicePoolMu without JSON round-tripping.
- Preserve shared DisableClaudeCloakMode defaults when cloak.mode is omitted and avoid splitting comma-containing sensitive-words.
- Report Claude cloak block additions, removals, and sensitive-words content updates in config change details.
Co-authored-by: lzt404 <2596933790@qq.com>
- Preserve explicit non-empty string prompt_cache_retention values from client payloads across Meta request translation while leaving omitted, null, blank, and non-string values unset without injecting 24h by default.
- Synchronize prompt_cache_retention onto the translated original request document so payload default, override, and filter rules remain the final semantic barrier.
- Document the meta protocol option and opt-in prompt_cache_retention default rule in config.example.yaml and add regression tests.
Closes: #7424
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Capture bounded per-attempt upstream status, masked headers, response chunks, and transport or stream errors when request-log is false.
- Bind synchronized deferred capture to the HTTP request context and preserve partial HTTP bodies and WebSocket dial or reconnect failures.
- Mask Cookie headers alongside Set-Cookie so forced error logs do not expose session credentials.
Closes: #7420
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Surface upstream SSE error, response.failed, and raw JSON failure payloads through xaiStatusErr with mapped HTTP status codes instead of 408 request_timeout.
- Return request-scoped 502 errors for empty and unclosed 2xx streams without triggering transient credential cooldown.
- Avoid misclassifying empty or unclosed non-stream responses as apply_patch argument errors when no custom apply_patch activity occurred.
Closes: #7419
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Retain and persist rejected Claude unified quota signals alongside active cooldown deadlines so out-of-order completions, restarts, and dual-layer quota wraps keep accurate window metadata.
- Populate anthropic-ratelimit-unified-* headers on Claude quota modelCooldownError responses aligned with Retry-After while keeping SafeResponseHeaders restricted to trusted retry headers.
- Exclude non-Claude, Cloudflare challenge, and ordinary per-minute rate-limit cooldowns from unified subscription quota header synthesis across selector and scheduler paths.
Closes: #7417
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Add Gemini 4 Carbon (High) with 1M context length and 1M max completion tokens.
- Include thinking levels (low, medium, high) with dynamic thinking support.
- Support text, image, audio, and video input modalities with text output.
- Enable web_search native capability for the new model.
- Remove AICodeMirror promotional block and affiliate link from README.md, README_CN.md, and README_JA.md.
- Delete unused sponsor asset image assets/aicodemirror.png.
- Accept both cli and cli-bg in the native X-App header check so Claude Code background sessions preserve their native request identity instead of receiving the pinned device profile rewrite.
- Add unit and executor regression tests verifying native detection and passthrough for X-App: cli-bg across messages, streaming, count_tokens, and measured helper requests.
Closes: #7412
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
Clear top-level text format constraints and filter configuration_update control items when preparing local compaction summary payloads so structured JSON schemas do not overwrite the summary output.
- Detect input_schema property keys outside Claude's ^[a-zA-Z0-9_.-]{1,64}$ pattern by walking JSON Schema subschema positions in tools[] and inline tool_addition definitions.
- Replace affected schemas with an open object and embed the original schema in the tool description before payload rules, so parameters keep their exact names without request or response rewriting.
- Apply the fallback on execute, stream and count_tokens paths with regression tests for Responses and native Claude sources, MCP aliasing and payload-rule ordering.
Closes: #7389
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Start a connection-scoped downstream Ping keepalive loop immediately after upgrading the Responses WebSocket connection instead of waiting for stream forwarding to begin.
- Guard background Ping writes with non-blocking mutex acquisition so active data writes are not contended while blocked Ping writes are still interrupted on terminal close.
- Preserve the socket cancellation cause in response forwarding and add regression coverage for post-upgrade, upstream-bootstrap, and blocked-Ping close paths.
Closes: #7407
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Add a single-space reasoning_content placeholder on assistant tool-call turns without replayable thinking text when is-compat and request reasoning are active.
- Reconcile tool-call placeholder reasoning after canonical thinking resolution so model suffixes and capability normalization govern final inclusion before payload rules.
- Add unit and executor regression tests covering absent/whitespace thinking, disabled thinking, suffix overrides, and final payload overrides/filters.
Closes: #7398
Co-authored-by: Dylan <1990016@gmail.com>
Preserve an absolute heartbeat deadline across config,
cluster, and telemetry messages so ordinary subscription
traffic cannot mask a stalled heartbeat. Only an
empty-payload PONG renews liveness and resets reconnect
failures, and messages arriving after the deadline are
treated as timeouts
- Treat thinking.display="updates" as an enabled reasoning summary mode when extracting Claude summary configuration so translated requests emit target visibility controls such as Antigravity includeThoughts.
- Preserve an existing "updates" display mode when applying enabled summary configuration back onto Claude request documents instead of overwriting it with "summarized".
- Add unit and cross-protocol translation regression tests for Claude thinking.display="updates".
Closes: #7393
Co-authored-by: Dylan <1990016@gmail.com>
- Document in config.example.yaml and RoutingConfig.SessionAffinity that Merkle LCP compaction matching requires at least 2 shared trailing turns.
- Note that clients whose compaction replaces all earlier turns with a summary should send X-Session-ID or another explicit session ID to preserve credential affinity.
Closes: #7390
Co-authored-by: Dylan <1990016@gmail.com>
- Include claude-fable-5-2 in preserved-thinking block binding so replayed signed thinking blocks default to drop_block on prefix mismatch.
- Consolidate 2.1.321 per-turn effort and timing model capability checks to cover Fable 5.2, Sonnet 5.5, and Mythos 5.2 while keeping Haiku 5.5 excluded from timing.
- Update the baseline software profile test failure message to match 0.128.0/v26.12.1 and add regression tests for 2.1.321 timing and preserved thinking.
Closes: #7386
Co-authored-by: Dylan <1990016@gmail.com>