feat: add run_id to input messages and step_id to messages (#5099)

This commit is contained in:
Sarah Wooders
2025-10-02 17:44:14 -07:00
committed by Caren Thomas
parent 7c03288c05
commit ef07e03ee3
13 changed files with 119 additions and 15 deletions

View File

@@ -52,6 +52,7 @@ class SimpleLLMStreamAdapter(LettaLLMStreamAdapter):
self.interface = SimpleAnthropicStreamingInterface(
requires_approval_tools=requires_approval_tools,
run_id=self.run_id,
step_id=step_id,
)
elif self.llm_config.model_endpoint_type == ProviderType.openai:
# Decide interface based on payload shape
@@ -65,6 +66,7 @@ class SimpleLLMStreamAdapter(LettaLLMStreamAdapter):
tools=tools,
requires_approval_tools=requires_approval_tools,
run_id=self.run_id,
step_id=step_id,
)
else:
self.interface = SimpleOpenAIStreamingInterface(
@@ -74,6 +76,7 @@ class SimpleLLMStreamAdapter(LettaLLMStreamAdapter):
requires_approval_tools=requires_approval_tools,
model=self.llm_config.model,
run_id=self.run_id,
step_id=step_id,
)
else:
raise ValueError(f"Streaming not supported for provider {self.llm_config.model_endpoint_type}")