diff --git a/sdk/agenta/sdk/types.py b/sdk/agenta/sdk/types.py index b3e634c57..d39ae4be4 100644 --- a/sdk/agenta/sdk/types.py +++ b/sdk/agenta/sdk/types.py @@ -9,7 +9,31 @@ from agenta.sdk.assets import supported_llm_models, model_metadata -from agenta.client.backend.types import AgentaNodesResponse, AgentaNodeDto + + +# SDK-internal types for inline trace responses. +# These were previously imported from Fern-generated client types, but are now +# defined locally since they are SDK-internal models not exposed by the API. + + +class AgentaNodeDto(BaseModel): + """SDK-internal type for inline trace node representation. + + This type accepts arbitrary fields via extra="allow" since it's + constructed from span dictionaries with dynamic keys. + """ + + model_config = ConfigDict(extra="allow") + + +class AgentaNodesResponse(BaseModel): + """SDK-internal type for inline trace response.""" + + version: str + nodes: List[AgentaNodeDto] = [] + count: Optional[int] = None + + model_config = ConfigDict(extra="allow") @dataclass