- 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
- Introduce `CleanJSONSchemaForAntigravityClaudeTool` and model-aware schema sanitization helpers to flatten multi-branch `anyOf`/`oneOf` unions specifically for Antigravity Claude tool parameter schemas.
- Preserve multi-branch union support for Gemini model variants while preventing Claude backend HTTP 400 validation errors on nested unions.
- Ensure proper inheritance of nullable markers and idempotency across the translator and executor chain.
Closes: #3662
- Translate Gemini `MALFORMED_FUNCTION_CALL` responses into Claude API error payloads instead of refusal stop reasons.
- Capture translated stream errors in Gemini and Vertex executors to ensure proper error propagation, usage reporting, and state management.
Closes: #6606
- Introduce `defaultClaudeChatMaxTokensForModel` to determine default max tokens based on model metadata and fallback rules.
- Update `ConvertOpenAIRequestToClaude` to apply model-specific default max tokens and handle null `max_tokens` or `max_completion_tokens`.
- Implement `stripTranslatedDefaultMaxTokens` in Claude executor to allow payload default rules to override synthesized max tokens when omitted by the caller.
Closes: #6601
- Introduce `sdk/httptransport` package with `Decorator`, `WithDecorator`, `WithoutDecorator`, `InheritDecorator`, and `Decorate` functions.
- Propagate transport decorators from incoming HTTP request contexts in `BaseAPIHandler.GetContextWithCancel`.
- Apply transport decoration after client transport selection across proxy-aware, Devin, uTLS, and Antigravity HTTP clients.
Closes: #5616
- Retain multi-branch `anyOf` and `oneOf` unions instead of flattening them into a single branch.
- Normalize `oneOf` to `anyOf` on native Gemini/Antigravity schema carriers while preserving `oneOf` when standard constraints are allowed.
- Materialize required-only union branches using parent object properties.
- Strip null and boolean `false` branches from unions, applying `nullable: true` and description hints where appropriate.
Closes: #3662
Anthropic keeps the prompt cache when deferred tools are added, but not when a request goes from no deferred tool to one. Codex hides deferred tools until a search returns them, so the request after the first discovery always missed the cache. Native tool search now declares one constant deferred anchor tool ahead of discovered tools, so discoveries only append to tools[].
The OAuth path injects a currentDate reminder, so the golden recorded on 2026-10-11 failed on any other day. Pin claudeCodeCurrentTimeFunc to the recording day and reset Claude diagnostics in renderToolSearchExecutorGolden.
With cloaked Claude OAuth, the model sometimes emits a caller-owned MCP tool
under the request-local virtual server while keeping the tool's full name,
e.g. mcp__<virtual>__mcp__<server>__<tool>. The existing recoveries only
handle the <server>__<tool> and <tool> tails, so this form is forwarded as an
undeclared tool name and the client cannot dispatch it.
Add a first recovery step that maps the suffix back when it is exactly the
full name of a declared passthrough tool. Ambiguous suffixes still fail
closed through the existing recovery path.