feat: remove un-paginated message list on usage stats [LET-5747] (#5599)

feat: remove un-paginated message list on usage stats
This commit is contained in:
cthomas
2025-10-21 13:02:18 -07:00
committed by Caren Thomas
parent 6c27d8a1ec
commit 7b2e7e2f4c
4 changed files with 1 additions and 21 deletions

View File

@@ -31250,24 +31250,6 @@
"description": "The number of steps taken by the agent.",
"default": 0
},
"steps_messages": {
"anyOf": [
{
"items": {
"items": {
"$ref": "#/components/schemas/Message"
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Steps Messages",
"description": "The messages generated per step"
},
"run_ids": {
"anyOf": [
{

View File

@@ -22,5 +22,4 @@ class LettaUsageStatistics(BaseModel):
total_tokens: int = Field(0, description="The total number of tokens processed by the agent.")
step_count: int = Field(0, description="The number of steps taken by the agent.")
# TODO: Optional for now. This field makes everyone's lives easier
steps_messages: Optional[List[List[Message]]] = Field(None, description="The messages generated per step")
run_ids: Optional[List[str]] = Field(None, description="The background task run IDs associated with the agent interaction")

View File

@@ -121,7 +121,7 @@ async def sse_async_generator(
err_msg = f"Expected LettaUsageStatistics, got {type(usage)}"
logger.error(err_msg)
raise ValueError(err_msg)
yield sse_formatter(usage.model_dump(exclude={"steps_messages"}))
yield sse_formatter(usage.model_dump())
except ContextWindowExceededError as e:
capture_sentry_exception(e)

View File

@@ -2363,7 +2363,6 @@ def test_create_agent(client: LettaSDKClient) -> None:
"prompt_tokens",
"total_tokens",
"step_count",
"steps_messages",
"run_ids",
},
)