deerflow2/tests/unit
Willem Jiang bab60e6e3d
fix(podcast): add fallback for models without json_object support (#747) (#785)
* fix(podcast): add fallback for models without json_object support (#747)

Models like Kimi K2 don't support response_format.type: json_object.
Add try-except to fall back to regular prompting with JSON parsing
when BadRequestError mentions json_object not supported.

- Add fallback to prompting + repair_json_output parsing
- Re-raise other BadRequestError types
- Add unit tests for script_writer_node with 100% coverage

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixes: the unit test error of test_script_writer_node.py

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-26 23:04:20 +08:00
..
agents fix(agents): patch _run in ToolInterceptor to ensure interrupt triggering (#753) 2025-12-10 22:15:08 +08:00
checkpoint fix(checkpoint): clear in-memory store after successful persistence (#751) 2025-12-09 23:32:13 +08:00
config feat: 1. replace black with ruff for fomatting and sort import (#489) 2025-08-17 22:57:23 +08:00
crawler feat: support infoquest (#708) 2025-12-02 08:16:35 +08:00
eval feat(eval): add report quality evaluation module and UI integration (#776) 2025-12-25 21:55:48 +08:00
graph feat: add analysis step type for non-code reasoning tasks (#677) (#723) 2025-11-29 09:46:55 +08:00
llms fix(llm): filter unexpected config keys to prevent LangChain warnings (#411) (#726) 2025-11-29 16:13:05 +08:00
podcast fix(podcast): add fallback for models without json_object support (#747) (#785) 2025-12-26 23:04:20 +08:00
prompt_enhancer Upgrade langchain version to 1.x (#720) 2025-11-28 22:09:13 +08:00
rag feat: Qdrant Vector Search Support (#684) 2025-11-11 19:35:00 +08:00
server test: add unit tests for global connection pool (Issue #778) (#780) 2025-12-23 23:06:39 +08:00
tools feat: add Serper search engine support (#762) 2025-12-15 23:04:26 +08:00
utils security: add log injection attack prevention with input sanitization (#667) 2025-10-27 20:57:23 +08:00