Cover WAV and MP3 Chat audio through MetaExecutor streaming and non-streaming requests. Require nested input_audio data/format and reject flattened fields. Avoid injecting an empty format when the caller omits it.
Store bounded local read, dial, and stream errors as diagnostics
instead of rendering them inside API RESPONSE sections, and render
them in the downstream RESPONSE section after status selection.
Prevent handler-synthesized payloads from appending to executor
capture or fabricating upstream responses for failed attempts.
Move Claude prompt-cache stripping before payload finalization so
user-injected values survive, and extract count-tokens betas only
after finalization without changing business semantics.
Capture Codex instructions and xAI transcript input before payload
rules for duplex, replay, and compaction inheritance, and reuse the
exact finalized xAI websocket frame on retries. This prevents rules
from being applied twice, overwritten, or accumulating across turns.
Compute replacements during a single ForEach traversal and collect
only changed values before mutating the document, avoiding array
allocations and second lookups for unchanged text. Stop scanning
after the last targeted user position.
- Read nested body/error HTTP status codes in parseCodexWebsocketErrorWithCooling and clearCodexReasoningReplayOnWebsocketError so Retry-After and request headers are preserved on typeless WebSocket errors.
- Guard responsesSSEPayloadHasError and SSE error inference behind explicit event/payload type checks so non-error frames such as response.metadata containing body.error are not rewritten into terminal errors.
- Build OpenAI Responses stream error and failed chunks directly through ojson.Doc with single-exit serialization, supporting scalar error strings without map mutations.
- Preserve valid top-level and body envelope HTTP error status codes when normalizing typeless Codex SSE failures and Responses SSE frames.
- Normalize scalar and blank WebSocket error fields purely via ojson.Doc.
Add ordered literal replace rules that rewrite existing user
text at selected one-based positions, or all users, in the final
upstream payload after overrides and before filters.
Support OpenAI Chat, Claude, Responses/Codex, Gemini, and
Antigravity layouts while leaving system prompts, tools, images,
and thinking untouched. Validate and sanitize rule config,
preserve it through YAML/JSON and runtime cloning, surface it
in config diffs and SDK types, and document it in the example
config.
Normalize string websocket errors without discarding their messages. Recognize untyped and body-wrapped failures across SSE, websocket, and duplex paths while retaining status, headers, and sequence numbers.
Cover transport and format combinations, replay invalidation, credential status precedence, and Responses framing with regression tests.
- Add bio_policy, cyber_policy_violation, misalignment_policy_violation, content_policy_violation, and image_content_policy_violation to request-fault codes so policy rejections stop failover without cooling down credentials.
- Unify trusted error JSON extraction across auth, model-not-found, credit-balance, and request-fault checks while restricting wrapper unwrapping and policy-text matching to prevent prompt-echo false positives.
- Map typeless policy error codes and body.error layouts consistently across Codex SSE/WebSocket, Responses, xAI, and Claude stream translation paths, filling blank messages with official fallback copy.
- Strip thinking suffixes from `advisor_*` tool `model` fields inside `sanitizeClaudeMessagesForClaudeUpstreamWithDebugDoc` before payload config rules run.
- Preserve each advisor tool's own base model and leave non-advisor tool entries untouched.
- Add regression tests covering API key and OAuth flows across `Execute`, `ExecuteStream`, `CountTokens`, payload overrides, and edge cases.
Closes: #7591
- Route OpenAI Chat Completions response_format and Responses text.format json_schema payloads to Claude output_config.format via ojson.Doc while keeping system-prompt fallback for legacy Claude models and non-schema formats.
- Preserve optional schema name and description in a short system instruction without repeating the JSON schema body.
- Include output_config.format.schema in local Claude input token estimation and add translator and executor regression tests.
Closes: #7576
- Tag Gemini-family zero-output HTTP 502 errors and translated Claude MALFORMED_FUNCTION_CALL error payloads with ErrorCodeTransientTransport across Antigravity, Gemini, Vertex, and AI Studio executors so Conductor skips credential cooldown while preserving per-request rotation and cross-provider failover.
- Update existing Claude MALFORMED_FUNCTION_CALL conductor tests to assert failed execution results and failed usage metrics without placing credentials into cooldown.
- Add unit and HTTP handler regression tests verifying uncooled rotation, cross-provider failover, and groundingChunks-only Claude fallback paths across Gemini-family executors.
Closes: #7571
- Preserve ModeLevel in normalizeUserDefinedConfig for native Gemini/Interactions requests and user-defined models with explicit thinking levels.
- Enforce strict provider scoping in ModelRegistry.GetModelInfo and prioritize channel-specific static catalog fallback in LookupModelInfo.
- Add unit and Vertex executor regression tests covering user-defined Gemini thinkingLevel preservation and cross-provider shadowing.
Closes: #7558
- Add sensitive-patterns-replace configuration rules with load-time RE2 validation, comment-preserving YAML persistence, config diffing, and bounded matcher caching across Antigravity, Devin, and Claude cloak paths.
- Apply ordered non-cascading regex replacements against original text boundaries while preserving Devin original-line drop ownership and existing sensitive-words-replace semantics.
Closes: #7540
- Stop counting signature-only empty-text parts as thought output in InspectGeminiZeroOutputPayload so leading signature-only frames stay buffered until real content arrives.
- Fail buffered candidate-bearing zero-output streams with a retryable 502 on EOF in GeminiZeroOutputStreamGuard.Finalize and harden Antigravity OpenAI streaming translation against all-null delta emission.
- Add unit, executor, and HTTP failover regression tests covering signature-only zero-output streams across downstream formats and credential rotation.
Closes: #7536
- Detect the 403 PERMISSION_DENIED ErrorInfo reason=TOS_VIOLATION signature and mark the credential StatusDisabled + Disabled so it is excluded from rotation and persisted across restarts, while OAuth refresh stays intact; carry appeal_url/appeal_url_link_text through Error.Metadata to auth.Metadata and the management API.
- Add an optional pool-wide protective pause (antigravity.tos-pause-window, default 6h) armed only by TOS results, never by transient 429s, covering all Antigravity request paths including SSE mid-stream error frames and CountTokens.
- Distinguish terminal TOS results from stale/superseded results using a new Result.RefreshToken account hint so a same-account OAuth refresh applies the suspension while a genuine credential replacement discards it safely.
Closes: #7515
- Detect MALFORMED_FUNCTION_CALL, UNEXPECTED_TOOL_CALL, and MALFORMED_RESPONSE with zero visible output before bootstrap commit, reasoning replay caching, or usage finalization across Antigravity, Gemini, Vertex, and AI Studio executors.
- Withhold only contentless leading shell frames while keeping thought chunks unbuffered for TTFT, and align Claude response error handling and stream completion flags while preserving valid partial outputs.
- Add unit, executor, bootstrap failover, and cross-module HTTP regression tests covering credential rotation and HTTP 502 exhaustion.
Closes: #7513
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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
Anthropic now rejects claude-fable-5-2 from Claude Code versions older than
2.1.290, so every cloaked (non-Claude-Code) request for the model failed with
400 "Claude Code 2.1.280 does not support this model".
Update the emulated CLI baseline to the measured 2.1.321 release:
- User-Agent claude-cli/2.1.321, Stainless package 0.128.0, runtime v26.12.1,
billing cc_version and default fallback version.
- Rebuild Anthropic-Beta assembly from native 2.1.321 captures:
thinking-token-count moves after advisor-tool, effort precedes
dangerous-tool-use, message-threads is added when the body carries a thread
object, mid-conversation-system is only sent when requested, and the quota
probe omits the claude-code beta.
- Recognize Fable 5.2 and Haiku 5.5 for progress display, per-turn control and
effort handling, matching the observed client.
- Add a regression test that reproduces each captured 2.1.321 beta header and
the billing fingerprint.
Fixes#7386