Fix: agent toolcall null response & schema validation & DeepSeek think history (#14425)

### What problem does this PR solve?
agent toolcall null response & schema validation & DeepSeek think
history

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
buua436
2026-04-28 17:09:08 +08:00
committed by GitHub
parent f670913bb4
commit e6e80041f5
3 changed files with 59 additions and 25 deletions

View File

@@ -145,7 +145,8 @@ class Agent(LLM, ToolBase):
self._param.function_name = self._id.split("-->")[-1]
m = super().get_meta()
if hasattr(self._param, "user_prompt") and self._param.user_prompt:
m["function"]["parameters"]["properties"]["user_prompt"] = self._param.user_prompt
# Keep the JSON schema valid; user_prompt is a string field, not a schema node.
m["function"]["parameters"]["properties"]["user_prompt"]["default"] = self._param.user_prompt
return m
def get_input_form(self) -> dict[str, dict]: