From 7cb22c9838dcece38a67c4fbdcfc032e72775bd7 Mon Sep 17 00:00:00 2001 From: Sarah Wooders Date: Sat, 24 May 2025 20:51:43 -0700 Subject: [PATCH] fix letta endpoint --- letta/server/rest_api/routers/v1/agents.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py index fc73fafc..c09bcccc 100644 --- a/letta/server/rest_api/routers/v1/agents.py +++ b/letta/server/rest_api/routers/v1/agents.py @@ -716,6 +716,7 @@ async def send_message_streaming( feature_enabled = settings.use_experimental or experimental_header.lower() == "true" model_compatible = agent.llm_config.model_endpoint_type in ["anthropic", "openai", "together", "google_ai", "google_vertex"] model_compatible_token_streaming = agent.llm_config.model_endpoint_type in ["anthropic", "openai"] + not_letta_endpoint = not ("letta" in agent.llm_config.model_endpoint) if agent_eligible and feature_enabled and model_compatible: if agent.enable_sleeptime: @@ -745,7 +746,7 @@ async def send_message_streaming( ) from letta.server.rest_api.streaming_response import StreamingResponseWithStatusCode - if request.stream_tokens and model_compatible_token_streaming: + if request.stream_tokens and model_compatible_token_streaming and not_letta_endpoint: result = StreamingResponseWithStatusCode( experimental_agent.step_stream( input_messages=request.messages,