Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback Support! #742

Open
abaileyb opened this issue Dec 13, 2024 · 5 comments
Open

Fallback Support! #742

abaileyb opened this issue Dec 13, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers mirascope

Comments

@abaileyb
Copy link

Description

Yesterday's OpenAI outage had me thinking - it would be awesome if Mirascope had a feature where if the designated provider API returned a code indicating that there was an outage, I could specify another provider to attempt. Maybe this would take the form of a fallback decorator?

Would be pretty killer to have stuff fallback to Anthropic when OpenAI is down etc.

@abaileyb abaileyb added the enhancement New feature or request label Dec 13, 2024
@willbakst
Copy link
Contributor

For a fallback decorator, we first need to finish #729 so that we have a truly provider-agnostic interface. Implementing this should be fairly straightforward once we have the new decorator. Thanks for the suggestion!

@willbakst
Copy link
Contributor

Update, we're making good progress on #729 and should have that in soon. We'll prioritize tackling this feature next.

I've also done a little more thinking on this and have an idea for how we could implement the decorator to support provider-specific call decorators as well.

@willbakst willbakst added the good first issue Good for newcomers label Jan 23, 2025
@willbakst
Copy link
Contributor

Now that #729 is complete, we should be able to implement the fallback decorator.

I've marked this as a good first issue for anyone interested in contributing!

@ionflow
Copy link

ionflow commented Feb 5, 2025

I love this suggestion! Could we add a list of providers and models in order of first to last to try?

@willbakst willbakst self-assigned this Feb 5, 2025
Copy link
Contributor

yeah, likely something like a list of tuples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers mirascope
Projects
None yet
Development

No branches or pull requests

3 participants