mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-19 17:11:42 -06:00
ac2f8a8dce
* fix(ai): preserve provider terminal error message in stream transports The managed OpenAI Responses transport (and the mistral/google-shared providers) threw a literal "An unknown error occurred" on terminal error stop reasons, discarding the provider's terminal fact (for example "Provider incomplete_reason: content_filter"). The catch-side projectProviderError() then overwrote output.errorMessage with the generic string, so users saw an unknown error and failover classified the deterministic failure as a transient timeout, rotating models and re-sending the same filtered prompt. Align all three sites with the canonical siblings (openai-responses-shared.ts, transport-stream-shared.ts) by preserving output.errorMessage when present. * test(ai): await the transport stream factory before result() * fix(ai): narrow the repair to the managed OpenAI transport ClawSweeper correctly noted the mistral and google-shared edits were no-ops: streamMistral never assigns output.errorMessage and the Google path throws its own constructed terminal error before this fallback. Revert both to keep the PR scoped to the proven managed-transport repair.