L1nSn0w
dd7be50645
docs(llm): trim first-token timeout comments to the essentials
...
Keep only the non-obvious constraints (unit contract, daemon no-keep-alive
assumption, ContextVar fail-open threading, replace-not-narrow intent) and
cut prose that restates the code. The module docstring in
first_token_timeout.py stays the single canonical description of the path.
2026-07-17 11:18:31 +08:00
L1nSn0w
8f1504bf95
chore(llm): improve timeout observability and pin the graphon transform contract
...
Name the configured window in the mid-stream stall message so a read
timeout after the first token is traceable to first_token_timeout_ms; log
invalid values ignored at the pop point; state honestly in _read_timeout_for
that the budget replaces (not narrows) the operator read timeout; pin with a
test that FirstTokenTimeoutError passes graphon's _transform_invoke_error
unchanged, and cover the converter's defensive drop.
2026-07-17 11:18:31 +08:00
L1nSn0w
d865d3d703
refactor(llm): switch first-token timeout config to milliseconds
...
Rename the completion_params key to first_token_timeout_ms so the unit is
explicit in the DSL, and lower the default from 60s to 10s with a 100ms-10min
range: users who enable this gate are latency-sensitive, and 60s rarely
matches that intent. The ms->s conversion happens exactly once, at the pop
point in _normalize_completion_params; everything downstream (ModelInstance
field, ContextVar, httpx read timeout) stays in seconds.
2026-07-17 11:18:31 +08:00
L1nSn0w
de11f571b8
feat(llm): source first-token timeout from completion_params
...
The timeout travels the same channel as stop: configured per model in
completion_params.first_token_timeout (seconds), popped at the workflow
model-config boundary (_normalize_completion_params) into
ModelInstance.first_token_timeout, and read by DifyPreparedLLM to arm the
transport ContextVar around invoke_llm and invoke_llm_with_structured_output.
Invalid values (non-numeric, bool, non-positive) disable the gate.
Covers workflow and chatflow LLM-compatible nodes (llm, question classifier,
parameter extractor). The easy-UI model config converter drops the key
defensively so imported app configs never forward it to providers. No graphon
changes are required: the popped key never reaches graphon, and its retry
handler treats FirstTokenTimeoutError like any node failure.
2026-07-17 11:18:31 +08:00
L1nSn0w
d77df0b0a4
feat(llm): enforce first-token timeout in the plugin transport
...
The timeout is carried to the plugin-daemon transport through a ContextVar
(core.plugin.impl.first_token_timeout) and applied as httpx's per-request
read timeout in BasePluginClient._stream_request. The daemon withholds the
response headers until the model's first token, so the read timeout measures
time-to-first-token directly; a ReadTimeout before the first line surfaces as
FirstTokenTimeoutError (dify-local, subclassing graphon's InvokeError), while
a later stall stays a plain transport error. A non-positive budget disables
the gate.
2026-07-17 11:18:31 +08:00
非法操作 and GitHub
61b07ab17d
feat: default plugins for new user ( #39167 )
2026-07-17 02:49:58 +00:00
9de7e0fe44
perf(workflow-generator): parallelize node config generation ( #38975 )
...
Co-authored-by: Claude Fable 5 <noreply@anthropic.com >
2026-07-17 02:34:15 +00:00
1aea3460af
test: use sqlite3 session in test_customized_retrieval ( #38741 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 14:09:40 +00:00
33fe0dfd60
test: use sqlite3 session in test_human_input_form ( #38780 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 13:17:50 +00:00
Asuka Minato and GitHub
a8ffc93a5a
test: move plugin parameter service coverage to unit tests ( #38934 )
2026-07-16 13:06:04 +00:00
Asuka Minato and GitHub
14ac8dfbf6
test: use sqlite3 session in test_passport ( #38763 )
2026-07-16 12:59:52 +00:00
Asuka Minato and GitHub
b820ccf086
test: use sqlite3 session in test_tool_label_manager ( #38762 )
2026-07-16 12:56:08 +00:00
Asuka Minato and GitHub
415c0db22e
test: use sqlite3 session in test_tool_providers ( #38754 )
2026-07-16 12:28:26 +00:00
Asuka Minato and GitHub
6ad1a66a50
test: use sqlite3 session in test_remote_retrieval ( #38737 )
2026-07-16 10:56:00 +00:00
Asuka Minato and GitHub
2f2d7c26d4
test: use sqlite3 session in test_api ( #38736 )
2026-07-16 10:38:33 +00:00
e9c0e9de9e
test: use SQLite sessions in tasks ( #39117 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 10:17:26 +00:00
林玮 (Jade Lin) and GitHub
678ce2ab37
refactor(api): pass tenant_id explicitly to workflow repositories ( #39042 )
2026-07-16 09:36:30 +00:00
b737833e2a
test: use SQLite sessions in services core ( #39112 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 09:32:11 +00:00
872b6906f2
test: use SQLite sessions in core workflow ( #39110 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 09:18:55 +00:00
zyssyz123 and GitHub
cd98193234
fix(agent): import workflow agents as inline ( #39135 )
2026-07-16 08:28:34 +00:00
4381ec8fee
fix(agent): accept legacy missing asset placeholders ( #39039 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 03:11:08 +00:00
cb41fb3e76
fix(api): serialize trial workflow conversation variables ( #39038 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 02:57:06 +00:00
wangxiaolei and GitHub
7dfd84472f
fix: fix miss create rbac binding ( #39023 )
2026-07-16 02:25:42 +00:00
85cc183501
feat: improve ai-credits display ( #38589 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-16 01:51:46 +00:00
79662d49af
fix(agent): aggregate monitor sources by workflow app ( #39021 )
...
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com >
2026-07-15 14:08:57 +00:00
73c3048599
fix(agent): preserve DSL asset placeholders and count draft references ( #39015 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 11:49:11 +00:00
WH-2099 and GitHub
6a511da325
fix(api): bind scoped lookups to nested owner refs ( #38470 )
2026-07-15 09:31:09 +00:00
d914ece3fb
fix: fix conversation title is overwrite empty ( #39004 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 08:24:11 +00:00
Xin Zhang and GitHub
120c38bad8
feat(enterprise): reject member invites that would exceed licensed seats ( #38995 )
2026-07-15 07:59:16 +00:00
ab3e4daa95
refactor: explicit DB session propagation across backend paths ( #38559 )
...
Co-authored-by: WH-2099 <wh2099@pm.me >
2026-07-15 06:48:28 +00:00
2c1313d13a
feat: redis support keepalive and retry more error ( #38973 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 06:20:19 +00:00
林玮 (Jade Lin) and GitHub
edca982b1e
fix(api): harden trial apps access for recommended apps ( #38970 )
2026-07-15 06:04:07 +00:00
7dc3126ff4
fix: preserve and display workflow retry details ( #38854 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 05:58:37 +00:00
c17a0f4e18
test: move feedback service coverage to unit tests ( #38927 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 05:42:12 +00:00
Asuka Minato and GitHub
15acaf1fa6
test: use sqlite3 session in test_provider_configuration ( #38689 )
2026-07-15 04:54:49 +00:00
3afd81a028
test: move MCP controller coverage to unit tests ( #38930 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 04:40:34 +00:00
fbd6e04810
test: move console app API coverage to unit tests ( #38915 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 04:40:15 +00:00
c277f48084
test: move email registration coverage to unit tests ( #38928 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 04:05:59 +00:00
70462d96bd
test: move RAG pipeline controller coverage to unit tests ( #38939 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 03:59:57 +00:00
Asuka Minato and GitHub
22429d275a
test: move console forgot-password coverage to unit tests ( #38922 )
2026-07-15 03:56:41 +00:00
0c15a71cc4
test: move API key authentication coverage to unit tests ( #38919 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 03:52:20 +00:00
557d92735d
test: move account deletion sync coverage to unit tests ( #38917 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 03:47:55 +00:00
Asuka Minato and GitHub
65e676b880
test: move recommendation database retrieval coverage to unit tests ( #38921 )
2026-07-15 03:44:36 +00:00
Asuka Minato and GitHub
c77c06c1e9
test: move hit testing service coverage to unit tests ( #38925 )
2026-07-15 03:37:16 +00:00
Asuka Minato and GitHub
571e50175e
test: move RAG pipeline dataset coverage to unit tests ( #38933 )
2026-07-15 03:26:34 +00:00
a4b64d1fd7
test: move tool provider controller coverage to unit tests ( #38944 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 03:12:43 +00:00
7d20b8cc1b
test: use sqlite3 session in test_audio_service ( #38768 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 03:01:34 +00:00
d1d2cfbdba
test: move plugin service coverage to unit tests ( #38935 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 02:32:23 +00:00
f86bfb2a31
feat(agent): support new Agent DSL import and export ( #38849 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 02:02:14 +00:00
非法操作 and GitHub
38aec8b506
chore: chatflow api should check workflow_id and sandbox plan ( #38892 )
2026-07-15 02:01:53 +00:00