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

FallbackModel support #894

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

FallbackModel support #894

wants to merge 28 commits into from

Conversation

sydney-runkle
Copy link
Member

@sydney-runkle sydney-runkle commented Feb 11, 2025

This PR adds a FallbackModel to the models folder that allows for delegation of a task to a new model if the current model fails with a 4xx or 5xx response. See the docs for a detailed example.

Easiest to review by toggling the "hide whitespace" button.

Fix #516

This is one of the items on our roadmap as well.

In a follow up PR:

  • Rename ModelStatusError and rethink our error structure internally (before the next release)
  • Consider errors with no status code (connection errors)

@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 15:19 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 16:12 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 18:21 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 18:25 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 18:43 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 19:10 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 22:12 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 11, 2025 22:40 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 12, 2025 15:32 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 15:41 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 16:37 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 17:17 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 17:29 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 17:40 Inactive
@niebloomj
Copy link

I love this

@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 21:16 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 21:41 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 13, 2025 23:15 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 14, 2025 15:25 Inactive
@github-actions github-actions bot temporarily deployed to deploy-preview February 14, 2025 15:50 Inactive
Copy link
Contributor

@dmontagu dmontagu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Let's confirm the new exception names with Samuel tomorrow morning then merge.

@github-actions github-actions bot temporarily deployed to deploy-preview February 18, 2025 16:18 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fallback Model
4 participants