Coverage for agentos/models/__init__.py: 100%
7 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-06 19:15 +0800
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-06 19:15 +0800
1"""AgentOS v1.2.8 — Models module: routing, resilience, and API contracts."""
3from agentos.models.agent import (
4 AgentInfo,
5 AgentListResponse,
6 AgentRunRequest,
7 AgentRunResponse,
8 AgentStatus,
9)
10from agentos.models.error import (
11 AgentOSError,
12 AuthenticationError,
13 AuthorizationError,
14 ErrorCode,
15 InternalError,
16 NotFoundError,
17 RateLimitError,
18 ServiceUnavailableError,
19 ValidationError,
20)
21from agentos.models.resilience import (
22 CancellationSource,
23 CancelledError,
24 CircuitBreaker,
25 CircuitBreakerConfig,
26 ResilienceConfig,
27 ResilientCall,
28 RetryConfig,
29 retry_with_backoff,
30 with_fallback,
31 with_timeout,
32)
34# v1.17.0: API contract models
35from agentos.models.response import (
36 APIErrorDetail,
37 APIResponse,
38 APIResponseMeta,
39 HealthComponent,
40 HealthResponse,
41 PaginatedResponse,
42 PaginationMeta,
43 VersionResponse,
44)
45from agentos.models.router import ModelRouter
46from agentos.models.routing_strategy import (
47 Budget,
48 Complexity,
49 RoutingStrategy,
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]