WeKnora/internal/models/vlm
tayadwx db7046b85e
refactor(image): turn the hard-coded image flow into configurable pipelines (#3746)
* feat(image): configurable image pipelines, rebuilt on current main

Rebuilds the image-pipeline work on top of the current main, carrying
only the pipeline and request-side changes:

- The hard-coded image flow becomes registry-driven pipelines (default /
  smartocr), selectable per knowledge base, with a frontend panel and
  per-action thinking switches addressed as action-level keys
  (caption.thinking / ocr.thinking) declared once and carried into every
  pipeline.
- Request-side support: VLM.PredictWithOptions carries a per-call
  thinking switch through every implementation and decorator, including
  the background concurrency wrapper.
- OCR failure handling follows main's #4132 semantics: invalid output is
  rejected and recorded (ocr_status / ocr_error_code / .ocr subspan)
  without retrying the whole image; caption/observation failures get
  symmetric subspans instead of leaving the image span green.
- Permanent VLM failures skip the asynq retry budget; a run that
  produced nothing fails honestly instead of passing as skipped.
- UI and locale fixes travel with the panel.

Concurrency, rate limiting and circuit breaking are NOT part of this
branch: they stay with the existing system limiter.

* fix(image): address pipeline configuration and execution regressions

* fix(image): align pipeline overrides and validation semantics

* style(image): keep the new pipeline code inside the lll and gofumpt gates

---------

Co-authored-by: tayadwx <tayadwx@users.noreply.github.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-10-16 16:18:57 +08:00
..
concurrency_wrapper.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
config_from_model_test.go feat(models): support custom HTTP headers across all remote model calls 2026-04-23 23:36:40 +08:00
langfuse_wrapper.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
langfuse_wrapper_test.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
llm_debug.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
ollama.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
ollama_test.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
remote_api.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
remote_api_reasoning_test.go fix(ocr): reject invalid output and record extraction failures (#4132) 2026-10-10 17:45:18 +08:00
spec_override_test.go refactor(models): separate provider definitions, model catalogs, and runtime configuration (#3589) 2026-09-23 14:20:08 +08:00
transport.go fix(security): harden model client redirects 2026-07-02 19:15:46 +08:00
transport_security_test.go fix(security): harden model client redirects 2026-07-02 19:15:46 +08:00
vlm.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00
weknoracloud.go refactor(image): turn the hard-coded image flow into configurable pipelines (#3746) 2026-10-16 16:18:57 +08:00