-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
- We have a recurring problem with Anthropic Overloaded exceptions
- We want to fallback to a different model (either a different version or a different provider)
- It would be cool if we could do something like the following.
RetryChatModel(
...,
retries=[
AnthropicChatModel("claude-3-7-sonnet-latest"),
AnthropicChatModel("claude-3-5-sonnet-latest"),
OpenAiChatModel("40"),
],
)
- Maybe also support selecting a different model depending on the exception?
def _model_selector(attempt: int, exception: Exception) -> ChatModel | None:
...
RetryChatModel(
...,
retries=_model_selector,
)
jackmpcollins and felipeadeildo
Metadata
Metadata
Assignees
Labels
No labels