Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: add billing context to compact and summarize endpoints (#10106)
cthomas76d5f67f1d93
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.pyindex 57fcabcee..35c2b46bd 100644--- a/letta/server/rest_api/routers/v1/agents.py+++ b/letta/server/rest_api/routers/v1/agents.py@@ -2464,6 +2464,7 @@ async def summarize_messages(messages=in_context_messages,compaction_settings=compaction_settings,use_summary_role=True,+ billing_context=headers.billing_context,)num_messages_after = len(messages)diff --git a/letta/server/rest_api/routers/v1/conversations.py b/letta/server/rest_api/routers/v1/conversations.pyindex 881608b79..2ec8b06d4 100644--- a/letta/server/rest_api/routers/v1/conversations.py+++ b/letta/server/rest_api/routers/v1/conversations.py@@ -986,6 +986,7 @@ async def compact_conversation(messages=in_context_messages,compaction_settings=compaction_settings,use_summary_role=True,+ billing_context=headers.billing_context,)num_messages_after = len(messages)