Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ def _looks_like_rate_limit(error: BaseException) -> bool:
if isinstance(status, int) and 500 <= status < 600:
return True

# "The model produced invalid content" is a transient error from Azure OpenAI
# when the model output fails content/schema validation — worth retrying.
if any(
s in msg
for s in ["model produced invalid content", "invalid content"]
):
return True
Comment thread
Dhanushree-Microsoft marked this conversation as resolved.

cause = getattr(error, "__cause__", None)
if cause and cause is not error:
return _looks_like_rate_limit(cause)
Expand Down
2 changes: 1 addition & 1 deletion src/processor/src/steps/migration_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from datetime import datetime
from typing import Any

from agent_framework import Workflow, WorkflowBuilder, WorkflowEvent
from agent_framework import Workflow, WorkflowBuilder

from openai import AsyncAzureOpenAI

Expand Down
Loading