Switching providers/models during retries / Exposing retry system #3387
williamlmao
started this conversation in
Ideas & Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before using the AI SDK, we had a pattern where if we detected certain kinds of errors from providers, we would retry the request with a fallback provider and model. Sometimes we'd also like to be able to update the configuration options between retries, such as changing temperature.
Scanned the docs and didn't see a way to handle this right now directly within the AI SDK. I saw there was a fallback provider option in the custom providers, but that seems to only be for situations when the provider itself is not found.
Is this something that will be coming to the to the AI SDK? If it's not planned yet, I think it would be a great addition!
Beta Was this translation helpful? Give feedback.
All reactions