WeKnora/internal/models/embedding
ordinary being 6dd0a6a3d6
fix(embedding): read the pool's first-error guard under its own mutex (#4014)
BatchEmbedWithPool fans a batch out over the ants pool, so with
BATCH_EMBED_SIZE=1 every text becomes its own sub-batch and several workers run
at once. Each worker starts by testing firstErr to see whether an earlier
sub-batch already failed, but that read was unsynchronised while the writes are
under mu. The race detector reports it between the guard and the failure branch.

The guard exists to stop billing a provider for work whose result will be
discarded. A worker that misses the write issues the request anyway, so the race
defeats the protection it was added for.
2026-10-16 17:42:51 +08:00
..
batch.go fix(embedding): read the pool's first-error guard under its own mutex (#4014) 2026-10-16 17:42:51 +08:00
batch_race_test.go fix(embedding): read the pool's first-error guard under its own mutex (#4014) 2026-10-16 17:42:51 +08:00
catalog_matrix_test.go refactor(models): separate provider definitions, model catalogs, and runtime configuration (#3589) 2026-09-23 14:20:08 +08:00
concurrency_wrapper.go feat: index and recall images with multimodal embedding models (#3683) 2026-10-08 18:19:53 +08:00
concurrency_wrapper_test.go feat(models): add max concurrency setting for background tasks 2026-07-09 20:40:51 +08:00
config_from_model_test.go Add embedding dimension override support 2026-06-15 19:18:19 +08:00
embedder.go feat: judge image hits by their image in rerank and show them to vision models (#4013) 2026-10-09 13:01:48 +08:00
image_wire_test.go perf(embedding): batch Qwen3-VL message inputs (#4126) 2026-10-10 16:07:29 +08:00
langfuse_wrapper.go feat: index and recall images with multimodal embedding models (#3683) 2026-10-08 18:19:53 +08:00
llm_debug.go feat: index and recall images with multimodal embedding models (#3683) 2026-10-08 18:19:53 +08:00
messages_batch_live_test.go perf(embedding): batch Qwen3-VL message inputs (#4126) 2026-10-10 16:07:29 +08:00
ollama.go Add embedding dimension override support 2026-06-15 19:18:19 +08:00
protocol.go feat: judge image hits by their image in rerank and show them to vision models (#4013) 2026-10-09 13:01:48 +08:00
protocol_test.go refactor(embedding): move the wire formats into protocol packages, and correct the vendor facts (#3500) 2026-09-21 11:55:38 +08:00
transport.go refactor(http): share SSRF-safe transport across model clients 2026-07-23 12:00:05 +08:00
transport_test.go refactor(embedding): move the wire formats into protocol packages, and correct the vendor facts (#3500) 2026-09-21 11:55:38 +08:00
wemm_test.go feat(models): add WeMM embedding presets and Transformers serving (#4238) 2026-10-13 17:22:24 +08:00
wire_test.go perf(embedding): batch Qwen3-VL message inputs (#4126) 2026-10-10 16:07:29 +08:00