deerflow2/backend/packages/harness/deerflow/agents
Xinmin Zeng ad6d934a5f
fix(middleware): handle string-serialized options in ClarificationMiddleware (#1997)
* fix(middleware): handle string-serialized options in ClarificationMiddleware (#1995)

Some models (e.g. Qwen3-Max) serialize array tool parameters as JSON
strings instead of native arrays. Add defensive type checking in
_format_clarification_message() to deserialize string options before
iteration, preventing per-character rendering.

* fix(middleware): normalize options after JSON deserialization

Address Copilot review feedback:
- Add post-deserialization normalization so options is always a list
  (handles json.loads returning a scalar string, dict, or None)
- Add test for JSON-encoded scalar string ("development")
- Fix test_json_string_with_mixed_types to use actual mixed types
2026-04-08 21:04:20 +08:00
..
checkpointer Move async SQLite mkdir off the event loop (#1921) 2026-04-07 10:47:20 +08:00
lead_agent fix(skill): make skill prompt cache refresh nonblocking (#1924) 2026-04-07 10:50:34 +08:00
memory fix(backend): use timezone-aware UTC in memory modules (fix pytest DeprecationWarnings) (#1992) 2026-04-08 16:28:00 +08:00
middlewares fix(middleware): handle string-serialized options in ClarificationMiddleware (#1997) 2026-04-08 21:04:20 +08:00
__init__.py fix(skill): make skill prompt cache refresh nonblocking (#1924) 2026-04-07 10:50:34 +08:00
factory.py style: format unformatted files and add .omc/ to prettierignore (#1539) 2026-03-29 16:45:31 +08:00
features.py feat: add create_deerflow_agent SDK entry point (Phase 1) (#1203) 2026-03-29 15:31:18 +08:00
thread_state.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00