Skip to content

Commit 9bbbf0c

Browse files
authored
Make FallbackModel accept string model names (#2564)
1 parent 9c82b2e commit 9bbbf0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydantic_ai_slim/pydantic_ai/models/fallback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class FallbackModel(Model):
3333

3434
def __init__(
3535
self,
36-
default_model: Model | KnownModelName,
37-
*fallback_models: Model | KnownModelName,
36+
default_model: Model | KnownModelName | str,
37+
*fallback_models: Model | KnownModelName | str,
3838
fallback_on: Callable[[Exception], bool] | tuple[type[Exception], ...] = (ModelHTTPError,),
3939
):
4040
"""Initialize a fallback model instance.

0 commit comments

Comments
 (0)