fix: align Responses messages and video exports

This commit is contained in:
chenmingxuan committed 2026-09-29 00:12:35 +08:00
1 parent e1e26772d9
commit c818a09a49
10 files changed
+277 -18

No files matched your search

+3 -1
View File
@@ -46,6 +46,7 @@ from uuid import uuid4
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage
from artemis.llm.messages import adapt_responses_messages
from artemis.memory.step_memory import JobKey, StepLens, StepMemoryService
from artemis.memory.transcript import format_session_offset
from artemis.utils.logger import get_logger
@@ -503,7 +504,8 @@ class StepCapsuleLens(StepLens):
return parsed
async def _invoke(self, llm: Any, messages: list[BaseMessage], model_label: str):
response = await asyncio.wait_for(llm.ainvoke(messages), timeout=90.0)
request_messages = adapt_responses_messages(messages, model_label)
response = await asyncio.wait_for(llm.ainvoke(request_messages), timeout=90.0)
# Raw-model bypass metering (gateway-wrapped models meter themselves);
# capsule prompts are small and are kept out of the session meter's
# last_prompt_tokens (the compaction base itself is operator-owned on