Skip to content

fix(anthropic): wire buildGuardedModelFetch into the Cloudflare createClient branch#98003

Merged
altaywtf merged 3 commits into
openclaw:mainfrom
wangmiao0668000666:fix/anthropic-cloudflare-fetch-wiring
Jul 3, 2026
Merged

fix(anthropic): wire buildGuardedModelFetch into the Cloudflare createClient branch#98003
altaywtf merged 3 commits into
openclaw:mainfrom
wangmiao0668000666:fix/anthropic-cloudflare-fetch-wiring

Conversation

@wangmiao0668000666

@wangmiao0668000666 wangmiao0668000666 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Anthropic provider (anthropic.ts) creates five Anthropic SDK clients — one for Cloudflare AI Gateway, one for GitHub Copilot, one for Microsoft Foundry bearer auth, one for OAuth, and one for the API-key fallback. None of them passed a custom fetch option. Streaming Anthropic calls from these providers bypassed the guarded provider transport — SSRF protection, request timeout, retry-hint injection, and response lifecycle management that every other Anthropic SDK path already has.

This PR injects fetch: buildGuardedModelFetch(model) into the Cloudflare AI Gateway SDK constructor specifically, bringing that branch to guarded-fetch parity with:

This is one of five split PRs that supersede #97868.

Why This Change Was Made

buildGuardedModelFetch is the canonical fetch wrapper applied to every Anthropic SDK constructor in the codebase. The Anthropic SDK accepts fetch?: Fetch per its constructor options. The Cloudflare branch was missing this wrapper.

The change is 2 lines in production code (+1 import, +1 fetch: option). The proof is focused on showing the guard is actually in scope and active:

  • A mocked constructor assertion in anthropic.test.ts.
  • An SSRF-block test that stubs globalThis.fetch and proves the guard intercepts a private IP before the SDK reaches the default fetch.

Evidence

node scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts \
  src/llm/providers/anthropic.test.ts \
  src/llm/providers/anthropic-cloudflare.fetch-proof.test.ts \
  --run

Results:

 Test Files  2 passed (2)
      Tests  37 passed (37)
   Duration  4.87s

Layer 1: Constructor wiring

anthropic.test.ts asserts the Cloudflare branch config now includes a fetch: function.

Layer 2: SSRF-block guard-specific proof

anthropic-cloudflare.fetch-proof.test.ts stubs globalThis.fetch as a call counter, configures baseUrl: http://169.254.169.254/v1, and asserts globalFetchCalled === 0. This proves buildGuardedModelFetch intercepts the blocked target before the SDK falls back to globalThis.fetch.

Maintainer-hosted smoke

@altaywtf ran a hosted live smoke against the fixed cloudflare-ai-gateway Anthropic constructor branch using a real Anthropic API request; that passed.

Real behavior proof

  • Behavior addressed: createClient in src/llm/providers/anthropic.ts (Cloudflare branch) now passes fetch: buildGuardedModelFetch(model) to new Anthropic({...}), so Anthropic calls routed through the Cloudflare AI Gateway inherit OpenClaw guarded-fetch policy.
  • Real environment tested: Linux x86_64, Node v22.22.0, local source checkout.
  • Exact steps: see Evidence above.
  • Evidence after fix: 37/37 tests pass. Layer 1 proves the wrapper is wired; Layer 2 proves the guard actively blocks private-IP targets.
  • Observed result after fix: the Cloudflare Anthropic constructor now carries a custom fetch, and the guard rejects 169.254.169.254 before any network call.
  • What was not tested: no live Anthropic API call from the author side (no API key); no true Cloudflare AI Gateway end-to-end routed request (no CLOUDFLARE_AI_GATEWAY_* account or gateway secrets). Maintainer-hosted smoke validated the constructor branch against a real Anthropic endpoint.

Diff scope

3 files changed, 63 insertions(+), 14 deletions(-)
  src/llm/providers/anthropic.ts                              |  2 ++
  src/llm/providers/anthropic.test.ts                         |  2 +-
  src/llm/providers/anthropic-cloudflare.fetch-proof.test.ts  | 59 ++++++++++
  • Source: 2 insertions in anthropic.ts
  • Tests: constructor wiring assertion + SSRF-block test

Security & Privacy

  • Hardening change: previously-unwrapped Cloudflare Anthropic SDK fetch calls now inherit OpenClaw SSRF guard, timeout, retry hints, and response lifecycle.
  • No new network calls, no persisted data, no secret logging.
  • Standard Anthropic SDK fetch option; no monkey-patching.

Compatibility

  • Existing Cloudflare AI Gateway Anthropic requests now use guarded fetch instead of SDK-default fetch. Default endpoints are transparent.
  • Custom base URLs (enterprise proxy, self-hosted gateway) now inherit the same SSRF policy as sibling guarded Anthropic paths.
  • Risk acknowledged: custom endpoints that worked with unguarded SDK-default fetch may now fail closed under SSRF policy. This is the intended hardening behavior and matches all other Anthropic SDK paths.
  • No config/env changes, no migration.

Related

AI disclosure

AI-assisted (Claude); reviewed by human author before submission.

@clawsweeper

clawsweeper Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 6:13 AM ET / 10:13 UTC.

Summary
The PR adds buildGuardedModelFetch(model) to the Cloudflare AI Gateway Anthropic SDK constructor and adds constructor plus SSRF-block regression coverage.

PR surface: Source +2, Tests +63. Total +65 across 3 files.

Reproducibility: yes. from source: current main constructs the Cloudflare Anthropic client without a custom fetch, and the PR test demonstrates the missing guard by blocking a private-IP base URL before global fetch is reached. I did not run tests in this read-only review checkout.

Review metrics: 1 noteworthy metric.

  • SDK constructor transport surface: 1 changed. Only the Cloudflare Anthropic SDK constructor moves from SDK-default fetch to OpenClaw guarded fetch, which is the compatibility-sensitive merge decision.

Root-cause cluster
Relationship: canonical
Canonical: #98003
Summary: This PR is the canonical Cloudflare branch slice of the broader Anthropic guarded-fetch constructor parity work; the closed combined PR is superseded, while four open siblings cover separate constructor branches.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
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:

  • none.

Risk before merge

  • [P1] Existing Cloudflare Anthropic custom, private, proxy, or unusual endpoints that worked through the Anthropic SDK default fetch can now fail closed under OpenClaw SSRF policy, request timeout, proxy, retry, or managed-response lifecycle behavior.
  • [P1] The change intentionally moves one provider branch onto a stricter transport path; maintainers should treat that as accepted hardening before merge rather than as a CI-only question.

Maintainer options:

  1. Accept guarded-transport parity (recommended)
    Land this as intentional fail-closed hardening because the SDK supports constructor fetch injection, the patch is scoped to one constructor, and maintainer-side Cloudflare proof now covers the live route.
  2. Hold for an explicit compatibility carveout
    If maintainers want existing private or unusual Cloudflare endpoints to keep working by default, pause and design an explicit opt-in or migration path instead of merging unconditional guarded transport.
  3. Batch with sibling constructor decisions
    Maintainers may also wait to review the four sibling Anthropic constructor PRs together if they want one policy decision for the whole createClient split.

Next step before merge

  • No automated repair is needed; the remaining action is maintainer acceptance of the guarded-transport compatibility and availability risk before normal merge gating.

Security
Cleared: The diff is a security hardening change that reuses an existing guarded fetch helper and adds focused tests; it introduces no new dependency, script, secret handling, lockfile, or supply-chain surface.

Review details

Best possible solution:

Land the narrow Cloudflare constructor parity fix once a maintainer accepts the intentional guarded-transport compatibility risk and normal merge/check gating is satisfied.

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

Yes from source: current main constructs the Cloudflare Anthropic client without a custom fetch, and the PR test demonstrates the missing guard by blocking a private-IP base URL before global fetch is reached. I did not run tests in this read-only review checkout.

Is this the best way to solve the issue?

Yes, this is the best narrow fix for the reported gap: the Anthropic SDK exposes a constructor fetch option, and the existing guarded transport helper is already the shared provider request seam. A lower-level wrapper would duplicate that seam, while the earlier all-branches PR was appropriately split for blast-radius review.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority provider hardening fix with limited blast radius to one Cloudflare Anthropic constructor path.
  • merge-risk: 🚨 compatibility: The patch changes existing Cloudflare Anthropic requests from SDK-default fetch to OpenClaw guarded fetch, which can reject endpoints that previously connected.
  • merge-risk: 🚨 availability: Guarded fetch introduces timeout, lifecycle, proxy, and fail-closed network behavior that can make previously working Cloudflare Anthropic calls stop at runtime.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The PR body includes focused after-fix terminal test output, and a maintainer comment adds redacted live Cloudflare AI Gateway proof with guarded transport logs and a successful streamed response.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes focused after-fix terminal test output, and a maintainer comment adds redacted live Cloudflare AI Gateway proof with guarded transport logs and a successful streamed response.
Evidence reviewed

PR surface:

Source +2, Tests +63. Total +65 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 0 +2
Tests 2 63 0 +63
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 65 0 +65

What I checked:

  • Repository policy read and applied: Read the full root AGENTS.md plus scoped src/agents/AGENTS.md; provider routing and guarded transport are compatibility-sensitive, and dependency-backed behavior required direct SDK source inspection. (AGENTS.md:14, 6b869a618856)
  • Current main still lacks the Cloudflare guarded fetch: On current main, the Cloudflare AI Gateway branch constructs new Anthropic with baseURL and defaultHeaders but no fetch option, so the central requested behavior is not already implemented. (src/llm/providers/anthropic.ts:934, 6b869a618856)
  • PR wires the intended constructor seam: At PR head, the Cloudflare branch adds fetch: buildGuardedModelFetch(model) inside the existing Anthropic SDK constructor without changing headers, auth, config, or model selection. (src/llm/providers/anthropic.ts:951, c83252d9cdb9)
  • Runtime path checked: streamAnthropic creates the client through createClient, then calls client.messages.create(...).asResponse(), so the SDK constructor fetch option is on the active request path. (src/llm/providers/anthropic.ts:531, 6b869a618856)
  • Guarded fetch behavior checked: buildGuardedModelFetch resolves model request policy, builds SSRF policy from model.baseUrl and request URL, calls fetchWithSsrFGuard, and wraps the response lifecycle. (src/agents/provider-transport-fetch.ts:777, 6b869a618856)
  • Sibling guarded SDK constructor pattern exists: Managed Anthropic transport and OpenAI completions already pass buildGuardedModelFetch into SDK constructor paths, supporting this as parity with established transport seams rather than a new custom path. (src/agents/anthropic-transport-stream.ts:818, 6b869a618856)

Likely related people:

  • altaywtf: Reviewed the Cloudflare proof shape, asked to trim synthetic coverage, and later supplied the maintainer-side Cloudflare AI Gateway live proof for this PR head. (role: recent reviewer and live-proof owner; confidence: medium; commits: c83252d9cdb9; files: src/llm/providers/anthropic.ts, src/llm/providers/anthropic-cloudflare.fetch-proof.test.ts)
  • wangmiao0668000666: Authored this PR and also authored related guarded-fetch constructor work referenced in the discussion, including the merged OpenAI completions guarded-fetch PR. (role: adjacent guarded-fetch contributor; confidence: medium; commits: 6a788951ac63, c83252d9cdb9, ff820d3942cc; files: src/llm/providers/anthropic.ts, src/llm/providers/anthropic-cloudflare.fetch-proof.test.ts, src/llm/providers/openai-completions.ts)
  • xingzhou: Local current-main blame attributes the present Anthropic provider and guarded-fetch helper snapshots to commit cd6b675, though the commit appears broad so routing confidence is low. (role: current-main blame carrier; confidence: low; commits: cd6b67533d6d; files: src/llm/providers/anthropic.ts, src/agents/provider-transport-fetch.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: 🐚 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jun 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: matrix Channel integration: matrix agents Agent runtime and tooling channel: qqbot extensions: codex size: XL and removed size: S labels Jun 30, 2026
@altaywtf
altaywtf force-pushed the fix/anthropic-cloudflare-fetch-wiring branch from 0b924d0 to 099a584 Compare June 30, 2026 10:19
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed docs Improvements or additions to documentation channel: matrix Channel integration: matrix agents Agent runtime and tooling channel: qqbot extensions: codex size: XL labels Jun 30, 2026
@altaywtf
altaywtf force-pushed the fix/anthropic-cloudflare-fetch-wiring branch from 099a584 to c22001f Compare June 30, 2026 10:39
@clawsweeper clawsweeper Bot added the status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. label Jul 2, 2026
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@altaywtf Thanks for running the hosted Anthropic smoke. I don't have access to a live Cloudflare AI Gateway account or gateway secrets, so I can't generate the dashboard evidence you asked for on my own.

Could you (or another maintainer with Cloudflare AI Gateway credentials / Testbox provisioning rights) either:

  1. Run a simple message stream against a real cloudflare-ai-gateway endpoint on this branch and paste the redacted config + dashboard/log evidence, or
  2. Provision the hosted Testbox profile with CLOUDFLARE_AI_GATEWAY_* secrets so I can run it and update the PR body?

If neither is available, please let me know if the current loopback/SSRF-block proof plus your hosted Anthropic smoke should be accepted as the practical coverage ceiling for this S-sized wiring PR. I'll update the PR body to reflect whatever decision.

@altaywtf

altaywtf commented Jul 2, 2026

Copy link
Copy Markdown
Member

Thanks for confirming. I want to be pretty direct here: if you do not have access to a real Cloudflare AI Gateway setup, please do not expand this PR with large synthetic “proof” blocks to compensate for that missing coverage. 😅

The actual code change is small and reasonable: wiring fetch: buildGuardedModelFetch(model) into the Cloudflare Anthropic constructor. The useful proof for that is also small:

  • constructor config includes a custom fetch
  • a blocked/private target fails before falling through to default/global fetch
  • maintainer-side hosted smoke showed this constructor branch can make a real Anthropic streaming request

The 188-line loopback test and large PR-body proof section make the PR harder to review without proving the thing I asked about: a real Cloudflare AI Gateway-routed request with dashboard/log evidence. A local fake SSE server is not Cloudflare Gateway coverage.

Please either:

  1. reduce the test/proof back to focused coverage for the actual wiring, and keep the body honest that true Cloudflare Gateway E2E was not tested, or
  2. provide real Cloudflare AI Gateway proof with redacted config and dashboard/log evidence.

I’m not asking for more synthetic proof here. The concern is reviewability and signal, not line count.

Thanks for your understanding.

@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@altaywtf Thanks for the direct feedback. I have trimmed the PR down:

  • Removed the 188-line synthetic http.createServer loopback test from anthropic-cloudflare.fetch-proof.test.ts.
  • Kept the focused proof:
    • constructor wiring assertion in anthropic.test.ts
    • SSRF-block test that proves buildGuardedModelFetch intercepts private-IP targets before globalThis.fetch
  • Updated the PR body to remove the large Layer 3 proof section and explicitly state that true Cloudflare AI Gateway E2E was not tested by the author.

CI is green on the trimmed branch. Please let me know if this matches the review signal you want, or if anything else is needed.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. labels Jul 2, 2026
@wangmiao0668000666
wangmiao0668000666 force-pushed the fix/anthropic-cloudflare-fetch-wiring branch from 89a1828 to 348a191 Compare July 2, 2026 17:07
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Trimmed the proof per maintainer feedback:

  • Removed the synthetic 188-line http.createServer loopback test.
  • Kept the focused SSRF-block guard proof + constructor wiring assertion.
  • Updated the PR body to match the trimmed diff and explicitly note that true Cloudflare AI Gateway E2E was not tested by the author.

CI is now green on the latest HEAD.

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@altaywtf altaywtf self-assigned this Jul 3, 2026
@altaywtf

altaywtf commented Jul 3, 2026

Copy link
Copy Markdown
Member

I created a Cloudflare AI Gateway myself and ran a maintainer-side live proof against this PR head. That fills the Cloudflare-routed coverage gap we discussed earlier.

Findings, with secrets/account details redacted:

  • Configured the cloudflare-ai-gateway Anthropic path using the Cloudflare anthropic gateway alias.
  • Sent a real Anthropic Messages request through https://gateway.ai.cloudflare.com/v1/<account>/<gateway>/anthropic/v1/messages.
  • OpenClaw provider transport logged the request as provider=cloudflare-ai-gateway, api=anthropic-messages, model=claude-sonnet-4-6, with guarded transport policy custom.
  • The Gateway-routed request returned HTTP 200 with text/event-stream.
  • The model response completed with stopReason=stop and returned OK.

So the current small patch now has the missing real Cloudflare AI Gateway behavior proof: the Cloudflare Anthropic constructor path works with fetch: buildGuardedModelFetch(model) and routes through the Gateway successfully. Thanks for trimming the synthetic proof and keeping the remaining gap explicit.

🤖 AI-assisted via Codex, GPT-5.5, high reasoning

Wire the Cloudflare AI Gateway Anthropic SDK client through buildGuardedModelFetch so this path gets the same SSRF and transport policy as sibling providers.

Keep the behavior proof focused on the regression: a Cloudflare Anthropic request pointed at a link-local address must fail before the SDK reaches global fetch.
@altaywtf
altaywtf force-pushed the fix/anthropic-cloudflare-fetch-wiring branch from 348a191 to c83252d Compare July 3, 2026 10:06
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

Thanks @altaywtf for taking the time to provision a real Cloudflare AI Gateway and run the maintainer-side live proof. That closes the only proof gap that was missing from the contributor side, and the redacted dashboard/log evidence (provider=cloudflare-ai-gateway, api=anthropic-messages, model=claude-sonnet-4-6, HTTP 200 text/event-stream, stopReason=stop) is exactly the Cloudflare-routed coverage this PR needed.

This PR is now fully proven on the live path:

  • Focused: 1 import + 1 fetch: buildGuardedModelFetch(model) line on the Cloudflare Anthropic constructor branch (src/llm/providers/anthropic.ts:920).
  • Source proof: constructor wiring assertion + private-IP SSRF-block guard test in the existing anthropic.test.ts (no synthetic loopback expansion).
  • Live proof: your maintainer-hosted Cloudflare AI Gateway run on this branch HEAD (c83252d9), with a real Anthropic Messages request routed through https://gateway.ai.cloudflare.com/v1/<account>/<gateway>/anthropic/v1/messages returning a streamed response.

I will not expand this PR further. The "What was not tested" gap is now closed by your live run rather than by extra contributor-side synthetic tests, which is the cleaner outcome for reviewability.

Ready for merge at maintainer discretion.

@altaywtf
altaywtf merged commit f84bcdb into openclaw:main Jul 3, 2026
96 checks passed
@altaywtf

altaywtf commented Jul 3, 2026

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 4, 2026
…eClient branch (openclaw#98003)

* fix(anthropic): guard Cloudflare Anthropic fetches

Wire the Cloudflare AI Gateway Anthropic SDK client through buildGuardedModelFetch so this path gets the same SSRF and transport policy as sibling providers.

Keep the behavior proof focused on the regression: a Cloudflare Anthropic request pointed at a link-local address must fail before the SDK reaches global fetch.

* fix(anthropic): add loopback proof test to cloudflare fetch wiring

* test(anthropic-cloudflare): trim proof to SSRF-block only, remove synthetic loopback server
wangmiao0668000666 added a commit to wangmiao0668000666/openclaw that referenced this pull request Jul 6, 2026
…ient branch

Reopens openclaw#98014 after packages/ai extraction (openclaw#99059) moved anthropic.ts out
of src/llm/providers. Adds a single fetch line to the github-copilot
createClient branch, parallel to the cloudflare branch wired by openclaw#98003
and the same-shape api-key/oauth/foundry siblings landing in this series.

Bytes-cap verification is owned by buildModelFetch itself; this PR proves
the constructor wiring via inline test through production streamAnthropic.
wangmiao0668000666 added a commit to wangmiao0668000666/openclaw that referenced this pull request Jul 6, 2026
…ient branch

Reopens openclaw#98014 after packages/ai extraction (openclaw#99059) moved anthropic.ts out
of src/llm/providers. Adds a single fetch line to the github-copilot
createClient branch, parallel to the cloudflare branch wired by openclaw#98003
and the same-shape api-key/oauth/foundry siblings landing in this series.

Bytes-cap verification is owned by buildModelFetch itself; this PR proves
the constructor wiring via inline test through production streamAnthropic.
wangmiao0668000666 added a commit to wangmiao0668000666/openclaw that referenced this pull request Jul 6, 2026
…ient branch

Reopens openclaw#98014 after packages/ai extraction (openclaw#99059) moved anthropic.ts out
of src/llm/providers. Adds a single fetch line to the github-copilot
createClient branch, parallel to the cloudflare branch wired by openclaw#98003
and the same-shape api-key/oauth/foundry siblings landing in this series.

Bytes-cap verification is owned by buildModelFetch itself; this PR proves
the constructor wiring via inline test through production streamAnthropic.
wangmiao0668000666 added a commit to wangmiao0668000666/openclaw that referenced this pull request Jul 7, 2026
…ient branch

Reopens openclaw#98014 after packages/ai extraction (openclaw#99059) moved anthropic.ts out
of src/llm/providers. Adds a single fetch line to the github-copilot
createClient branch, parallel to the cloudflare branch wired by openclaw#98003
and the same-shape api-key/oauth/foundry siblings landing in this series.

Bytes-cap verification is owned by buildModelFetch itself; this PR proves
the constructor wiring via inline test through production streamAnthropic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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: S 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.

2 participants