Skip to content

chore(sync): merge upstream v8.1.2 - #33

Merged
yordis merged 348 commits into
mainfrom
yordis/chore-sync-upstream-v8.1.2
Nov 24, 2026
Merged

yordis merged 348 commits into
mainfrom
yordis/chore-sync-upstream-v8.1.2

Conversation

@yordis

@yordis yordis commented Nov 24, 2026

Copy link
Copy Markdown
Member
  • The fork was about 321 upstream commits behind, and the weekly sync failed on content conflicts in the server imports and the config loader.
  • Upstream moved config parsing into a new loader, so the loader takes upstream's version. The Codex turn cost defaults live in the relocated parse defaults and carry over unchanged.
  • Upstream has no turn cost analytics, pricing table or unknown-route logging, so the fork features stay.

luispater and others added 30 commits November 13, 2026 23:09
…g-safe

- Default credential-bound plugin executors to OAuth model scope and skip static ModelRegistry clients unless ExecutorModelScopeStatic is explicitly set.
- Keep StaticModels catalog collection enabled for OAuth-scoped plugins without leaking static models into ModelRegistry or credential fallback appends.
- Decouple OAuth executor provider binding from catalog provider names and add regression coverage for exclusions, aliases, disabled state, and management catalog definitions.

Closes: router-for-me#7512
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
…e HTTP 200 commit

- 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: router-for-me#7513
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
- Cache verified management secret HMAC-SHA256 digests bound to the active bcrypt hash for a one-hour TTL while coalescing concurrent cold-cache verifications.
- Invalidate cached verification entries on management secret changes in SetConfig and ConfigV8 while preserving failure counting, IP ban checks, and non-caching of invalid keys.
- Add deterministic unit tests, a ConfigV8 HTTP integration test, and a benchmark covering TTL expiration, rotation, concurrency coalescing, and ban preservation.

Closes: router-for-me#7519
Co-authored-by: Dylan <1990016@gmail.com>
Co-authored-by: lzt404 <2596933790@qq.com>
…gin listing

- Add Priority *int to pluginListEntry, populated from the host RegisteredPlugins snapshot so clients can verify effective ordering, including zero and negative values.
- Gate exposure to the maintained v8 route while leaving the deprecated v0 response shape unchanged, and add RegisterPluginWithPriorityForTest to cover non-default priorities in tests.

Closes: router-for-me#7522
…sponse interceptors

- Build interceptor metadata in WriteModelListResponse from the authenticated gin context (caller_scope, access_provider, frontend_auth_metadata) instead of always passing nil.
- Reuse requestCallerScope so model-list requests share the same irreversible caller handle as execution paths, enabling per-key catalog filtering including ?key= credentials.
- Forward the same metadata to the request lifecycle tracker and add regression tests for identity forwarding, metadata isolation, and unauthenticated nil metadata.

Closes: router-for-me#7524
- Wrap the final 429 in a poolCooldownTerminalError at the Execute/ExecuteCount/ExecuteStream boundaries when every candidate credential for the model is blocked and at least one is in a timed cooldown, preserving the upstream error body and status while marking IsModelCooldown so the Claude handler appends the reset time.
- Compute the Retry-After from the earliest auto-recovery across all blocked candidates (including non-cooldown timed blocks) so the client sees the pool's real recovery instead of the last attempt's hint.
- Add regression coverage for both cooldown variants across the three execution paths, the available-candidate guard, mixed-block earliest deadlines, the sub-floor hint clamp, and the Claude handler end-to-end.

Closes: router-for-me#7521
…tional pool-wide protective pause

- 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: router-for-me#7515
- Resolve and validate the target Codex credential proxy_url in StartSIWCBind and construct the OAuth client via codex.NewCodexAuthWithProxyURL so account proxy takes precedence over global proxy without falling back on failure.
- Update siwcOAuthFactory to pass the resolved account proxy URL and add regression tests covering account proxy precedence, global proxy inheritance, direct bypass, unreachable proxy failure, and credential field preservation.

Closes: router-for-me#7531
…ishReason before HTTP 200 commit

- 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: router-for-me#7536
…igravity, Devin, and Claude

- 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: router-for-me#7540
…ck and delegation

- Add ExcludeCandidates with PascalCase and snake_case ojson decoding to pluginapi.SchedulerPickResponse and preserve normalized exclusions in pluginhost when unhandled or delegated.
- Filter excluded auth IDs per selection pass in Manager before priority tiering and built-in selector evaluation so healthy lower-priority credentials can promote without mutating caller tried state.
- Add unit tests covering JSON/RPC compatibility, host normalization, priority promotion, session affinity, and cooldown/empty-pool errors.

Closes: router-for-me#7535
…or interactions

- Convert generationConfig responseModalities, imageConfig, responseMimeType, and responseSchema fields into top-level response_format entries while stripping unsupported nested fields from generation_config.
- Flatten urlContext, codeExecution, and googleSearch builtin tool options onto the tool object top level and convert searchTypes objects into snake_case search_types arrays.
- Update builtin tool tests and add translator and Gemini executor regression tests for Issue router-for-me#7544.

Closes: router-for-me#7544
…y-cpa-readme

docs(readme): update Oh-My-CPA description
- Only enable the protective pause when a positive duration is explicitly configured.
- Treat unset, invalid, and nonpositive windows as disabled.
- Register Argon, Carbon, and Hydrogen with supported modalities and web search.
- Add the `xhigh` thinking level to supported models.

Closes: router-for-me#7561
…ate provider lookups

- 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: router-for-me#7558
…nd delete

- Reconcile v8 credential uploads through SynthesizeAuthFile without redundant local store rewrites, preserving plugin-assigned IDs, FileName values, multi-record expansions, and symlinked destinations while retiring stale records from overwritten files.
- Pass synthesis fallback AuthDir out-of-band during plugin parsing so omitted IDs resolve relative to AuthDir without mutating AuthParseRequest.Host or overriding explicit path-based IDs.
- Remove all in-memory auth records backed by a deleted file in v8 credential deletion and snapshot handler config under lock for race-free synthesis.

Closes: router-for-me#7557
- Extract positive HTTP 429 retry delays from Google RPC RetryInfo/ErrorInfo details, Retry-After headers, and human-readable error messages while preserving zero-delay semantics in ParseRetryDelay.
- Propagate parsed retryAfter hints on non-2xx status errors across Gemini and Vertex executors, including Gemini Interactions non-stream and stream paths.
- Add deterministic regression tests covering cooldown scheduling, Retry-After header and message parsing edge cases, and Antigravity zero-delay compatibility.

Closes: router-for-me#7565
…pletions

- Skip inlineData and inline_data parts marked with thought=true when translating Gemini and Antigravity responses to OpenAI chat completions so intermediate draft images do not leak into images[].
- Suppress empty streaming deltas for standalone thought image chunks while preserving tool signature boundaries and empty-stream guards.

Closes: router-for-me#7566
…tion path

- Add Builder.WithExecutorWrapper applied in the centralized registerExecutor gate so embedder wrappers survive startup sync, auth, and model refresh paths that bypass OnConfigApplied.
- Track the service-owned underlying executor per provider with manager revisions to preserve Claude WithConfig reuse and Codex/XAI session sharing across wrapping without double-wrapping.
- Harden replacement lifecycle for wrapped executors, including shared-session preservation, stale-ownership invalidation, and safe traversal of opaque or cyclic wrappers.

Closes: router-for-me#7568
…sponses translator

- Convert Gemini inlineData image parts to Responses image_generation_call output items in both streaming and non-streaming paths so /v1/responses returns generated images instead of dropping them.
- Exclude thought images, gate on supported image mime types, dedupe streamed image parts by sha256, and preserve thought signatures attached to image parts.

Closes: router-for-me#7569
- 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: router-for-me#7571
- 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: router-for-me#7576
- Unpin and exclude the failed credential when a full response.create on a persistent Responses WebSocket fails with a pre-commit quota or auth error.
- Propagate excluded auth IDs through handler metadata into mixed and Home stream selection while blocking replay once any downstream frame is committed.
- Add regression tests for pre-commit 429 failover, post-commit non-replay, and Home repeated excluded-auth rejection.

Closes: router-for-me#7585
…ia-readme

docs: add Hyphantria to Who is with us
luispater and others added 28 commits November 23, 2026 22:45
- Remove stale snake_case thinking_config after preserving its include-thoughts intent for level and budget application.
- Add regression coverage for both valid budget and level paths to prevent duplicate protobuf field names.

Closes: router-for-me#7923
- Return the request envelope error from the exported Antigravity Responses translator so callers receive unsupported-part failures.
- Assert that rejected input_file-only user turns preserve the translated JSON body and expose the HTTP 400 error contract.

Closes: router-for-me#7921
- Treat object schema type values case-insensitively when adding VALIDATED placeholders.
- Add regression coverage for empty uppercase OBJECT tool schemas.

Closes: router-for-me#7925
- Apply credential-level TOS suspension regardless of HTTP status, including skipped cooldown cases.
- Preserve unavailable state when cooling is disabled and add focused regression coverage.

Closes: router-for-me#7924
- Emit text blocks for grounding supports that have no resolvable citation URLs.
- Add a regression test that verifies uncited segments remain in the reconstructed response.

Closes: router-for-me#7928
- Return existing models when Antigravity catalog availability is unknown instead of treating nil as an authoritative empty catalog.

- Add regression coverage distinguishing unknown catalogs from known empty catalogs.

Closes: router-for-me#7927
- Default missing Claude tool input to an empty argument object so functionCall parts remain in the translated request.
- Cover paired function calls and responses with a regression test for parameterless tool use.

Closes: router-for-me#7930
- Ignore null and empty finish reasons so streaming responses are not finalized before later content arrives.
- Flush buffered web-search text on stream completion and cover delayed finalization with regression tests.

Closes: router-for-me#7929
- Merge adjacent pure user contents before serializing Antigravity Interactions requests.
- Batch consecutive parts in the shared helper to preserve tool boundaries without quadratic payload copying.

Closes: router-for-me#7933
- Default omitted function call arguments to an empty JSON object for OpenAI streams.
- Preserve delayed argument chunks for streaming function calls and add regression coverage.

Closes: router-for-me#7932
- Emit valid forward signature carriers when streaming responses contain signed empty function calls.
- Add regression coverage for empty calls at stream start and after visible text.

Closes: router-for-me#7931
- Validate finish reasons as non-empty strings before emitting terminal stream events.
- Cover null and empty intermediate finish reasons with an end-to-end stream regression test.

Closes: router-for-me#7935
- Keep max token stream termination as MAX_TOKENS for Gemini clients.
- Cover max token and default stop termination behavior with regression tests.

Closes: router-for-me#7936
- Default missing Claude tool input to an empty object so Gemini receives a matching functionCall.
- Add regression coverage for functionCall and functionResponse pairing when input is omitted.

Closes: router-for-me#7937
- Reject incomplete summaries before sealing Antigravity compaction responses.
- Preserve cached and reasoning token details in compaction responses and streams.

Closes: router-for-me#7934
- Emit valid JSON object strings for parameterless streaming and non-streaming tool calls.
- Cover both Gemini response paths with regression assertions for string type and value.

Closes: router-for-me#7938
- Disable Claude thinking when max tokens cannot fit the minimum supported budget.
- Add regression coverage for minimum and sub-minimum output token limits.

Closes: router-for-me#7954
- Rewrap stream bootstrap errors with the original attempt ID across new and existing bootstrap paths.
- Add regression coverage for preserving outer and inner attempt metadata.

Closes: router-for-me#7953
- Normalize omitted or blank Claude tool_use input to an empty JSON object string for Codex.
- Add a regression test that verifies the argument value and its JSON string type.

Closes: router-for-me#7939
- Exclude fork parent cache aliases from result-driven affinity updates.
- Add a regression test proving failed forks retain the parent binding.

Closes: router-for-me#7952
- Parse structured and header retry hints for HTTP 503 capacity responses.
- Verify the propagated delay is used by model cooldown scheduling.

Closes: router-for-me#7957
- Reuse the shared OpenAI file-data normalizer for assistant image parts to preserve base64 payloads with media parameters.
- Add a regression test covering parameterized assistant image data URLs.

Closes: router-for-me#7958
- Combine function declarations with code execution and URL context tools when translating mixed Chat Completions requests.
- Update native tool regression coverage while retaining the dedicated Google Search isolation behavior.

Closes: router-for-me#7959
- Prevent buffered Gemini policy text from reaching clients after scanner failures.
- Reject truncated successor frames and cover Gemini and Vertex authentication paths.

Closes: router-for-me#7956
- Scope pooled transports by stable auth identity and a digest of the refresh grant.
- Add a regression test proving replacement credentials use a distinct TCP connection.

Closes: router-for-me#7961
- Convert Imagen requests and responses consistently across API-key and service-account execution paths.
- Handle non-streaming Imagen JSON directly on stream APIs while preserving final payload rule ordering.

Closes: router-for-me#7955
- Scope Claude signature recovery and writes to the active credential.
- Preserve scoped cache continuity across verified token refreshes.
- Fail closed for unscoped recovery and credential replacement.
- Add stream and non-stream multi-account isolation regression coverage.

Closes: router-for-me#7960
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@yordis
yordis merged commit 4c72e0c into main Nov 24, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants