fixed injection watcher

This commit is contained in:
2026-06-11 08:23:45 +03:00
parent b5a1831b8e
commit 0ccf19a1cc
3 changed files with 180 additions and 6 deletions
+7 -2
View File
@@ -24,6 +24,8 @@ class LLMClient:
def _reasoning_extra_body(self) -> dict[str, Any] | None:
if not self.reasoning_effort:
return None
if self.reasoning_effort == "none":
return {"reasoning": {"effort": "none", "exclude": True}}
return {"reasoning": {"effort": self.reasoning_effort}}
@staticmethod
@@ -151,10 +153,13 @@ class LLMClient:
}
if tool_calls:
yield {"type": "tool_calls", "tool_calls": list(tool_calls.values())}
logger.debug(
"LLM stream done: finish_reason=%s tool_calls=%d reasoning_len=%d",
logger.info(
"LLM stream done: model=%s finish_reason=%s tool_calls=%d "
"content_in_stream=%d reasoning_len=%d",
model or self.model,
choice.finish_reason,
len(tool_calls),
len(reasoning_parts),
len(reasoning),
)
yield {"type": "done", "finish_reason": choice.finish_reason}