-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path__init__.py
More file actions
58 lines (56 loc) · 1.56 KB
/
Copy path__init__.py
File metadata and controls
58 lines (56 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""路由模块."""
from .circuit_breaker import CircuitBreaker, CircuitState
from .error_classifier import (
build_request_capabilities,
extract_error_payload_from_http_status,
is_semantic_rejection,
)
from .executor import _RouteExecutor
from .model_mapper import ModelMapper
from .quota_guard import QuotaGuard, QuotaState
from .rate_limit import (
RateLimitInfo,
compute_effective_retry_seconds,
compute_rate_limit_deadline,
parse_rate_limit_headers,
)
from .retry import RetryConfig, calculate_delay, is_retryable_error
from .router import RequestRouter
from .session_manager import RouteSessionManager
from .tier import BackendTier
from .usage_parser import (
build_usage_evidence_records,
has_missing_input_usage_signals,
parse_usage_from_chunk,
)
from .usage_recorder import UsageRecorder
__all__ = [
# Core routing
"CircuitBreaker",
"CircuitState",
"ModelMapper",
"RequestRouter",
"BackendTier",
# Decomposed components (internal use)
"_RouteExecutor",
"UsageRecorder",
"RouteSessionManager",
# Resiliency
"QuotaGuard",
"QuotaState",
"RateLimitInfo",
"RetryConfig",
"parse_rate_limit_headers",
"compute_effective_retry_seconds",
"compute_rate_limit_deadline",
"is_retryable_error",
"calculate_delay",
# Error classification
"build_request_capabilities",
"is_semantic_rejection",
"extract_error_payload_from_http_status",
# Usage parsing
"build_usage_evidence_records",
"has_missing_input_usage_signals",
"parse_usage_from_chunk",
]