Skip to content

Commit 3081956

Browse files
fix: skip LLM-based title generation for ACP agents
The ACPAgent uses a sentinel LLM with model="acp-managed" that cannot make direct LLM calls. When generate_title() was called for ACP conversations, it would fall back to this sentinel LLM and fail with: "LiteLLM Provider NOT provided. You passed model=acp-managed" Add a guard to detect the sentinel model and pass None to generate_conversation_title(), which causes it to use simple truncation fallback instead of LLM-based title generation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0b41c05 commit 3081956

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

openhands-sdk/openhands/sdk/conversation/impl/local_conversation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,11 @@ def generate_title(self, llm: LLM | None = None, max_length: int = 50) -> str:
911911
# Use provided LLM or fall back to agent's LLM
912912
llm_to_use = llm or self.agent.llm
913913

914+
# Skip LLM-based title generation for ACP agents with sentinel LLM
915+
# The sentinel model "acp-managed" cannot make LLM calls directly
916+
if llm_to_use.model == "acp-managed":
917+
llm_to_use = None
918+
914919
return generate_conversation_title(
915920
events=self._state.events, llm=llm_to_use, max_length=max_length
916921
)

0 commit comments

Comments
 (0)