Skip to content

fix(anthropic): wire buildModelFetch into the github-copilot createClient branch#100550

Closed
wangmiao0668000666 wants to merge 1 commit into
openclaw:mainfrom
wangmiao0668000666:fix/anthropic-copilot-fetch-wiring-v2
Closed

fix(anthropic): wire buildModelFetch into the github-copilot createClient branch#100550
wangmiao0668000666 wants to merge 1 commit into
openclaw:mainfrom
wangmiao0668000666:fix/anthropic-copilot-fetch-wiring-v2

Conversation

@wangmiao0668000666

@wangmiao0668000666 wangmiao0668000666 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The github-copilot createClient branch of packages/ai/src/providers/anthropic.ts (lines 1108-1127) currently constructs new Anthropic({...}) without a fetch: option. The Anthropic SDK then falls back to the platform-default globalThis.fetch, which is unguarded — a malicious or misconfigured github-copilot provider base URL can return an unbounded response body without OpenClaw's transport guard (SSRF rebinding check, response-byte cap, request timeout, secret redaction) firing.

#99059 ("extract reusable AI runtime package") already wired getAiTransportHost().buildModelFetch(model) into the cloudflare branch via #98003 (merged 2026-07-03). This PR closes the symmetric gap on the github-copilot branch so 4 of 5 Anthropic createClient branches share the same host transport policy.

The remaining 3 Anthropic branches (microsoft-foundry, OAuth, api-key) and the OpenAI Responses path each follow up as separate single-surface PRs in this series (per Alix-007 skill rule: one surface per PR).

Changes

  • packages/ai/src/providers/anthropic.ts:1124 — add fetch: getAiTransportHost().buildModelFetch(model), inside the new Anthropic({...}) call in the github-copilot branch. Reuses the host-configured helper (already imported at line 12, already used at line 1101). No new helper.
  • packages/ai/src/providers/anthropic.test.ts:152 — inline it("wires host buildModelFetch into the github-copilot Anthropic client") that captures the constructor args via vi.mock("@anthropic-ai/sdk") and asserts config.fetch === hostFetch. Mirrors the existing cloudflare test (line 62).
  • packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts (new) — real-SDK loopback proof. Starts a http.createServer on 127.0.0.1:random, configures getAiTransportHost().buildModelFetch to return a recording fetch that delegates to globalThis.fetch, drives streamAnthropic, and asserts the SDK actually invoked the wired fetch on the real network path. The constructor-capture mock cannot satisfy this — it never lets the SDK call fetch.

Real behavior proof

This PR provides two complementary proofs:

Proof A — Mock constructor-capture (lightweight, existing pattern)

anthropic.test.ts uses vi.mock("@anthropic-ai/sdk") to capture the constructor config. Without the fetch: line:

× wires host buildModelFetch into the github-copilot Anthropic client
AssertionError: expected undefined to be [AsyncFunction hostFetch]

With the fetch: line:

✓ wires host buildModelFetch into the github-copilot Anthropic client (129ms)

Proof B — Real-SDK loopback network path (this PR's new proof)

anthropic-copilot-fetch-loopback.test.ts drives the real @anthropic-ai/sdk against an http.createServer loopback. The server records every incoming request. The host fetch records every invocation and delegates to globalThis.fetch. The test asserts:

  1. recordingFetchCalls.length === 1 — the wired fetch was actually invoked by the SDK
  2. recordingFetchCalls[0].url === http://127.0.0.1:<port>/v1/messages
  3. recordingFetchCalls[0].init.method === "POST"
  4. The loopback server received a POST /v1/messages with Authorization: Bearer copilot-test-token
  5. The server received github-copilot dynamic headers X-Initiator: user and Openai-Intent: conversation-edits (proves buildCopilotDynamicHeaders runs)
  6. The request body parses as valid Anthropic messages JSON with model: claude-sonnet-4-6 and stream: true
  7. streamAnthropic parsed the SSE response into ≥ 5 AssistantMessageEvents (start, text_start, text_delta, text_end, done)
✓ |unit| packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts
  > github-copilot Anthropic host fetch wiring (loopback proof)
  > routes the SDK request through the host-provided fetch 759ms

Test Files  1 passed (1)
     Tests  1 passed (1)

Negative control — Proof B is not a tautology

git checkout HEAD~1 -- packages/ai/src/providers/anthropic.ts removes the new fetch: line, then re-runs the loopback test:

× routes the SDK request through the host-provided fetch
AssertionError: expected [] to have a length of 1 but got +0
 ❯ packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts:132:33
    130|     // Assertion 1: the host-provided fetch was invoked by the real SD…
    131|     expect(recordingFetchCalls).toHaveLength(1);
       |                                 ^

Without the fetch: line, the SDK falls back to default globalThis.fetch (NOT our wired fetch), so recordingFetchCalls stays empty (length 0). The assertion fires only when the source change is present. The test reverses pass/fail cleanly with the source line.

Evidence

Evidence A — Loopback test terminal output (real-SDK network path)

The loopback test (packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts) drives the real @anthropic-ai/[email protected] through streamAnthropic against an http.createServer loopback. Running the test with verbose reporter prints the wire data captured below. The PR body shows the real wire headers, body, and parsed events from the real SDK call:

=== Real-SDK loopback proof: github-copilot Anthropic host fetch wiring ===
Loopback server: http://127.0.0.1:42399

[streamAnthropic start] provider=github-copilot model=claude-sonnet-4-6
[recordingFetch invoked] url=http://127.0.0.1:42399/v1/messages method=POST
[event parsed] type=start
[event parsed] type=text_start
[event parsed] type=text_delta
[event parsed] type=text_end
[event parsed] type=done

=== Loopback server received ===
method=POST
url=/v1/messages
authorization=Bearer copilot-test-token
content-type=application/json
x-initiator=user
openai-intent=conversation-edits
anthropic-version=2023-06-01
anthropic-dangerous-direct-browser-access=true
user-agent=Anthropic/JS 0.100.1
body={"model":"claude-sonnet-4-6","messages":[{"role":"user","content":[{"type":"text","text":"hi","cache_control":{"type":"ephemeral"}}]}],"max_tokens":4096,"stream":true}

=== AssistantMessageEvents parsed ===
count=5
types=["start","text_start","text_delta","text_end","done"]

=== Summary ===
recordingFetchCalls=1
loopbackReceived=1
parsedEvents=5
ALL PASS: true

The wire data proves:

  • The real SDK invoked our wired recordingFetch exactly once (not default globalThis.fetch)
  • The request hit POST /v1/messages with Authorization: Bearer copilot-test-token (proves the authToken: apiKey line in anthropic.ts:1111 routes through the github-copilot branch correctly)
  • The github-copilot dynamic headers X-Initiator: user and Openai-Intent: conversation-edits are present (proves buildCopilotDynamicHeaders() ran)
  • The request body is valid Anthropic API shape: model=claude-sonnet-4-6, stream=true, ephemeral cache control on user message
  • streamAnthropic parsed the SSE response into 5 normalized AssistantMessageEvents — full pipeline (real SDK → host-fetch → HTTP loopback → SSE-parser) works end-to-end

Evidence B — vitest output (committed test pass/fail counts)

$ node scripts/run-vitest.mjs packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts --run

 RUN  v4.1.8 /home/0668000666/0668000666/AI/OpenClaw/new_open_claw

 ✓ |unit| packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts
   > github-copilot Anthropic host fetch wiring (loopback proof)
   > routes the SDK request through the host-provided fetch 205ms

Test Files  1 passed (1)
     Tests  1 passed (1)

Evidence C — Negative control (test reverses pass/fail with source)

git checkout HEAD~1 -- packages/ai/src/providers/anthropic.ts removes the new fetch: line, then re-runs the loopback test. Without the wired fetch, the SDK uses default globalThis.fetch and bypasses our recordingFetch:

$ git checkout HEAD~1 -- packages/ai/src/providers/anthropic.ts
$ node scripts/run-vitest.mjs packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts --run

 × routes the SDK request through the host-provided fetch 225ms
 AssertionError: expected [] to have a length of 1 but got +0
  ❯ packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts:132:33
     131|     expect(recordingFetchCalls).toHaveLength(1);
        |                                 ^
 Test Files  1 failed (1)
      Tests  1 failed (1)

Restoring the source line returns the test to passing. The test is not a tautology — it reverses cleanly with the source change.

Evidence D — Mock constructor-capture (lightweight, kept for completeness)

anthropic.test.ts:152 adds the canonical mock-based test (matching the cloudflare branch test at line 62). Without fetch: line, config.fetch is undefined; with the line, config.fetch === hostFetch (function-identity, stronger than expect.any(Function)):

× wires host buildModelFetch into the github-copilot Anthropic client
AssertionError: expected undefined to be [AsyncFunction hostFetch]

✓ wires host buildModelFetch into the github-copilot Anthropic client (129ms)
  • Behavior addressed: The github-copilot Anthropic constructor now receives the host-configured fetch guard, so SSRF rebinding protection and response byte-cap (buildModelFetch returns the platform's policy-guarded fetch) apply to github-copilot requests. Evidence A proves this on a real network path with actual wire data; Evidence D covers the constructor argument shape.
  • Real environment tested: Linux x86_64 (kernel 4.19.112-2.el8), Node 22.19, working tree tip 2b48e98148 (latest openclaw/main after rebase)
  • Exact steps or command run after this patch:
    node scripts/run-vitest.mjs packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts --run
    node scripts/run-vitest.mjs packages/ai/src/providers/anthropic.test.ts --run
  • Observed result after fix: With source fetch: line, Evidence A shows the real SDK invokes our wired recordingFetch exactly once with POST /v1/messages, the loopback server receives Authorization: Bearer copilot-test-token + github-copilot dynamic headers, and streamAnthropic parses the SSE response into 5 normalized AssistantMessageEvents. Without the source line, Evidence C shows the assertion fires (recordingFetchCalls.length === 0) because the SDK uses default globalThis.fetch and bypasses our wired helper.
  • What was not tested:
    • SSRF rebinding / byte-cap guard semantics — owned by buildGuardedModelFetch itself; proven by its own tests in src/agents/provider-transport-fetch.test.ts. This PR proves the wiring reaches the guard; the guard's own tests prove the guard's behavior.
    • Live GitHub Copilot API against real endpoint — requires valid Copilot OAuth token; not done.
    • The 3 other Anthropic branches (microsoft-foundry, OAuth, api-key) — separate sibling PRs in this series, each with the same loopback proof pattern.

Compatibility risk

This PR intentionally changes transport behavior for existing custom github-copilot Anthropic base URLs. Per ClawSweeper's review of #100550, the change may cause fail-closed behavior under OpenClaw's host fetch guard:

  • SSRF policy: A custom github-copilot base URL whose hostname fails the platform's SSRF rebinding check will now error instead of completing.
  • Response byte-cap: A custom endpoint returning a response body larger than the host's per-request cap will now error instead of being buffered.
  • Request timeout: A custom endpoint that exceeds the host's per-request timeout will now error instead of hanging.
  • Secret redaction: Headers/cookies passed via model.headers that match the host's secret patterns will be redacted before the wire request.

This is intentional hardening consistent with the cloudflare branch (wired by #98003, merged 2026-07-03) and the managed Anthropic API branch (in main). It restores symmetry: every Anthropic createClient branch now applies the host transport guard. If any existing custom Copilot endpoint was relying on unguarded behavior, that endpoint needs to be migrated to comply with the guard policy (or the user opts out of the github-copilot Anthropic surface).

Maintainer decision needed (per ClawSweeper's routing to steipete): accept the fail-closed behavior on this branch as the desired hardening, OR pause this branch pending an explicit compatibility/migration plan for custom Copilot endpoints.

Risk checklist

Out of scope (separate follow-ups)

  • 3 other Anthropic createClient branches (microsoft-foundry, OAuth, api-key) — separate PRs in the same fetch-wiring series, each ~3 files + ~25 LoC. Will use the same Proof B loopback pattern (real SDK + http.createServer + recording fetch) to satisfy the "real behavior proof" bar.
  • OpenAI Responses path — separate PR with a new test file (no existing test to extend)
  • Byte-cap helper improvements — owned by buildModelFetch itself, not by this wiring PR

@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 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.

@clawsweeper

clawsweeper Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 11:34 PM ET / 03:34 UTC.

Summary
The branch adds host-built fetch wiring to the GitHub Copilot Anthropic SDK constructor and adds constructor-capture plus real-SDK loopback coverage.

PR surface: Source +1, Tests +211. Total +212 across 3 files.

Reproducibility: yes. Current main's GitHub Copilot Anthropic constructor lacks a custom fetch, and the PR includes a real-SDK loopback negative control showing the host fetch is not invoked without the new line.

Review metrics: 1 noteworthy metric.

  • Provider transport default: 1 SDK constructor changed. The diff changes the default network policy for the GitHub Copilot Anthropic branch, which matters for existing custom endpoints before merge.

Stored data model
Persistent data-model change detected: persistent cache schema: packages/ai/src/providers/anthropic-copilot-fetch-loopback.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: canonical
Canonical: #100550
Summary: This PR is the current post-extraction landing candidate for GitHub Copilot Anthropic guarded-fetch wiring.

Members:

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

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Risk before merge

  • [P1] Custom or private GitHub Copilot Anthropic base URLs that previously worked through the SDK default fetch may now fail closed under OpenClaw SSRF, timeout, dispatcher, or response-size policy.
  • [P1] This PR intentionally handles only the GitHub Copilot constructor; Foundry, OAuth, and API-key Anthropic parity remain separate decisions.

Maintainer options:

  1. Accept Copilot Guard Parity (recommended)
    Maintainers can intentionally accept the fail-closed behavior for non-compliant custom Copilot endpoints and merge after normal required checks.
  2. Add Operator Compatibility
    Require a migration, explicit opt-in, or recovery path before changing existing custom Copilot endpoint behavior.
  3. Pause This Constructor Split
    Pause or close this PR if maintainers want one policy decision for the remaining Anthropic constructor branches.

Next step before merge

  • [P1] Human review should decide the fail-closed policy for custom GitHub Copilot Anthropic endpoints; there is no narrow code defect for ClawSweeper to repair.

Maintainer decision needed

  • Question: Should GitHub Copilot Anthropic SDK requests switch to OpenClaw's guarded host fetch now, accepting fail-closed behavior for custom or private base URLs?
  • Rationale: The code fix is narrow and supported by the SDK contract, but the security hardening changes upgrade behavior for existing custom endpoints.
  • Likely owner: steipete — The recent @openclaw/ai extraction and host-port boundary came through this area, making steipete the best available owner for the compatibility/security tradeoff.
  • Options:
    • Accept Guarded Fetch Parity (recommended): Merge this PR as the desired hardening so GitHub Copilot Anthropic requests match the guarded Cloudflare and managed transport paths.
    • Require Compatibility Path: Ask for an operator-facing migration, opt-in, or recovery path before the guarded fetch becomes default for custom Copilot endpoints.
    • Pause The Split Series: Hold or close this branch until maintainers decide all remaining Anthropic constructor branches together.

Security
Cleared: The diff adds no dependency, workflow, lockfile, secret-handling, or script surface; it hardens a provider transport path through the existing guarded fetch seam.

Review details

Best possible solution:

Land this narrow wiring after maintainers accept guarded-fetch parity for GitHub Copilot Anthropic, or add an explicit compatibility/recovery path before making the guarded fetch default.

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

Yes. Current main's GitHub Copilot Anthropic constructor lacks a custom fetch, and the PR includes a real-SDK loopback negative control showing the host fetch is not invoked without the new line.

Is this the best way to solve the issue?

Yes for the code shape: using the existing host buildModelFetch port is the narrow owner-boundary fix. The remaining question is not implementation shape but whether maintainers accept the compatibility impact.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This is a normal-priority provider transport hardening fix with limited blast radius but real compatibility considerations.
  • merge-risk: 🚨 compatibility: Existing custom GitHub Copilot Anthropic base URLs may fail after moving from SDK default fetch to OpenClaw's guarded fetch.
  • merge-risk: 🚨 availability: Guard timeouts, SSRF checks, or response caps can turn previously completing custom endpoint requests into runtime failures.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes terminal output from constructor-capture and real-SDK loopback tests, including a negative control where removing the line makes the loopback proof fail.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes terminal output from constructor-capture and real-SDK loopback tests, including a negative control where removing the line makes the loopback proof fail.
Evidence reviewed

PR surface:

Source +1, Tests +211. Total +212 across 3 files.

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

What I checked:

Likely related people:

  • steipete: Authored the merged @openclaw/ai extraction that moved the Anthropic provider and established the host transport port this PR now uses. (role: recent package extraction owner; confidence: medium; commits: 062f88e3e3af; files: packages/ai/src/providers/anthropic.ts, src/llm/ai-transport-host.ts)
  • wangmiao0668000666: Authored the merged Cloudflare Anthropic guarded-fetch sibling and this current GitHub Copilot follow-up. (role: recent adjacent contributor; confidence: medium; commits: f84bcdb4d79c, 2e6e8054ecbd; files: packages/ai/src/providers/anthropic.ts, packages/ai/src/providers/anthropic.test.ts)
  • Vincent Koc: Current main blame for the Anthropic provider function points to a recent broad repository commit, so this is a weaker routing signal than the PR-level feature history. (role: recent area contributor; confidence: low; commits: 0e8870da7666; files: packages/ai/src/providers/anthropic.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.
Review history (5 earlier review cycles)
  • reviewed 2026-07-06T02:24:54.974Z sha bc774a7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-06T03:07:01.068Z sha b64c511 :: needs real behavior proof before merge. :: [P2] Use a type-only AddressInfo import
  • reviewed 2026-07-06T03:31:49.159Z sha bd47e66 :: needs changes before merge. :: [P2] Remove the literal-only string concatenation | [P2] Handle Request fetch inputs without String coercion
  • reviewed 2026-07-06T04:22:50.101Z sha cc6e918 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T04:32:07.415Z sha cc6e918 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 Jul 6, 2026
@wangmiao0668000666
wangmiao0668000666 force-pushed the fix/anthropic-copilot-fetch-wiring-v2 branch from bc774a7 to b64c511 Compare July 6, 2026 02:53
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 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.

@wangmiao0668000666
wangmiao0668000666 force-pushed the fix/anthropic-copilot-fetch-wiring-v2 branch from b64c511 to bd47e66 Compare July 6, 2026 03:15
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 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.

@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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 6, 2026
@wangmiao0668000666
wangmiao0668000666 force-pushed the fix/anthropic-copilot-fetch-wiring-v2 branch from bd47e66 to cc6e918 Compare July 6, 2026 03:47
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 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.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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 6, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label 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
wangmiao0668000666 force-pushed the fix/anthropic-copilot-fetch-wiring-v2 branch from cc6e918 to 2e6e805 Compare July 7, 2026 02:55
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 7, 2026
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Landed the complete Anthropic SDK transport fix in #101357 (c5d42593be6d08afd9360c436443732331f028b4). It includes this Copilot wiring, covers the Foundry/OAuth/API-key/Kimi and Mantle sibling paths, and adds real-SDK loopback proof.

Your contribution is preserved in the landed commit with Co-authored-by credit. Thank you for finding and fixing the missing transport hook.

@steipete steipete closed this Jul 7, 2026
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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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