Coverage for agentos/models/__init__.py: 100%
7 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-05 20:52 +0800
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-05 20:52 +0800
1"""AgentOS v1.2.8 — Models module: routing, resilience, and API contracts."""
3from agentos.models.router import ModelRouter
4from agentos.models.resilience import (
5 CancellationSource,
6 CancelledError,
7 RetryConfig,
8 CircuitBreaker,
9 CircuitBreakerConfig,
10 ResilienceConfig,
11 ResilientCall,
12 retry_with_backoff,
13 with_timeout,
14 with_fallback,
15)
16from agentos.models.routing_strategy import (
17 RoutingStrategy,
18 Complexity,
19 Budget,
20)
22# v1.17.0: API contract models
23from agentos.models.response import (
24 APIResponse,
25 APIResponseMeta,
26 APIErrorDetail,
27 PaginationMeta,
28 PaginatedResponse,
29 HealthResponse,
30 HealthComponent,
31 VersionResponse,
32)
33from agentos.models.error import (
34 ErrorCode,
35 AgentOSError,
36 ValidationError,
37 NotFoundError,
38 AuthenticationError,
39 AuthorizationError,
40 RateLimitError,
41 InternalError,
42 ServiceUnavailableError,
43)
44from agentos.models.agent import (
45 AgentRunRequest,
46 AgentRunResponse,
47 AgentStatus,
48 AgentInfo,
49 AgentListResponse,
50)
52__all__ = [
53 # Routing & Resilience
54 "ModelRouter",
55 "CancellationSource",
56 "CancelledError",
57 "RetryConfig",
58 "CircuitBreaker",
59 "CircuitBreakerConfig",
60 "ResilienceConfig",
61 "ResilientCall",
62 "retry_with_backoff",
63 "with_timeout",
64 "with_fallback",
65 "RoutingStrategy",
66 "Complexity",
67 "Budget",
68 # API Contracts
69 "APIResponse",
70 "APIResponseMeta",
71 "APIErrorDetail",
72 "PaginationMeta",
73 "PaginatedResponse",
74 "HealthResponse",
75 "HealthComponent",
76 "VersionResponse",
77 # Errors
78 "ErrorCode",
79 "AgentOSError",
80 "ValidationError",
81 "NotFoundError",
82 "AuthenticationError",
83 "AuthorizationError",
84 "RateLimitError",
85 "InternalError",
86 "ServiceUnavailableError",
87 # Agent
88 "AgentRunRequest",
89 "AgentRunResponse",
90 "AgentStatus",
91 "AgentInfo",
92 "AgentListResponse",
93]