WeKnora/internal/models
ljl 2b31d3681b fix(embedding): prevent ants worker panic and mutex deadlock on empty/mismatched results
If the embedding provider returns an empty slice of vectors (e.g. length 0)
due to api mismatch or empty input, BatchEmbed will return length 0.
Accessing embedding[i] directly in BatchEmbedWithPool results in an out of bounds panic.
Because the panic occurs inside a mu.Lock() block, the mutex is never unlocked,
leading to a permanent deadlock of the document processing queue.

This fix checks the returned embeddings slice length and returns an error
instead of panicking, releasing the mutex properly.
2026-08-04 16:46:57 +08:00
..
asr fix(security): harden model client redirects 2026-07-02 19:15:46 +08:00
chat refactor(agent): introduce modelcontext registry and fix handle-codec bugs 2026-07-27 11:05:43 +08:00
embedding fix(embedding): prevent ants worker panic and mutex deadlock on empty/mismatched results 2026-08-04 16:46:57 +08:00
limiter feat(system): expose model concurrency stats on runtime queues dashboard 2026-07-11 07:17:28 +08:00
provider fix(rerank): batch Volcengine rerank requests over API document limit 2026-07-20 20:07:21 +08:00
rerank fix(rerank): normalize NVIDIA logit scores 2026-08-03 15:07:15 +08:00
utils feat: integrate ChatBot provider and docreader 2026-04-13 17:47:24 +08:00
vlm feat(system): expose model concurrency stats on runtime queues dashboard 2026-07-11 07:17:28 +08:00