Skip to content

fix(anthropic): restore Fable 5 Vertex simple completions#98932

Merged
steipete merged 4 commits into
mainfrom
codex/fable-5-support
Jul 2, 2026
Merged

fix(anthropic): restore Fable 5 Vertex simple completions#98932
steipete merged 4 commits into
mainfrom
codex/fable-5-support

Conversation

@steipete

@steipete steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Related: #91882

What Problem This Solves

Fixes an issue where users running Claude Fable 5 through Anthropic Vertex simple-completion workflows would fail before the provider request. The lazy plugin stream factory returned a promise where the runtime requires an immediate event stream, and the selected synthetic API alias was then passed into the shared Anthropic transport instead of its canonical API.

Why This Change Was Made

The custom API registry now adapts lazy stream factories once at its synchronous provider boundary while preserving synchronous streams unchanged and converting lazy failures into terminal stream errors. The Anthropic Vertex plugin restores anthropic-messages only after its synthetic simple-completion alias has selected the plugin, so the shared transport cannot recurse through or reject the internal alias.

User Impact

Anthropic Vertex users can use Claude Fable 5 in simple-completion features such as generated conversation labels without an immediate stream-contract or missing-provider failure. Other custom provider streams keep their existing synchronous behavior.

Evidence

  • Before: a live anthropic-vertex/claude-fable-5 simple-completion probe failed with TypeError: s.result is not a function.
  • After: the same live path crossed both fixed boundaries and reached the Google Vertex API. The request then received HTTP 403 because the Vertex AI API is disabled in the available GCP project; no accessible project had Vertex AI enabled, so an authenticated successful model completion was not available for this run.
  • Fable regression matrix: 26 test files, 858 tests, 6 Vitest shards, all passed.
  • Custom registry and Vertex seam: 2 files, 31 tests, all passed.
  • Anthropic Vertex plugin lane: 7 files, 49 tests, all passed.
  • pnpm build: passed; 134.5 seconds.
  • pnpm check:test-types: passed.
  • Focused oxfmt, oxlint, and git diff --check: passed.
  • Final branch-level Codex autoreview against current origin/main: no actionable findings; patch judged correct.
  • Exact-head CI: run 28569082966, all relevant jobs passed.

AI-assisted: yes. The implementation, tests, failure reproduction, and live limitation were reviewed directly before submission.

@steipete steipete self-assigned this Jul 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling extensions: anthropic-vertex size: S maintainer Maintainer-authored PR labels Jul 2, 2026
@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 2:15 AM ET / 06:15 UTC.

Summary
This PR adapts Promise-returning custom API stream factories to the synchronous stream contract and canonicalizes Anthropic Vertex synthetic simple-completion models before shared Anthropic transport, with focused tests.

PR surface: Source +134, Tests +951. Total +1085 across 43 files.

Reproducibility: yes. Source inspection shows current main can return a Promise from the custom API provider while completeSimple immediately calls .result(), and the PR body reports the matching live before-fix failure.

Review metrics: 1 noteworthy metric.

  • Current-main overlap: 39 matching current main, 4 unique to PR head. The stale base inflates the GitHub file list, so maintainer review should focus on the custom registry and Anthropic Vertex stream source/test files that still differ.

Stored data model
Persistent data-model change detected: serialized state: extensions/qa-matrix/src/runners/contract/scenario-runtime-e2ee-destructive.ts, serialized state: extensions/qa-matrix/src/runners/contract/scenario-runtime-state-files.test.ts, serialized state: src/agents/agent-bundle-mcp-runtime.test.ts, serialized state: src/agents/cli-runner.spawn.test.ts, serialized state: src/agents/cli-runner/session-history.test.ts, serialized state: src/agents/sessions/session-manager.tool-result-replay.test.ts, and 5 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Add a redacted successful Vertex-enabled completion only if maintainers require full provider success proof.

Risk before merge

  • [P1] Authenticated successful Anthropic Vertex completion is still unproven; the available live project reached Google Vertex after the fix but returned provider-side HTTP 403 because Vertex AI was disabled.
  • [P1] The PR is nine commits behind current main, although blob comparison shows only four unique files still differ; maintainers should land or refresh against the current merge result rather than reviewing the stale displayed diff at face value.

Maintainer options:

  1. Accept Provider-Boundary Proof (recommended)
    Merge after maintainer review accepts that the after-fix live run crossed the local stream and alias boundaries and failed only on provider-side Vertex project configuration.
  2. Request Vertex-Enabled Success
    Ask for a redacted run from a project with Vertex AI enabled if maintainers require full authenticated completion proof before provider-routing changes land.
  3. Pause If Full Live Proof Is Required
    Hold the PR if Anthropic Vertex routing fixes cannot merge without a successful credentialed model completion.

Next step before merge

  • [P2] The protected maintainer label and Vertex 403 proof limit require a human merge decision; there is no narrow automated repair finding.

Security
Cleared: The unique PR-head diff changes TypeScript runtime and tests only, with no workflow, dependency, lockfile, credential, package, or supply-chain surface change.

Review details

Best possible solution:

Land the four-file boundary fix after maintainer review accepts the Vertex 403 proof limit, or require one redacted Vertex-enabled successful completion before merge.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main can return a Promise from the custom API provider while completeSimple immediately calls .result(), and the PR body reports the matching live before-fix failure.

Is this the best way to solve the issue?

Yes. Adapting lazy plugin stream factories at the custom registry boundary and restoring the canonical Anthropic API inside the Vertex plugin is narrower than making the LLM runtime async or adding a Fable-only caller special case.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e0970cfec572.

Label changes

Label justifications:

  • P2: This is a normal-priority Anthropic Vertex simple-completion regression with focused source evidence and limited provider-specific blast radius.
  • merge-risk: 🚨 auth-provider: The diff changes Anthropic Vertex provider routing for simple completions, and CI cannot prove a successful credentialed Vertex completion.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides before/after live output showing the path moves from a local .result() contract failure to reaching Google Vertex, with the remaining 403 attributed to provider project configuration.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before/after live output showing the path moves from a local .result() contract failure to reaching Google Vertex, with the remaining 403 attributed to provider project configuration.
Evidence reviewed

PR surface:

Source +134, Tests +951. Total +1085 across 43 files.

View PR surface stats
Area Files Added Removed Net
Source 21 269 135 +134
Tests 22 986 35 +951
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 43 1255 170 +1085

What I checked:

Likely related people:

  • steipete: Authored the merged Fable 5 support PR and several recent Anthropic Vertex/model commits touching the repaired provider path. (role: Fable 5 feature contributor and recent area contributor; confidence: high; commits: 0e7b5c34292c, c46610472f92, 1188aa3b81ef; files: extensions/anthropic-vertex/stream-runtime.ts, extensions/anthropic-vertex/api.ts)
  • vincentkoc: Introduced the custom API registry helper history and recently touched Anthropic Vertex live smoke/model behavior near this provider-routing surface. (role: custom API registry and Anthropic Vertex adjacent contributor; confidence: high; commits: 7e946b3c6c25, 25a7e34e117e, e085fa1a3ffd; files: src/agents/custom-api-registry.ts, src/agents/simple-completion-transport.ts, extensions/anthropic-vertex/stream-runtime.ts)
  • openperf: Recently changed the Anthropic Vertex stream runtime around shared Anthropic transport payload handling, adjacent to this API canonicalization fix. (role: recent Anthropic Vertex stream-runtime contributor; confidence: medium; commits: 0fc5a57a3440; files: extensions/anthropic-vertex/stream-runtime.ts)
  • Ayaan Zaidi: The synthetic simple-completion transport path traces back to the simple completion transport registration work. (role: simple completion transport contributor; confidence: medium; commits: 42e708d0055b; files: src/agents/simple-completion-transport.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 2, 2026
@steipete
steipete requested a review from a team as a code owner July 2, 2026 05:51
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: L and removed size: S labels Jul 2, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. label Jul 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: matrix Channel integration: matrix size: XL and removed size: L labels Jul 2, 2026
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 6b5564264aac177534a3f5ff99b68335af7d4b69:

  • Exact-head CI: run 28569082966 — all relevant jobs passed.
  • Fable regression matrix: 26 files, 858 tests, 6 shards passed.
  • Custom registry + Vertex seam: 31 tests passed.
  • Anthropic Vertex plugin lane: 49 tests passed.
  • pnpm check:test-types, pnpm build, focused oxfmt, oxlint, and git diff --check passed.
  • Final branch-level Codex autoreview against current origin/main: no findings; patch judged correct.
  • Live probe: the repaired path crossed both internal boundaries and reached Google Vertex. The available GCP projects have Vertex AI disabled, so the provider returned HTTP 403 and an authenticated successful completion was not available.

Known proof gap: repeat the live completion probe when an approved GCP project has Vertex AI enabled.

@steipete
steipete merged commit 2913d3a into main Jul 2, 2026
123 of 126 checks passed
@steipete
steipete deleted the codex/fable-5-support branch July 2, 2026 06:16
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 3, 2026
…8932)

* fix(anthropic): restore Fable 5 Vertex simple completions

* test(agents): satisfy custom API model types

* test(ci): route reliability test from temp helper

* test(agents): satisfy custom API model types
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
…8932)

* fix(anthropic): restore Fable 5 Vertex simple completions

* test(agents): satisfy custom API model types

* test(ci): route reliability test from temp helper

* test(agents): satisfy custom API model types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: matrix Channel integration: matrix extensions: anthropic-vertex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant