dify/api/core/agent
Yansong Zhang 3d4be88d97 fix(api): remove unsupported 'user' param from FC/ReAct invoke_llm calls
FunctionCallStrategy and ReActStrategy were passing user=self.context.user_id
to ModelInstance.invoke_llm() which doesn't accept that parameter.
This caused tool-using agent runs to fail with:
  "ModelInstance.invoke_llm() got an unexpected keyword argument 'user'"

Verified: Agent V2 with current_time tool now works end-to-end:
  ROUND 1: LLM thought -> CALL current_time -> got time
  ROUND 2: LLM generates answer with time info
Made-with: Cursor
2026-04-09 12:18:07 +08:00
..
output_parser refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
patterns fix(api): remove unsupported 'user' param from FC/ReAct invoke_llm calls 2026-04-09 12:18:07 +08:00
prompt Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
strategy chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
agent_app_runner.py feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
base_agent_runner.py refactor: core/tools, agent, callback_handler, encrypter, llm_generator, plugin, inner_api (#34205) 2026-03-28 10:14:43 +00:00
cot_agent_runner.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
cot_chat_agent_runner.py refactor(api): clean up AssistantPromptMessage typing in CotChatAgentRunner (#34681) 2026-04-07 22:53:14 +00:00
cot_completion_agent_runner.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
entities.py feat(api): add Agent V2 node and new Agent app type (Phase 1-3) 2026-04-08 12:31:23 +08:00
errors.py refactor(workflow): move agent node back to core workflow (#33431) 2026-03-14 22:33:13 +08:00
fc_agent_runner.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
plugin_entities.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00