Skip to content

fix(compression): preserve case, tags and negations through llmlingua engine - #13768

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
lorenzozanee:restore/pr-13728
Sep 16, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
lorenzozanee:restore/pr-13728

Conversation

@lorenzozanee

Copy link
Copy Markdown
Contributor

Summary

  • The llmlingua engine shields XML tags and negation/absolute words from the uncased default backend, restores source casing and edge whitespace on re-stitch, and fail-opens on empty replies.

Related Issues

Validation

  • Change type: other (compression engine)
  • Focused tests and category gates from the golden path
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/compression/llmlingua-fidelity.test.ts (new, 6 tests)
  • Related existing suites re-run: llmlingua-failopen, llmlingua-ultra-entry, llmlingua-worker, llmlingua-model-store, llmlingua-worker-resolution — all green locally.

Coverage Notes

  • Change touches open-sse/; covered by the new fidelity tests plus the related llmlingua suites above.

Reviewer Notes

  • The negation wordlist is heuristic; reviewers may ask for it to become an engine option.
  • Local validation only; CI runs on this PR.

Supersedes #13728(原PR分支已删,按原提交重建)及关联issue说明
Closes #13455 (原PR关联issue,状态:open)

@diegosouzapw
diegosouzapw merged commit 9ce4385 into diegosouzapw:release/v3.8.51 Sep 16, 2026
3 checks passed
rqzbeh added a commit to rqzbeh/OmniRoute that referenced this pull request Sep 18, 2026
… inference

- Add real installer for @atjsh/llmlingua-2 with peer dependencies (@huggingface/transformers, js-tiktoken) in src/lib/services/installers/llmlingua.ts
- Implement lazy-loaded TinyBERT ONNX model inference on port 20135
- Integrate httpSidecarBackend in open-sse/services/compression/engines/llmlingua/index.ts with strict length validation and fallback to workerBackend, preserving upstream diegosouzapw#13768 prompt protections
- Fix duplicate LLMLINGUA_PORT declaration in src/lib/services/bootstrap.ts and ensure coexistence with openwa
- Register 8 LOCAL_ONLY lifecycle endpoints under /api/services/llmlingua/*
- Add dashboard tab LlmlinguaServiceTab in src/app/(dashboard)/dashboard/providers/services/
- Register migration slot 183 (183_llmlingua_service.sql)
- Wire test:services:int into package.json and scripts/check/check-test-discovery.mjs, reducing frozen orphans in test-discovery-baseline.json from 10 to 6
- Document all environment variables, openapi specs, and architecture references

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
rqzbeh added a commit to rqzbeh/OmniRoute that referenced this pull request Sep 19, 2026
… inference

- Add real installer for @atjsh/llmlingua-2 with peer dependencies (@huggingface/transformers, js-tiktoken) in src/lib/services/installers/llmlingua.ts
- Implement lazy-loaded TinyBERT ONNX model inference on port 20135
- Integrate httpSidecarBackend in open-sse/services/compression/engines/llmlingua/index.ts with strict length validation and fallback to workerBackend, preserving upstream diegosouzapw#13768 prompt protections
- Fix duplicate LLMLINGUA_PORT declaration in src/lib/services/bootstrap.ts and ensure coexistence with openwa
- Register 8 LOCAL_ONLY lifecycle endpoints under /api/services/llmlingua/*
- Add dashboard tab LlmlinguaServiceTab in src/app/(dashboard)/dashboard/providers/services/
- Register migration slot 183 (183_llmlingua_service.sql)
- Wire test:services:int into package.json and scripts/check/check-test-discovery.mjs, reducing frozen orphans in test-discovery-baseline.json from 10 to 6
- Document all environment variables, openapi specs, and architecture references

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
rqzbeh added a commit to rqzbeh/OmniRoute that referenced this pull request Sep 19, 2026
… inference

- Add real installer for @atjsh/llmlingua-2 with peer dependencies (@huggingface/transformers, js-tiktoken) in src/lib/services/installers/llmlingua.ts
- Implement lazy-loaded TinyBERT ONNX model inference on port 20135
- Integrate httpSidecarBackend in open-sse/services/compression/engines/llmlingua/index.ts with strict length validation and fallback to workerBackend, preserving upstream diegosouzapw#13768 prompt protections
- Fix duplicate LLMLINGUA_PORT declaration in src/lib/services/bootstrap.ts and ensure coexistence with openwa
- Register 8 LOCAL_ONLY lifecycle endpoints under /api/services/llmlingua/*
- Add dashboard tab LlmlinguaServiceTab in src/app/(dashboard)/dashboard/providers/services/
- Register migration slot 183 (183_llmlingua_service.sql)
- Wire test:services:int into package.json and scripts/check/check-test-discovery.mjs, reducing frozen orphans in test-discovery-baseline.json from 10 to 6
- Document all environment variables, openapi specs, and architecture references

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… engine (diegosouzapw#13768)

Merged. Shielding XML tags and negation/absolute words from an uncased backend, restoring source casing and edge whitespace on re-stitch, and failing open on an empty reply are each the difference between "compressed" and "changed the meaning". The 6 fidelity tests make the negation list something a future reviewer can argue with in code instead of in the abstract.

Validated as a combined board first (this PR merged with the 21 siblings of the same wave on the release tip): eslint with the frozen suppressions, typecheck:core, check:open-sse-typecheck, complexity, cognitive-complexity, changelog-integrity, i18n new-key coverage, docs-counts, docs-sync, migration-numbering, provider-consistency and a duplicate-identifier audit all green, plus 176 passing / 0 failing focused node:test cases across the 25 test files the wave touches and the dashboard test under Vitest (2/0). Then re-validated alone on the fresh tip before this merge: conflicts re-resolved, file sizes rebaselined for this PR's own growth, eslint and this PR's focused tests re-run.

Thank you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(backend): compression: llmlingua default TinyBERT model lower-cases output, drops negations and breaks tags/whitespace

2 participants