- Apply canonical thinking normalization, suffix stripping, and plugin model metadata fallback in prepareExecutorCall across Execute, ExecuteStream, and CountTokens.
- Resolve plugin-registered ThinkingApplier by provider key before format fallback and validate unknown thinking suffixes on non-native-Responses models.
- Run thinking normalization before NewPayloadFinalizer so user payload rules act as the final host-side mutation.
Closes: #6940
- Use stream-wide tool call indices in Gemini OpenAI chat response translation and preserve explicit upstream tool call IDs across stream and non-stream responses.
- Bind preceding turn thought signatures to unsigned function calls, mark completed non-stream candidate payloads as terminal, and clone request payloads before envelope mutation.
- Fall back to context API keys for reasoning replay caller isolation when explicit caller scope metadata is absent.
Closes: #6825
Map Gemini and Antigravity safety/filter/malformed finishReason values (SAFETY, RECITATION, BLOCKLIST, PROHIBITED_CONTENT, SPII, IMAGE_SAFETY, MALFORMED_RESPONSE, MALFORMED_FUNCTION_CALL) to non-normal terminal states across OpenAI Chat Completions, OpenAI Responses, and Claude translators, and ensure Gemini OpenAI streaming emits cached finish reasons even when usageMetadata arrives separately or is absent. Also surface candidate-less promptFeedback.blockReason responses in Gemini and Vertex executors as explicit 502 errors while preserving usage reporting, and enforce finishReason truncation checks for OpenAI streams.
Fixes#6906
- Reset parallel function-call group tracking in SanitizeGeminiRequestThoughtSignatures and geminiContentsThoughtSignaturesNeedSanitize when a non-thought part intervenes so the next functionCall retains its compatible signature or receives the bypass sentinel.
- Align ValidateGeminiThoughtSignatures with the same parallel-group boundary rule and add regression tests for tool calls separated by text parts.
Closes: #6911
- Populate Detail.ResponseServiceTier from usage.speed in parseClaudeUsageNode so non-streaming and streaming Claude usage records carry the billed response speed tier.
- Add regression tests verifying non-streaming usage.speed extraction and retention across message_start and message_delta stream events.
Closes: #6884
- Capture the post-translation, post-payload-rule service tier on UsageReporter and propagate EffectiveServiceTier through SDK usage records, plugin usage adapters, and Redis usage queue payloads.
- Ensure executors record translated request metadata after final payload configuration rules so server-side service_tier overrides are accurately reported alongside client and response tiers.
Closes: #6873
- Route multi-region locations us and eu to https://aiplatform.{us,eu}.rep.googleapis.com in both native Gemini and OpenAPI Vertex host builders.
- Recognize official Vertex REP domains in IsGoogleVertexHost so location rewriting and credential checks handle REP base URLs accurately.
Closes: #6867
- Pass the active configuration to ApplyClaudeLegacyDeviceHeaders under cloak_mode never while allowing plausible newer SDK and runtime versions for confirmed clients.
- Document that cloak_mode never preserves confirmed caller headers ahead of stabilize-device-profile pinning and add regression coverage.
Closes: #6863
- Map Claude model_context_window_exceeded stop reason to finish_reason length in OpenAI Chat Completions and remove the synthetic context_length_exceeded HTTP 400 error path so generated content, tool calls, and usage are preserved.
- Preserve finish_reason length when non-streaming Chat Completions responses are truncated inside a tool call by max_tokens or model_context_window_exceeded.
Closes: #6861
- Add response.metadata to isCodexBootstrapBufferableEvent so prompt-moderation metadata frames do not prematurely release uncommitted Codex streams before server_is_overloaded rejections.
- Add unit tests covering response.metadata classification and bootstrap overload failover across SSE and WebSocket transports.
Closes: #6856
- Re-run AccessManager authentication before each responses websocket turn and duplex continuation using a cloned POST request with handshake headers stripped.
- Add AuthErrorCodeDenied and NewDeniedError in sdk/access so terminal provider refusals preserve their HTTP status and stop the provider chain.
- Add DenyStatusCode and DenyMessage to pluginapi.FrontendAuthResponse and map explicit plugin denials in accessAdapter.Authenticate.
Closes: #6843
- Select the original OAuth partition for ChatGPT Alpha Search without changing SIWC Responses behavior.
- Reject missing original OAuth tokens before sending and preserve existing API-key and custom-header behavior.
- Add real-executor transport and API regression coverage for credential partition isolation.
Closes: #6830
- Honor explicit output_config.effort without thinking in Claude parsing and Codex translation.
- Preserve native Claude thinking defaults and existing budget, suffix, and payload rule priorities.
- Add regression coverage for standalone effort and finalized streaming and non-streaming requests.
Closes: #6827
- Keep stream tool indices unique and retain tool declarations when tool choice is none.
- Decouple OpenAI replay history from current tool policy while preserving context checks and caller isolation.
- Add two-turn regression coverage for signature replay, session aliases, and final payload rules.
Closes: #6825
- Treat cancellation after an emitted terminal event as successful completion while retaining observed token usage.
- Preserve buffered usage on genuine stream failures and share terminal detection with Vertex.
- Add regression coverage for terminal disconnects, EOF, usage tails, and read errors.
Closes: #6821
- Filter out empty and whitespace-only text parts in OpenAI Responses and Chat Completions to Claude request translators while preserving preceding block cache_control ordering.
- Ensure automatic and message-level cache_control injection skips empty or whitespace-only text blocks and stamps the last eligible non-empty block.
Closes: #6820
- Persist the real SIWC token expiration time from expires_in and evaluate local SIWC status using real expiration (or JWT exp) and upstream 401 rejection state without triggering network requests.
- Track SIWC token rejections independently from outer Codex OAuth refreshes, execution retries, and use_siwc toggles until the SIWC token is replaced.
- Expose the read-only v8 management SIWC status endpoint and summary field for Codex credentials.
Closes: #6819
- Add per-model and per-credential openapi and openapi-location settings across Vertex API-key configs, OAuth model aliases/settings, and service-account auth files with precedence over automatic publisher detection.
- Preserve alias-specific OpenAPI overrides across credential prefixes, thinking suffixes, and mixed model arrays while synchronizing explicit OpenAPI location overrides in full and short base URLs.
- Populate publisher ownership and default reasoning levels for Vertex OpenAPI models registered via vertex-api-key configurations.
Closes: #6763
- Allowlist the sdk-ts Agent SDK entrypoint and recognize its measured Haiku 5.5 helper requests so genuine Claude Code traffic passes through uncloaked.
- Preserve plausible newer Stainless SDK and runtime versions for confirmed clients and retain confirmed-shape caller headers when cloak_mode is never.
- Recognize the Agent SDK CLI identity prompt block alongside existing Claude Code identity strings.
Closes: #6812
- Map Gemini functionCall thoughtSignature fields to OpenAI tool_calls extra_content.google.thought_signature when translating Gemini requests to OpenAI chat completions.
- Restore OpenAI tool_calls thought signatures onto Gemini functionCall parts across both non-streaming and streaming response translations while preserving deterministic tool call ordering.
Closes: #6807
- Include a hash of the selected upstream credential identity in claudeWebSearchResultCacheScope so cached encrypted_content is only restored for the credential that produced it.
- Pass auth into web search result cache scope resolution across Execute, ExecuteStream, and CountTokens paths and add regression coverage for credential switching.
Closes: #6810
- Map Claude refusal, model_context_window_exceeded, and pause_turn stop reasons across OpenAI Responses and Chat Completions translators, executors, and streaming handlers.
- Preserve paused server-side web search turns on continuation and map OpenAI Responses parallel_tool_calls=false to Claude tool_choice.disable_parallel_tool_use=true.
Closes: #6800
Include the captured client User-Agent in model capability cache and backoff
keys, discard obsolete publications, and cancel stale probes on refresh.
Use release-specific Hub changelists and the daily loadCodeAssist endpoint
for project discovery and credits queries.
Refs #6619
Responses reasoning emitted only in response.output_item.done was ignored
until a later token or terminal event. Count non-empty summary and content
text in the shared classifier while excluding empty and encrypted-only
items.
Add deterministic coverage for Meta Responses and Claude downstreams,
classification boundaries, and preservation of an earlier token time.
Refresh the bootstrap-buffering comment to match the shared helper.
Refs #6664
- Forward downstream User-Agent headers in xAI non-CLI-proxy and WebSocket requests with fallback to the Grok workspace User-Agent instead of Go's default HTTP client User-Agent.
- Forward downstream User-Agent headers in OpenAI-compatible requests while retaining cli-proxy-openai-compat as the fallback and preserving custom header overrides.
Closes: #6791
Meta streaming armed protocol-aware TTFT tracking but never observed token
events, so usage records kept the first-body-byte fallback even when
substantive output arrived later. Observe Responses events before failure
publication and translation using the existing shared helper.
Add deterministic virtual-clock coverage for content, terminal events,
error fallbacks, downstream translation, and non-streaming timing.
Fixes#6664
SGLang's OpenAI-compatible server emits reasoning tokens flat on the
usage object instead of nesting them in completion_tokens_details /
output_tokens_details, so the keeper recorded reasoning_tokens=0 for
affected upstreams. Add a third fallback plus bucket detection for the
flat key; regression included.
Fixes#6792
- Intercept compaction_trigger items on Kimi and Meta OpenAI Responses execution paths to synthesize sealed CPA compaction capsules and reject incomplete upstream summaries.
- Expand replayed CPA compaction capsules into developer context messages and drop foreign compaction items across Kimi and Meta execution and token-counting paths.
Closes: #6781
- Store and retrieve cached Claude web search results via Home KV with sliding TTL expiration when Home mode is enabled.
- Propagate request context through Claude web search result recording and restoration helpers in execution and token-counting paths.
Closes: #6780
- Inject a web_search tool declaration for standard Codex requests when input replays web_search_call items without a web_search tool so upstream response protection remains available during compaction.
- Strip replayed web_search_call items from Responses Lite requests where top-level hosted tool declarations are omitted.
Closes: #6770
- Strip incoming Claude Code billing attribution, CLI identity system blocks, metadata user IDs, and diagnostics when a non-CLI API key explicitly configures cloak mode as never or uncloak.
- Remove Claude Code CLI headers, beta flags, and user-agent strings on uncloaked API key requests while preserving capability betas and credential header overrides.
- Keep global disable-claude-cloak-mode passthrough behavior unchanged for credentials without explicit per-key cloak configuration.
Closes: #6762
- Route Vertex partner/open MaaS models and explicit openapi-enabled credentials through the OpenAI-compatible endpoints/openapi endpoint while reusing service-account OAuth token acquisition and supporting openapi_location overrides.
- Register Vertex service-account MaaS models and aliases from credential metadata and OAuth alias rules so partner models are discoverable and routable.
- Normalize Vertex OpenAPI model identifiers and reject static API keys against official Google Vertex OpenAPI hosts that require OAuth tokens.
Closes: #6763
- Implement LRU cache and helpers for Claude native web search tool results.
- Record search results from stream events and responses, and restore them in subsequent requests.
- Add configuration options and test coverage for Claude web search result caching.
Closes: #6753
- Add freshness validation helper for antigravity credits hints and synchronize the refresh interval constant.
- Allow expired negative credits hints to trigger re-validation and clear permanent failure state upon successful recovery.
- Include `INSUFFICIENT_G1_CREDITS_BALANCE` in full quota exhaustion decisions and ensure candidates with expired negative hints are re-queried.
Closes: #6745
- Update Codex outer refresh lead time to 96 hours to prevent upstream token invalidation.
- Ensure proper token refreshing and background recovery for rejected unexpired JWTs and in-stream 401 errors.
Closes: #6742
- Only preserve OpenRouter dot-delimited router suffixes when the upstream baseURL is openrouter.ai / *.openrouter.ai
- Strip RouterSuffix down to the native GPT/Grok/Meta envelope when forwarding to official tokens (chatgpt.com, api.openai.com, api.x.ai) or non-OpenRouter third-party providers (while keeping native api.meta.ai fail-closed against cross-caller envelopes)
- Strip RouterSuffix before storing GPT signatures in the Codex reasoning replay cache
- Allow optional dot-delimited alphanumeric router suffixes (such as OpenRouter endpoint_slug metadata) in InspectGPTReasoningSignature and InspectGrokEncryptedContent
- Preserve matching target-family signatures (Grok, Gemini, Claude, Kimi, SWE) in sanitizeOpenAIResponsesReasoningEncryptedContentWithCompatModel when served through Responses routers
- Gate MetaExecutor signature sanitization by baseURL so custom/third-party meta-api-key endpoints replay router-suffixed Meta Muse envelopes while native api.meta.ai stays native-only
- Pass resolved target model (with requested-model fallback for aliased deployments) through Codex, Codex WebSocket, and OpenAI-compat Responses sanitization paths
- Broaden Meta Muse model-id boundary matching (muse, meta/muse, muse_*, meta-muse-*) and allow Meta envelopes in the Codex reasoning replay cache
- Reuse CodexReplaySignatureForTarget in Claude-to-Codex request translation and avoid duplicating streamed thought summaries on Interactions reasoning done events
OpenRouter serves meta/muse-* through its Responses API and returns
encrypted_content as the native Meta envelope plus "." and a 67-char
alphanumeric routing suffix. The strict Meta inspector rejected that form,
so it was classified unknown and stripped on every path, including the
compat Meta-target path that previously kept unknown blobs.
- Accept an optional "."+[A-Za-z0-9]{1,128} router suffix after a valid
native envelope and expose it as RouterSuffix; replay stays verbatim
- Replace the keepMeta flag with a Meta policy: Meta-family targets on the
Codex executor allow routed envelopes regardless of is-compat, while the
native Meta executor stays native-only (suffix acceptance by api.meta.ai
is unverified)
- Live-checked on OpenRouter: native part matches the api.meta.ai header
and bucket shape (5/5), suffixed, native-only and suffix-tampered replays
are consumed, native-body tamper is silently dropped
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Add InspectMetaReasoningSignature transport-shape validation (canonical unpadded base64url, observed 43e3da0e01 header, 45 + 1024*2^k decoded buckets) and SignatureProviderMeta detection/compatibility wiring
- Make Meta Responses sanitization native-only so GPT, foreign, and unknown signatures never replay to Meta, while compat paths preserve Meta envelopes only for Meta-family target models
- Preserve recognized Meta signatures through Claude-protocol request translation for muse-* targets and drop them for other targets; never supplement them as Devin sealed signatures
- Cover with synthetic-fixture unit tests only; verified same-model, cross-model, and Claude-ingress live replay plus wrong-upstream stripping on an isolated debug CPA
- Add `ParseClaudeRateLimitResetForError` to inspect response bodies and avoid inheriting hours-long unclassified unified resets for explicit per-minute rate limits.
- Update Claude standard and fast-direct executors to use the body-aware rate-limit parser when handling upstream error responses.
Closes: #6719
- Filter `response.subscription_usage` events and associated metadata across Meta streaming and non-streaming executors.
- Ensure subscription telemetry is stripped from OpenAI Responses SSE streams and WebSocket forwarders.
- Refactor antigravity tool schema sanitization to process declarations and elements in a single pass.
- Avoid quadratic whole-document rewrites for payloads with many function declarations.
- Preserve original array whitespace and untouched elements during byte splicing.
Closes: #6714
- Track finish signals and message stops in stream executors to handle premature upstream closures.
- Enhance Claude SSE state observation and error injection for truncated stream connections.
Closes: #6707
- Add `DisableType` support to plugin host adapters and registry mappings.
- Route disabled thinking to `between_tools` for models like Claude Sonnet 5.5.
- Fall back to low-effort adaptive thinking for models that reject disabled states.
Closes: #6698
- Synthesize an adaptive thinking object and inject `drop_block` prefix mismatch behavior for preserved-thinking models when thinking is omitted but signed thinking blocks are present.
- Prevent thinking object and block binding injection when tool choice forces tool use.
- Update tests to cover omitted thinking and forced tool choice behaviors for preserved-thinking models.
Closes: #6697