-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodels.py
More file actions
31 lines (25 loc) · 988 Bytes
/
Copy pathmodels.py
File metadata and controls
31 lines (25 loc) · 988 Bytes
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
from pydantic import BaseModel, HttpUrl
from enum import IntEnum
from typing import List, Optional, Dict, Any
from datetime import datetime
class EndpointStatus(IntEnum):
FOUND = 0 # Found but not yet analyzed
IGNORED = 1 # Scanned and found useless or unreachable
DISCOVERED = 2 # Reachable but needs configuration/interface
VERIFIED = 3 # Verified and usable in the pool
class LLMEndpoint(BaseModel):
id: str
url: HttpUrl
status: EndpointStatus
provider: str = "openai" # openai, anthropic, google, azure, ollama, groq, together, mistral, deepseek, openai-compatible
provider_type: Optional[str] = None # legacy alias for provider
metadata: Dict[str, Any] = {}
last_verified: Optional[datetime] = None
latency_ms: Optional[float] = 0.0
success_rate: Optional[float] = 0.0
tags: List[str] = []
class AgentState(BaseModel):
agent_name: str
last_run: datetime
processed_count: int
active_tasks: List[str]