Skip to content

Commit a2bb860

Browse files
authored
Merge pull request #45 from arini-ai/except-deploymenterror
fallback on deployment error as well
2 parents 150ccc9 + 086d603 commit a2bb860

File tree

2 files changed

+768
-699
lines changed

2 files changed

+768
-699
lines changed

src/azure_switchboard/switchboard.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .deployment import (
2222
AzureDeployment,
2323
Deployment,
24+
DeploymentError,
2425
OpenAIDeployment,
2526
)
2627

@@ -221,7 +222,7 @@ async def create(
221222
},
222223
)
223224
return response
224-
except (SwitchboardError, RetryError):
225+
except (SwitchboardError, DeploymentError, RetryError):
225226
logger.exception("Azure failovers exhausted")
226227
# Record Azure deployment failure
227228
deployment_failures_counter.add(1, {"model": model, "provider": "azure"})

0 commit comments

Comments
 (0)