Conversation
Contributor
|
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. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Author
|
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 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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