- 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
- Automatically inject `drop_block` prefix mismatch behavior for preserved-thinking models when replaying signed thinking blocks.
- Append the required thinking-binding-controls beta header whenever requests carry `thinking.block_binding`.
- Expand Haiku 5.5 and related model detection to correctly support assistant prefill drops and token validations.
Closes: #6692
- Introduce Devin quota exhaustion detection for daily and weekly usage windows with reset timestamp parsing.
- Apply credential-scoped 429 status errors with reset-based Retry-After for Devin quota limits.
- Support automatic quota revalidation and early credential cooldown release upon confirmed usage recovery.
Closes: #6690
- Track delivery of terminal response events in Meta stream execution.
- Prevent client cancellation errors from being marked as API failures if the terminal event was already delivered.
- Add unit tests for Meta stream client disconnection behavior before and after terminal events.
Closes: #6688
- Add `session-date-pin-days` configuration option with a 7-day default retention.
- Store session date pins independently of continuity state to prevent re-anchoring on credential switches or idle gaps.
- Strip caller-supplied current date reminders from the first user message to avoid duplication.
Closes: #6682
The API-key vertex executor previously always appended
"/v1/publishers/google/models/{model}:{action}" to whatever base-url the
credential carried, so a base-url that already encoded the resource path
(e.g. "https://aiplatform.googleapis.com/v1/projects/{p}/locations/{l}/publishers/google/models")
would produce a duplicated "/v1" and return 404.
This change teaches the helper to:
1. detect a base-url that already contains "/publishers/" and use it
as-is (preserving any projects/locations segment), and
2. skip inserting "/v1" when the trimmed base already ends in a
version segment such as "/v1" or "/v1beta1".
Short third-party hosts like "https://zenmux.ai" keep working unchanged;
real Vertex API-key setups can now write the full resource prefix into
base-url to pick a specific project/location (e.g. us-central1 for
gemini-4-argon).
Includes a table-driven unit test covering empty, bare host, /v1,
/publishers/-full-prefix, v1beta1, and countTokens variants.
Co-Authored-By: Claude Code <noreply@anthropic.com>
OpenAI Responses clients can attach search_context_size to the web_search
tool. The xAI Responses API rejects that option with HTTP 400 "Argument not
supported: search_context_size", which fails the whole turn on grok models.
Strip every web_search option xAI rejects (external_web_access and
search_context_size) through one table, and keep forwarding the options it
accepts: filters, user_location and search_content_types.
- Add `anthropic-beta-strip`, `anthropic-beta-append`, `inject-diagnostics`, and `client-request-id` options to `ClaudeHeaderDefaults`.
- Support `on`, `off`, and `passthrough` modes for `client-request-id` header handling in Claude requests.
- Sanitize and normalize configured beta override lists and client request ID configuration values.
Closes: #5093
- Add `anthropic-beta-strip`, `anthropic-beta-append`, `inject-diagnostics`, and `client-request-id` options to `ClaudeHeaderDefaults`.
- Support `on`, `off`, and `passthrough` modes for `client-request-id` header handling in Claude requests.
- Sanitize and normalize configured beta override lists and client request ID configuration values.
Closes: #5093