Skip to content

fix(providers): report request acceptance consistently - #125807

Merged
osolmaz merged 21 commits into
openclaw:mainfrom
osolmaz:fix/provider-acceptance-hooks
Aug 18, 2026
Merged

osolmaz merged 21 commits into
openclaw:mainfrom
osolmaz:fix/provider-acceptance-hooks

Conversation

@osolmaz

@osolmaz osolmaz commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Opened on behalf of Onur Solmaz (osolmaz). Work is in progress.

AI-assisted. I reviewed the transport owners, dependency contracts, deterministic and live reproductions, focused tests, repository gates, and independent review findings.

Closes #125802

What Problem This Solves

Successful provider streams could complete without reporting that the provider accepted the request.
Model diagnostics and plugin hooks could not distinguish a request that reached the provider from one that failed before acceptance.
Some wrappers also dropped the existing HTTP response callback.

Why This Change Was Made

Provider acceptance is now one shared lifecycle fact across HTTP, SDK, and WebSocket transports.
Real HTTP paths report observed status and headers, while transports that cannot see HTTP metadata report only that the provider stream opened.

  • Adds the additive ProviderAcceptance type and onProviderAccepted callback, with three lifecycle helpers on the supported openclaw/plugin-sdk/provider-lifecycle subpath.
  • Centralizes HTTP acceptance, legacy onResponse delivery, abort handling, and unread-body cleanup in provider transport helpers.
  • Converts Anthropic, Amazon Bedrock, Google, Mistral, Ollama, and OpenAI HTTP and WebSocket boundaries.
  • Forwards both lifecycle callbacks through Anthropic Vertex and Bedrock Mantle.
  • Records the acceptance kind in the canonical model-call diagnostic lifecycle without inferring acceptance from a legacy response callback.
  • Keeps rejected HTTP responses on onResponse without marking them accepted.
  • Cancels unread HTTP or SDK streams when lifecycle callbacks fail, without waiting on stalled cleanup.

Maintainer decision: Onur requested the complete remaining provider-acceptance work in one PR, including the additive Plugin SDK contract and diagnostic migration.

Dependency contracts were checked directly:

  • Mistral SDK 2.5.0 exposes each real Response through the public HTTPClient response hook. Acceptance is emitted only after chat.stream() succeeds.
  • Google Gen AI SDK 2.13.0 returns an opened async stream but does not expose a complete status-and-headers pair for streamed responses, so it reports provider_stream_opened without fabricated HTTP data.
  • Codex WebSocket source at openai/codex@d6ea5991e7f91eec5bad1fb4cb36f6be638878bc sends response.create, rejects wrapped error events, and then forwards parsed provider events in codex-rs/codex-api/src/endpoint/responses_websocket.rs:675-795. OpenClaw reports acceptance on that first forwarded event before exposing it downstream.

User Impact

Operators get truthful provider-acceptance diagnostics across the built-in transport families.
Plugin developers can observe successful non-HTTP streams without inventing an HTTP status, while existing HTTP response hooks keep their real status and headers.

No configuration, authentication, persistence, request payload, or database contract changes.

Evidence

The original deterministic reproduction showed Mistral completing with onResponse=0, Anthropic Vertex and Bedrock Mantle dropping the callback, and OpenAI HTTP calling it once before start.
A live native Ollama run also completed with onResponse=0 before the repair and with one acceptance plus one HTTP response callback after it.

Focused exact-branch tests:

node scripts/run-vitest.mjs \
  packages/ai/src/transports/transport-stream-shared.acceptance.test.ts \
  extensions/ollama/src/stream-runtime.test.ts \
  extensions/amazon-bedrock/stream.runtime.test.ts \
  extensions/amazon-bedrock-mantle/mantle-anthropic.runtime.test.ts \
  extensions/anthropic-vertex/stream-runtime.test.ts \
  extensions/google/transport-stream.test.ts \
  packages/ai/src/providers/google-shared.test.ts \
  packages/ai/src/providers/mistral.test.ts \
  packages/ai/src/providers/mistral.bounded-stream.test.ts \
  packages/ai/src/transports/anthropic-transport-stream.test.ts \
  packages/ai/src/transports/openai-completions-transport.response-hook.test.ts \
  packages/ai/src/transports/openai-responses-websocket-client.test.ts \
  packages/ai/src/providers/openai-chatgpt-responses-streaming.test.ts \
  packages/ai/src/providers/openai-chatgpt-responses.encrypted-retry.test.ts \
  packages/ai/src/providers/openai-chatgpt-responses.retry.test.ts \
  src/agents/embedded-agent-runner/run/attempt.model-diagnostic-lifecycle.test.ts
# 16 files passed, 691 tests passed

node scripts/check-changed.mjs --base upstream/main --timed
pnpm tsgo:prod
pnpm tsgo:test
pnpm plugin-sdk:surface:check
pnpm build
pnpm docs:check-mdx
pnpm docs:check-links
# passed

node scripts/check-changed.mjs --base upstream/main -- \
  packages/ai/src/transports/anthropic-transport-stream.ts \
  packages/ai/src/transports/anthropic-transport-stream.test.ts
# passed after the final Anthropic response-boundary repair

pi-reviewer --base upstream/main
# patch is correct; no findings

Production/tooling LOC: +430/-155 (net +275) | Tests: +828/-9 (net +819) | Docs: +3/-0.
The production growth establishes one public lifecycle contract, adapts the affected built-in transport families, and centralizes callback cancellation and response cleanup. Removing Ollama's local response-hook implementation offsets part of that growth.

Risks

The main risk is callback ordering at provider boundaries.
Tests cover success, rejection, retries, first-event ordering, callback failure, aborts, wrapper forwarding, WebSocket state, and unread-stream cleanup.

The new Plugin SDK callback is optional and additive.
The existing onResponse callback remains the compatibility contract for paths with real HTTP metadata.

Agent transcript

Redacted agent session transcript
source: local session
redaction: local paths, credentials, raw tool output, and environment details omitted

[user]
Reproduce the provider response hook issue on current upstream main. Use deterministic mocked provider clients. Cover a direct transport, a forwarding wrapper, and a working OpenAI control.

[assistant]
Confirmed. Mistral completed with onResponse=0; Anthropic Vertex and Bedrock Mantle did not forward the callback; OpenAI completed with onResponse=1 before start.

[user]
Can we use something other than Mistral?

[assistant]
Ollama is a better first direct transport because it owns the real HTTP Response and has no SDK ambiguity.

[user]
Ollama is logged in locally. Continue to verify.

[assistant]
Before the fix, native Ollama completed glm-5.2:cloud with text OK and onResponse=0.

[user]
Open the tracking issue, then autoimplement the pull request with the regression test.

[assistant]
Opened #125802. Added the initial provider-acceptance contract and deterministic coverage.

[user]
Autoimplement all remaining provider-acceptance work in one PR.

[assistant]
Reused the existing broad PR, rebased it onto current main, removed the duplicated Ollama hook path, completed the HTTP, SDK, WebSocket, wrapper, and diagnostic boundaries, and ran focused tests, changed gates, build checks, and independent review.

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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 Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 4:17 PM ET / 20:17 UTC.

ClawSweeper review

What this changes

This PR adds a provider-acceptance callback across HTTP, SDK, and WebSocket streams, forwards it through provider wrappers, and records it in model diagnostics.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

The prior public-SDK export blocker is fixed on the current head. Keep this maintainer-owned PR open for the required direct Codex WebSocket-source check before treating its Codex-dependent behavior as fully cleared.

Priority: P1
Reviewed head: 319aafaaaeb14ad8b6d0110144c46f3b5bf0f7bf
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The prior SDK-export blocker is resolved and focused proof is strong; direct Codex-source verification remains required by repository policy.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR records a native Ollama before/after run with the added acceptance and response callbacks, alongside focused after-fix coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR records a native Ollama before/after run with the added acceptance and response callbacks, alongside focused after-fix coverage.
Evidence reviewed 6 items Public SDK repair: The current head adds typed root and workspace exports plus documented registration for the lifecycle subpath, resolving the prior external-plugin import blocker.
Lifecycle owner: Shared helpers report only successful HTTP responses as accepted, retain onResponse for all observed HTTP responses, and cancel unread bodies after callback failure.
Diagnostic consumer: Diagnostics record the acceptance fact separately from the legacy response callback rather than infer acceptance from a response status.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs packages/ai/src/transports/transport-stream-shared.acceptance.test.ts

Result: PASS (completed)

node scripts/run-vitest.mjs packages/ai/src/transports/transport-stream-shared.acceptance.test.ts
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-125807-7wY0It/target$ node scripts/run-vitest.mjs packages/ai/src/transports/transport-stream-shared.acceptance
.test.ts
node scripts/run-vitest.mjs packages/ai/src/transports/transport-stream-shared.acceptance.test.ts
[test] starting test/vitest/vitest.unit.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-125807-7wY0It/target

 ✓  unit  packages/ai/src/transports/transport-stream-shared.acceptance.test.ts (7 tests) 84ms

 Test Files  1 passed (1)
      Tests  7 passed (7)
   Start at  20:18:22
   Duration  1.50s (transform 1.14s, setup 1.01s, import 46ms, tests 84ms, environment 0ms)

[test] passed 1 Vitest shard in 11.83s
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-125807-7wY0It/target$ node scripts/run-vitest.mjs packages/ai/src/transports/transport-stream-shared.acceptance
.test.ts

































Assertions:

  • PASS expect_output: transport-stream-shared.acceptance.test.ts

How this fits together

Model providers open HTTP, SDK, or WebSocket streams and emit lifecycle callbacks before model output begins. Those callbacks feed plugin hooks and diagnostic records used by the agent runtime.

flowchart LR
A[Model request] --> B[Provider transport]
B --> C{Acceptance evidence}
C --> D[Lifecycle callbacks]
D --> E[Model event stream]
D --> F[Diagnostics]
G[Provider wrappers] --> B
Loading

Decision needed

Question Recommendation
Should this PR wait for the mandated direct Codex WebSocket-source inspection, or may maintainers explicitly accept the PR’s cited upstream-source evidence instead? Require direct Codex inspection: Restore the exact Codex checkout and verify the first normal WebSocket event boundary before merge.

Why: Repository policy requires direct sibling Codex-source inspection for a verdict on Codex-backed behavior, and that checkout was unavailable in this read-only environment.

Before merge

  • Resolve merge risk (P1) - The Codex-dependent WebSocket acceptance boundary cannot be fully cleared without the repository-required direct Codex source inspection.
  • Resolve merge risk (P1) - The bug fix adds net +275 production lines for a public SDK contract, so its expanded compatibility surface needs maintainer acceptance.
  • Complete next step (P2) - A maintainer must decide whether the unavailable direct Codex inspection can be waived; no mechanical repair is indicated.
Agent review details

Security

None.

PR surface

Source +263, Tests +819, Docs +3, Config +8, Other +4. Total +1097 across 44 files.

View PR surface stats
Area Files Added Removed Net
Source 23 415 152 +263
Tests 15 828 9 +819
Docs 2 3 0 +3
Config 2 8 0 +8
Generated 0 0 0 0
Other 2 7 3 +4
Total 44 1261 164 +1097

Review metrics

Metric Value Why it matters
Production versus tests production +275 net, tests +819 net The public lifecycle contract and transport conversions materially grow production code while adding focused regression coverage.

Stored data model

Persistent data-model change detected: serialized state: packages/ai/src/providers/openai-chatgpt-responses-streaming.test.ts, vector/embedding metadata: docs/plugins/sdk-provider-plugins.md, vector/embedding metadata: docs/plugins/sdk-subpaths.md, vector/embedding metadata: extensions/amazon-bedrock/stream.runtime.test.ts, vector/embedding metadata: extensions/amazon-bedrock/stream.runtime.ts, vector/embedding metadata: packages/ai/src/providers/google-shared.test.ts, and 2 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the upstream boundary before merge (recommended)
    Restore the Codex source checkout, compare its WebSocket error and normal-event sequence with the current acceptance boundary, and rerun exact-head checks.
  2. Accept the documented dependency proof
    A maintainer may explicitly accept the PR’s cited upstream source proof despite the unavailable local Codex checkout.

Technical review

Best possible solution:

Restore the exact Codex source checkout, verify its WebSocket error and first-normal-event boundary against this implementation, then merge after exact-head validation is green.

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

Yes from source and focused tests, but this read-only review did not execute the PR’s reproduction commands.

Is this the best way to solve the issue?

Unclear: the shared lifecycle owner and published SDK seam are coherent, but the Codex-dependent WebSocket boundary needs direct dependency-source confirmation.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR records a native Ollama before/after run with the added acceptance and response callbacks, alongside focused after-fix coverage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR records a native Ollama before/after run with the added acceptance and response callbacks, alongside focused after-fix coverage.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: Provider lifecycle behavior affects real model-call diagnostics and plugin callbacks.
  • merge-risk: 🚨 compatibility: The PR adds a public Plugin SDK lifecycle contract while retaining the existing response callback.
  • merge-risk: 🚨 availability: Callback ordering and abort handling are on the stream-start path.
  • 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 records a native Ollama before/after run with the added acceptance and response callbacks, alongside focused after-fix coverage.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR records a native Ollama before/after run with the added acceptance and response callbacks, alongside focused after-fix coverage.

Evidence

What I checked:

Likely related people:

  • osolmaz: Authored the provider-acceptance series and current PR head. (role: recent area contributor; confidence: high; commits: 319aafaaaeb1, db9fcf1f3334; files: packages/ai/src/transports/transport-stream-shared.ts, src/plugin-sdk/provider-lifecycle.ts)
  • Peter Steinberger: Recent history includes adjacent Responses hook-lifecycle and AI transport ownership work. (role: recent adjacent contributor; confidence: medium; commits: 903af8bef557, 5451f48b8242; files: packages/ai/src/providers/openai-chatgpt-responses.ts, packages/ai/src/transports/openai-transport-shared.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore and inspect the exact Codex WebSocket source before treating the WebSocket portion as fully cleared.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (7 earlier review cycles)
  • reviewed 2026-08-18T13:14:20.221Z sha 0dec931bf6e656d214c1220bc54a70d6d16c8dfd :: needs changes before merge. :: [P2] Preserve acceptance-hook failures after a first-response timeout
  • reviewed 2026-08-18T14:19:27.375Z sha 57bb2a035bd42193c2150dda8fb1941dc8258cbc :: found issues before merge. :: [P1] Keep paused Google callbacks abortable
  • reviewed 2026-08-18T14:46:57.600Z sha 3ea03bb14abe88979ce0fe3561302c01378447ec :: found issues before merge. :: [P2] Report Mistral's real HTTP response
  • reviewed 2026-08-18T15:27:43.976Z sha 0a5b31dbd165a0deb733059b207aedbea43b6c61 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-18T18:18:36.872Z sha 0a5b31dbd165a0deb733059b207aedbea43b6c61 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-18T18:56:14.485Z sha 8f67e52fedef2d07343753670fd4d25e5d89ce24 :: found issues before merge. :: [P1] Expose lifecycle helpers through a supported SDK boundary
  • reviewed 2026-08-18T19:42:08.902Z sha 8f67e52fedef2d07343753670fd4d25e5d89ce24 :: found issues before merge. :: [P1] Expose lifecycle helpers through a supported SDK boundary

@osolmaz

osolmaz commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The current head addresses the Google retry finding. Provider acceptance callback time no longer consumes the first-response deadline, callback failures remain terminal, and both cases have regressions.

It also reports acceptance on the default ChatGPT/Codex WebSocket path before stream start. The final head passes 665 focused tests, node scripts/check-changed.mjs --base upstream/main, both TypeScript checks, the build, documentation checks, and Pi Reviewer with no findings.

@clawsweeper

clawsweeper Bot commented Aug 18, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 18, 2026
@osolmaz

osolmaz commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The current head fixes the pending-callback availability finding. HTTP and SDK acceptance callbacks now race the effective request signal, explicit retry-local signals still take priority, and caller abort cancels unread response bodies without retrying.

The head also commits accepted Codex WebSocket state before it invokes the acceptance callback. It passes 684 focused tests, all requested local gates, the build, and Pi Reviewer with no findings.

@clawsweeper

clawsweeper Bot commented Aug 18, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@osolmaz

osolmaz commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The current head now captures Mistral’s real guarded Response. Successful responses report real status and headers through both lifecycle callbacks; rejected responses report only the legacy response callback. The shared HTTP helper derives acceptance from response.ok, so custom transports cannot mark 4xx or 5xx responses accepted by omission.

The head passes 687 focused tests, all requested local gates, the build, and Pi Reviewer with no findings.

@osolmaz
osolmaz force-pushed the fix/provider-acceptance-hooks branch from ec1515b to dfc0727 Compare August 18, 2026 20:00
@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: 🦐 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 Aug 18, 2026
@osolmaz

osolmaz commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Land-ready verification for exact head 319aafaaaeb14ad8b6d0110144c46f3b5bf0f7bf:

  • Focused provider lifecycle proof passed: 16 files, 691 tests.
  • node scripts/check-changed.mjs --base upstream/main --timed passed.
  • pnpm tsgo:prod, pnpm tsgo:test, pnpm plugin-sdk:surface:check, node scripts/check-plugin-sdk-subpath-exports.mts, pnpm build, pnpm docs:check-mdx, and pnpm docs:check-links passed.
  • Pi autoreview is clean. pi-reviewer --base upstream/main reports patch is correct with no findings.
  • Exact-head CI run 32180395322 attempt 3 and openclaw/ci-gate succeeded. Attempts 1 and 2 had only GitHub codeload 429 setup failures; the failed jobs were rerun.
  • ClawSweeper reviewed the exact head and reports no actionable findings. The prior private-local SDK finding is fixed by the supported typed openclaw/plugin-sdk/provider-lifecycle subpath.
  • I directly inspected openai/codex@d6ea5991e7f91eec5bad1fb4cb36f6be638878bc, especially codex-rs/codex-api/src/endpoint/responses_websocket.rs:675-795: the client sends response.create, rejects wrapped error events, then forwards parsed provider events. OpenClaw reports acceptance on the first forwarded event before exposing it downstream.
  • Maintainer decisions are resolved: Onur requested the additive public Plugin SDK contract and the complete remaining repair in one PR. The net production growth is accepted for that supported lifecycle capability and its transport cleanup ownership.

Known proof gaps: none.

@osolmaz
osolmaz merged commit f5e9622 into openclaw:main Aug 18, 2026
672 of 688 checks passed
@osolmaz
osolmaz deleted the fix/provider-acceptance-hooks branch August 18, 2026 20:51
@osolmaz

osolmaz commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Merged via squash.

osolmaz added a commit that referenced this pull request Aug 18, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
* fix(providers): report request acceptance consistently

* fix(providers): retain response hook compatibility

* fix(providers): keep legacy response hook path

* fix(providers): distinguish rejected response attempts

* fix(providers): keep acceptance evidence truthful

* fix(google): preserve provider acceptance errors

* test(google): satisfy acceptance callback lint

* fix(google): exclude acceptance hooks from retry deadline

* fix(openai): report Codex websocket acceptance

* fix(openai): commit websocket state before acceptance hook

* fix(google): abort pending acceptance callbacks

* fix(providers): abort pending acceptance callbacks

* fix(mistral): report observed HTTP response

* fix(mistral): report rejected HTTP responses

* fix(providers): derive acceptance from HTTP status

* fix(providers): preserve acceptance lifecycle cleanup

* fix(anthropic): report observed HTTP response

* fix(anthropic): report rejected HTTP responses

* fix(plugin-sdk): expose provider lifecycle

* fix(providers): stop after lifecycle abort

* fix(mistral): cancel unread acceptance failures
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: amazon-bedrock extensions: amazon-bedrock-mantle extensions: anthropic-vertex extensions: google extensions: ollama maintainer Maintainer-authored PR 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. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

[Bug]: successful provider streams can skip response hooks

1 participant