Registry Mirror
Skip to content

Conversation

@immakermatty

@immakermatty immakermatty commented Nov 10, 2026 •

Copy link
Copy Markdown

Why

The AI pools list claude-fable-5-2 (it arrives through the remote model catalog), but every request for it fails with HTTP 400: "Claude Code 2.1.280 does not support this model; version 2.1.290 or newer is required." The fork, at upstream v8.0.41, emulates Claude Code 2.1.280. Upstream fixed this in release v8.0.63 (2026-11-10, tag = 6db7d4b8):

This PR is a plain sync to that release, like #4. The fork itself adds no client identity change.

What changes

Verification (Linux amd64, Go 1.26.10 in the golang:1.26.10 container)

  • go build ./... and go vet on internal/runtime/executor, internal/api and sdk/cliproxy pass; gofmt -l reports nothing.
  • These pass: internal/runtime/executor/... (including the fork's thread fingerprint tests and upstream's new 2.1.321 header test), sdk/cliproxy/..., internal/client/codex/models/..., internal/registry/..., internal/thinking/... and internal/translator/....
  • Lazurio contract test TestCodexChatGPTSignInGateway* passes.
  • Full go test -count=1 ./... in the same container: all 103 packages with tests pass, internal/home and internal/store included. Pablo reported those two groups failing on his runner in ci: keep the upstream AGENTS.md guard out of the Lazurio fork #8 and ci: keep the upstream translator path guard out of the Lazurio fork #9 on unchanged code; they did not fail here.
  • Known upstream flake, not fixed here: internal/api TestServerResponsesWebsocketReauthorizesEachTurn fails in t.TempDir cleanup (the request logger still writes the websocket log). That happens about every second run on pure v8.0.63 too; details are in the review reply.

Not in this PR

  • No image and no deployment. After merge, the container workflow builds this exact merge commit, and Machines qualifies the digest (a real claude-fable-5-2 request, Claude continuity, visible providers, Opus 5.5 and Sonnet unchanged) before any pool runs it. Tracking: HumanAndMachine-ai/Machines#1150.

Status: ready for review.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread f2f15180-9686-4d9a-b659-b051a1658837

🤖 Generated with Claude Code

luispater and others added 30 commits October 27, 2026 07:16
…to client models

- Add `allow_only_codex_cloud_agent_orchestrator` and `allow_only_chatgpt_workspace_executor` configuration fields to Codex client model definitions.
Without a protobuf wrapper, the ciphertext after the Tink prefix byte is
indistinguishable from uniform random bytes. Matching only the 0x01
prefix byte claimed about 1/256 of unenveloped payloads as Gemini: xAI
encrypted_content starting with 0x01 was then rejected by the Grok
validator and dropped from replay, and Kimi signatures were misclassified.

- require the observed Vertex key id (8f3d6b5f) in addition to the
  prefix byte; a rotated key falls back to the bypass sentinel, which is
  the behavior before bare-Tink recognition
- expose IsGeminiVertexBareTinkSignature and scope the Gemini
  Interactions sanitizer: the public endpoint drops bare-Tink thought
  steps, the Vertex Interactions endpoint keeps them
- restore the xAI seed and Kimi ordering tests that had been adjusted
  around the false positive, and add regressions for a 0x01-leading Grok
  payload and an unknown key id
…-thought-signature-7007

fix(signature): recognize and scope Vertex bare-Tink Gemini thought signatures
- Strip SSE data prefixes and ignore control lines before initializing stream state.
- Cover translated content, usage, and completion across vertex authentication paths.

Closes: router-for-me#7025
…aqs-channel-id

fix(signature): do not reject Antigravity CAQS signatures by channel ID
…fix registration

- Rewrite non-empty ModelInfo.Name values in applyModelPrefixes using rewriteModelInfoName so Gemini model listings and detail lookups include configured channel prefixes.
- Add regression tests covering prefixed model name rewriting and end-to-end Gemini model list and detail endpoints.

Closes: router-for-me#7038
…r model catalogs

- Add on-demand model catalog refresh functions in internal/registry with generation and sequence fencing, policy boundary checks, and immediate provider refresh notifications.
- Expose POST /v8/management/routing/model-definitions/refresh and POST /v8/management/models/refresh to trigger catalog refreshes and report resolved sources and changed providers.

Closes: router-for-me#7039
…isconnect

Keep the client's /v1/responses websocket open when an upstream Codex websocket drops during or between turns, report correlated non-closing error frames without replaying in-flight turns, fence pre-loss queued input across handler and executor boundaries, and preserve pinned credential affinity across Home turn releases.

Closes: router-for-me#7028
…e bare patches

- Attach content-free log diagnostics to Devin apply_patch 502 rejections with fixed reason categories, argument byte counts, prefix shapes, and parse error classes.
- Buffer and recover complete, well-framed bare Codex patches from Devin invalid_json_str arguments via applypatch.WrapInput after a clean EOS trailer in streaming and non-streaming execution.
- Keep truncated streams, trailer errors, mixed argument sources, and malformed patches fail-closed without exposing patch content.

Closes: router-for-me#7046
- Build un-defaulted original request payloads for xAI image generation and edit handlers and propagate them via execution context so payload default rules can distinguish omitted client fields from built-in defaults.
- Pass normalized original requests into the xAI image executor payload finalizer and report finalized response_format values back to handlers via metadata callbacks across streaming and non-streaming responses.
- Add unit and handler regression tests covering payload default, default-raw, and override rules for xAI image endpoints.

Closes: router-for-me#7048
…onversion

Convert structured Vertex functionCall.partialArgs fragments into OpenAI
Chat Completions, OpenAI Responses, and Claude Messages streaming tool
argument deltas while preserving call identity, nested JSONPath assembly,
string continuations, thought signatures, placeholder argument cleaning,
and incomplete-stream guards.

Fixes router-for-me#7043
…losing downstream

When an upstream Codex WebSocket returns an early 429 usage_limit_reached (via an error or response.failed frame) before any downstream payload chunk is emitted, notifying UpstreamDisconnectChan caused the Responses WebSocket handler to close the client connection and cancel the request context before the conductor could fail over to another eligible credential.

Suppress downstream disconnect notification on pre-output upstream WebSocket errors and treat bootstrap usage-limit terminal failures as failover-eligible while bootstrap buffering is active, allowing the conductor to retry another credential on the same downstream WebSocket connection.

Fixes router-for-me#7051
…usting descriptors

Defer eager request body reads and temporary file creation until after authentication or over the 1 MiB in-memory threshold, expire read deadlines and close connections when responses finish with unconsumed request bodies, bound HTTP header and unauthenticated RESP setup reads, and retry transient EMFILE/ENFILE accept errors with exponential backoff.

Fixes GHSA-j4xx-x47j-7h54
…t logging

- Cap captured request body zstd decompression to max-request-body-bytes or 32 MiB when no smaller limit is configured, and remove the unbounded decode helpers.
- Restrict the request-log zstd decoder to concurrency 1 and an 8 MiB maximum window so frames declaring oversized windows fall back to logging raw bytes.
- Add regression tests covering unconfigured limits, single-segment window bombs, and oversized zstd windows.

Closes: GHSA-4w5v-m7vx-jpmh
…ailability

docs(readme): update Kimi and OpenAI model availability
…decode-sync-zstd

perf(executor): decode upstream zstd synchronously and sniff unlabeled bodies lazily
…ndow

Every compressed response created a new encoder: zstd with its default
8 MiB window allocated about 18 MB, gzip about 1 MB, and an open SSE
stream held that for its whole life. Pool zstd and gzip encoders, and
give zstd a 1 MiB window with lower encoder memory; API responses are
far smaller than the window, so the wire size is unchanged. finish now
returns the encoder to the pool and fails later writes instead of
sending them uncompressed under Content-Encoding.
BenchmarkResponseCompressionOpenStreams took its baseline after one GC,
which only moves pooled encoders to the sync.Pool victim cache. Streams
then reused memory the baseline already counted, so heap per open stream
collapsed toward zero once b.N > 1. Run two GC cycles before the baseline
so every sample starts with empty pools.

TestResponseCompressionReusesPooledEncoders now counts encoder creations
and fails when finished encoders are not returned to the pool. It also
interleaves responses whose client writes fail, so an encoder pooled
after an error must still produce correct output.
…E framing recovery

- Filter out internal metadata events such as moderation data for standard clients in OpenAI responses API and websocket streams.
- Enhance `responsesSSEFramer` and frame accumulator to robustly handle fragmented JSON payloads, empty data fields, and recovery of split SSE fields.
- Add comprehensive unit tests covering SSE metadata filtering, fragmented frame recovery, and websocket message handling.
- Track the running response identity in the Codex websocket session and reject interrupts that do not target it, so an interrupt after response.completed is never forwarded upstream while turn teardown is pending.
- Gate the handler's local interrupt path by explicit turn ownership and close it before terminal payloads are written downstream, preventing fabricated response.incomplete events and silently dropped claimed frames.
- Add deterministic regression tests covering late and unknown interrupts across completion, failure, queued rejection, upstream loss, and HTTP fallback turns.

Closes: router-for-me#7065
luispater and others added 5 commits November 10, 2026 04:00
…nses without reasoning

- gate automatic image_generation tool injection for use_responses_lite catalog models on actual Responses-Lite routing (including credential and model header overrides) or presence of reasoning effort
- retract untouched auto-injected image_generation tools during single-pass payload finalization when user payload rules configure reasoning effort or switch to an incompatible route
- update Codex executor and payload barrier regression tests across HTTP and WebSocket streaming and non-streaming paths

Closes: router-for-me#7384
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 router-for-me#7386
…li-baseline-2.1.321

fix(claude): bump Claude Code CLI fingerprint baseline to 2.1.321
…laude Fable 5.2

- 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: router-for-me#7386
Co-authored-by: Dylan <1990016@gmail.com>
Brings the fork from upstream v8.0.41 to v8.0.63 (6db7d4b). v8.0.63
serves Claude Fable 5.2: the model is in the embedded registry and the
emulated Claude Code baseline is 2.1.321, which Anthropic requires for it.

One conflict, in internal/runtime/executor/claude_executor_tool_state.go,
resolved hunk by hunk:
- imports: upstream's ojson next to the fork's helps and cliproxyauth;
- upstream's new prepareClaudeOAuthToolNamesForRequestDoc is kept and reads
  the aliases from the fork's thread state (state.aliases);
- rememberClaudeOAuthToolAliases keeps the fork's thread fingerprint
  parameter and uses ojson like the rest of upstream.

Upstream dropped github.com/tidwall/gjson, so the fork's remaining uses
(tool state and three tests) move to ojson.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

This repository does not allow modifying AGENTS.md in pull requests.

Detected changes:

  • AGENTS.md

Please revert these changes and open a new PR without touching AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@immakermatty
immakermatty marked this pull request as ready for review November 10, 2026 08:04
@agentrozjedemeai

Copy link
Copy Markdown
Collaborator

@immakermatty Please assign the person responsible for taking this PR through to main.

— Pablo

@agentrozjedemeai

Copy link
Copy Markdown
Collaborator

@immakermatty The required go test -count=1 ./... failed in TestServiceHeartbeatFailoverDoesNotDrainBlockingScope; the same test failed once in five isolated runs because the new retry delay can approach one second while the test waits only one second, so please make the test reliably accommodate the retry and arrange review of the remaining upstream diff (1,191 changed files); this attempt has not completed the whole-diff review and records no verdict.

— Pablo

@immakermatty immakermatty self-assigned this Nov 10, 2026
@immakermatty

Copy link
Copy Markdown
Author

Assigned to @immakermatty. This thread works under Matěj's mandate for this change: once Pablo approves the exact head (76e503c9, checks green), it merges with --match-head-commit and then dispatches the container build. The review request to agentrozjedemeai stays open: an approval on this head is still needed.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread f2f15180-9686-4d9a-b659-b051a1658837

@agentrozjedemeai

Copy link
Copy Markdown
Collaborator

The review run for head 76e503c ended without a verdict after 1 attempt, so no review of this head is on its way.

  • Attempt 1: blocked

What blocks it: #7 (comment)

To get a review, push a new head, or ask @immakermatty, the person responsible for Dispečer, to start the review again.

— Dispečer

Upstream ce433b3 delays the first subscriber retry by 0.5 to 1 s and moved
the sibling tests to 3 * homeSubscriberRetryInitial, but this test still
waited 1 s for the second subscription, so it failed when the jitter came
close to a second (found in review of #7). Use the same bound.

Also gofmt the three fork tests whose imports moved from gjson to ojson.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@immakermatty

immakermatty commented Nov 10, 2026 •

Copy link
Copy Markdown
Author

Thanks. New head 2534445e.

1. TestServiceHeartbeatFailoverDoesNotDrainBlockingScope: fixed. You are right. Upstream ce433b37 makes the first subscriber retry wait 0.5–1 s (equal jitter on homeSubscriberRetryInitial) and moved the sibling tests to 3 * homeSubscriberRetryInitial, but this test still waited 1 s for the second subscription. It now uses the same bound. go test -count=30 -run '^TestServiceHeartbeatFailoverDoesNotDrainBlockingScope$' ./sdk/cliproxy/ passes 30/30. The same commit runs gofmt on the three fork tests whose imports moved from gjson to ojson.

2. A second upstream flake, reported here, not fixed: internal/api TestServerResponsesWebsocketReauthorizesEachTurn. Its assertions pass. Its t.TempDir cleanup fails because the server's request logger still writes the websocket session log into auth/logs after the test returns (unlinkat …/auth/logs: directory not empty). It is identical on pure upstream: in a detached v8.0.63 checkout, 11 of 20 runs fail with -count=20, the same as on this branch (12/20). It also failed 19 of 40 separate -count=1 runs on this branch. The fork does not touch internal/api/server_test.go or the request logger. A real fix makes the server wait for hijacked websocket handlers before shutdown. That is a product change in upstream code, not part of a sync, so I would leave it to upstream. Please judge whether that blocks this sync. Otherwise go test -count=1 ./... passes here in golang:1.26.10, internal/home and internal/store included.

3. Review scope of the 1,191 files. These are upstream's released commits v8.0.41..v8.0.63. As in #4, the fork's question is what the merge changes relative to upstream. That surface is small and checkable:

git diff --name-only v8.0.63 2534445e        # 23 files: the fork's own 20, the two guard workflows (#8, #9) and the heartbeat test fix
git diff v8.0.63 2534445e                    # the fork delta on top of v8.0.63
git show 61b8996b -- internal/runtime/executor/claude_executor_tool_state.go   # the conflict resolution (combined diff)
git diff v8.0.41 590785d6 > a; git diff v8.0.63 2534445e > b   # fork delta before vs after

For the change this sync exists for, the relevant upstream commits are b4e7dbd2 (Claude Code baseline 2.1.321, upstream router-for-me#7392 fixing router-for-me#7386), 19a0a854 (claude-fable-5-2 in the embedded registry) and 6db7d4b8 (Fable 5.2 thinking and timing gates). A line-by-line review of upstream's whole release is not something the fork's sync has ever needed, and I propose not to make it a condition here. If you want a specific upstream area reviewed (for example the gjson→ojson migration in the Claude executor), name it and I will add evidence for it. Please record a verdict on 2534445e.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread f2f15180-9686-4d9a-b659-b051a1658837

@agentrozjedemeai

Copy link
Copy Markdown
Collaborator

@immakermatty The full review is incomplete: I checked the fork's Claude conflict resolution and heartbeat fix, and go test -count=1 ./... and the server build passed, but I did not review the complete upstream diff of 1,191 files (131,174 additions and 29,542 deletions); please arrange review of the remaining changes before a verdict.

— Pablo

@agentrozjedemeai

Copy link
Copy Markdown
Collaborator

Review continuation on head 2534445eeda64e0f5bcfc50c06242822dcf33833: I inspected the HTTP response compression, request-body handling, protocol multiplexer, OAuth session changes, Claude executor merge delta, and the Fable registry entry; git diff --check passed and GitHub build and contract checks are green. The earlier full test run and server build passed. I have not completed the remaining upstream executor, translator, authentication, plugin and SDK changes, so this attempt cannot record a complete review or verdict. The previously reported intermittent websocket test cleanup failure remains unresolved. Further review is needed on this same head.

— Pablo

@agentrozjedemeai

Copy link
Copy Markdown
Collaborator

The review run for head 2534445 ended without a verdict after 1 attempt, so no review of this head is on its way.

  • Attempt 1: blocked

What blocks it: #7 (comment)

To get a review, push a new head, or ask @immakermatty, the person responsible for Dispečer, to start the review again.

— Dispečer

@immakermatty

Copy link
Copy Markdown
Author

@agentrozjedemeai Matěj's decision on the review scope, given in this thread's T3 conversation on 2026-11-11 ~05:30Z (relayed by his agent):

For a merge-based sync of the fork onto a released upstream tag, review covers the fork's delta against that upstream tag (the files in which the fork differs), the conflict resolution and the tests. Upstream code itself is not reviewed line by line: its gate is the upstream release and our qualification on a real pool (Ring 0).

For this PR that scope is:

Please record a verdict on 2534445e within that scope.

The intermittent TestServerResponsesWebsocketReauthorizesEachTurn cleanup failure comes from upstream (it fails equally on a detached v8.0.63, and the fork delta does not touch internal/api/server_test.go or the request logger). Issues are disabled in this repository, so it is recorded here and in the thread handoff instead of as an issue.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread f2f15180-9686-4d9a-b659-b051a1658837

@immakermatty
immakermatty requested review from agentrozjedemeai and removed request for agentrozjedemeai November 11, 2026 05:27
@agentrozjedemeai

Copy link
Copy Markdown
Collaborator

@immakermatty The review remains incomplete: I checked the Claude conflict resolution, heartbeat test change and Codex refresh journal, and the full Go test suite and server build passed, but the remaining upstream diff has not been reviewed in full (1,191 files); please arrange completion of that review before a verdict. The PR body also claims identical fork-delta file lists, but the stated commands currently return 22 and 23 files respectively; the additional file is the heartbeat test.

— Pablo

@immakermatty

Copy link
Copy Markdown
Author

Merged without a review verdict, by Matěj's explicit decision (2026-11-11 ~05:50Z, his answer through the question tool in this thread's T3 conversation: "Mergnout #7 bez Pabla").

The two positions:

  • Pablo (agentrozjedemeai) records no verdict until the complete upstream diff v8.0.41..v8.0.63 (1,191 files, +131,174/−29,542) has been reviewed. In his runs on this head he checked the Claude conflict resolution, the heartbeat test change, the Codex refresh journal, HTTP response compression, request-body handling, the protocol multiplexer, OAuth session changes and the Fable registry entry, and he ran the full go test -count=1 ./... and the server build, which passed. He did not complete the remaining upstream executor, translator, authentication, plugin and SDK changes. He also found an inaccuracy in this PR's description (the fork-delta file lists are 22 and 23 files, not identical), now corrected.
  • Matěj (Organization Owner): for a merge-based sync onto a released upstream tag, the review covers the fork's delta against that tag, the conflict resolution and the tests. Upstream code itself is not reviewed line by line. Its gates are the upstream release and our qualification on a real pool (Ring 0) before any other pool.

What passed on 2534445e: GitHub build and contracts (Lazurio contract tests); the two upstream guards are skipped in the fork (#8, #9); locally, go test -count=1 ./... (all packages, Go 1.26.10) and go vet on the touched packages. Still open: the upstream flake TestServerResponsesWebsocketReauthorizesEachTurn (t.TempDir cleanup races the request logger; it fails equally on pure v8.0.63). Issues are disabled in this repository, so it is recorded here.

What stays gated: no pool runs this code until Machines qualifies the published image digest (a real claude-fable-5-2 request, Opus 5.5 and Sonnet unchanged, Codex visible providers, Claude continuity), Pablo approves that Machines PR, and Ring 0 accepts it.

Merge: gh pr merge 7 --merge --match-head-commit 2534445eeda64e0f5bcfc50c06242822dcf33833.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread f2f15180-9686-4d9a-b659-b051a1658837

@immakermatty
immakermatty merged commit f12bf51 into main Nov 11, 2026
7 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.