mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 16:13:15 +00:00
When the primary model raises a transient provider error (5xx, 429, connection/timeout) the request is retried once against a fallback model from the other provider. Anthropic primaries fall back to OpenAI and vice versa. Also bumps the SDK max_retries from the default 2 to 6 so quick blips stay on the primary and keep prompt caching warm. Triggered by 529 OverloadedError traces that ended runs silently with no Slack/Linear/PR reply.
21 lines
843 B
Python
21 lines
843 B
Python
from .check_message_queue import check_message_queue_before_model
|
|
from .ensure_no_empty_msg import ensure_no_empty_msg
|
|
from .exclude_tools import ExcludeToolsMiddleware
|
|
from .model_fallback import ModelFallbackMiddleware
|
|
from .notify_step_limit import notify_step_limit_reached
|
|
from .refresh_slack_status import SlackAssistantStatusMiddleware
|
|
from .sandbox_circuit_breaker import SandboxCircuitBreakerMiddleware
|
|
from .sanitize_tool_inputs import SanitizeToolInputsMiddleware
|
|
from .tool_error_handler import ToolErrorMiddleware
|
|
|
|
__all__ = [
|
|
"ExcludeToolsMiddleware",
|
|
"ModelFallbackMiddleware",
|
|
"SanitizeToolInputsMiddleware",
|
|
"ToolErrorMiddleware",
|
|
"SandboxCircuitBreakerMiddleware",
|
|
"SlackAssistantStatusMiddleware",
|
|
"check_message_queue_before_model",
|
|
"ensure_no_empty_msg",
|
|
"notify_step_limit_reached",
|
|
]
|