Skip to content

Conversation

@mmabrouk
Copy link
Member

Summary

  • Define AgentaNodeDto and AgentaNodesResponse locally in SDK
  • Remove dependency on Fern-generated types that may not exist in future SDK generations

Changes

sdk/agenta/sdk/types.py: Added local definitions for AgentaNodeDto and AgentaNodesResponse, replacing the import from agenta.client.backend.types.

Why

These types are SDK-internal models used for inline trace responses. They were previously imported from Fern-generated client types, but:

  1. Those types aren't actually exposed by any API endpoint (they're internal API models)
  2. The current cloud API OpenAPI spec doesn't include these types
  3. Future Fern SDK regenerations may not include them

Defining them locally makes the SDK self-contained and independent of Fern generation quirks.

Type Definitions

class AgentaNodeDto(BaseModel):
    """SDK-internal type for inline trace node representation."""
    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")

Testing

  • Types are compatible with existing usage in sdk/agenta/sdk/tracing/inline.py and sdk/agenta/sdk/engines/tracing/inline.py
  • Uses extra="allow" to accept arbitrary fields when constructed from span dictionaries

…from Fern client

- Define AgentaNodeDto and AgentaNodesResponse locally in SDK
- Remove dependency on Fern-generated types that may not exist in future SDK generations

These types are SDK-internal models used for inline trace responses. They were
previously imported from Fern-generated client types, but those types aren't
actually exposed by the API (they're internal API models). Defining them locally
makes the SDK self-contained and independent of Fern generation quirks.
@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jan 15, 2026 1:38pm

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 15, 2026
@dosubot dosubot bot added the SDK label Jan 15, 2026
@mmabrouk mmabrouk requested review from jp-agenta and junaway January 15, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SDK size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants