Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
This PR addresses only the structured provider-error message part of #52042. The custom-model image capability and session recovery questions remain open. I used |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Refs #52042
Type of change
What does this PR do?
When the AI SDK supplies a generic HTTP error, show a decoded provider message from either a structured error object or a plain string
errorin SDK data or a JSON response body. Preserve the original response body and keep the SDK message and status/code fallbacks when there is no provider message. For example,{"error":"The selected model is not multimodal"}now displays that message instead ofProvider request failed with HTTP 400.This changes error reporting only. It does not change custom-model image capabilities or prevent rejected images from recurring in a session. The raw response shape from #52042 has not been captured, so the exact reported provider response remains unconfirmed.
How did you verify your code works?
cd packages/core && bun test test/aisdk.test.ts— 46 passed, including string errors from SDK data and the JSON response body.cd packages/core && bun typecheck— passed.bun run check— lint passed; repository typecheck failed in unmodifiedpackages/session-uifiles with implicit-any and generic-type errors. I have not established whether that failure also occurs on the target branch.git diff --check— passed.LocationServiceMaptimeouts; it did not complete and was not rerun for this commit.Screenshots / recordings
Not applicable.
Checklist