fix(runtime): batch thread detail item reads

Avoid an N+1 item-directory scan when loading runtime thread details by grouping persisted items for all turns in one pass.

Harvested from PR #3141.

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Hunter B
2026-06-12 02:35:39 -07:00
parent 2f717d3345
commit 119285f056
3 changed files with 142 additions and 6 deletions
+4
View File
@@ -53,6 +53,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Anthropic stream readers now accept both `data: {...}` and `data:{...}` SSE
frames, matching the spec and preventing providers that omit the optional
space from streaming empty output. Thanks @wgeeker for the PR.
- **Runtime thread detail N+1 reads (#3141).** `get_thread_detail` now scans
persisted turn items once and groups them by turn instead of reading the
items directory once per turn, preserving item order while keeping large
thread detail loads responsive.
- **SiliconFlow China provider config (#2893/#2895).** `siliconflow-CN`
now reads its own `[providers.siliconflow_cn]` / `[providers.siliconflow-CN]`
table and falls back to `[providers.siliconflow]` only for unset