Skip to content

feat: add Laya integration - #4023

Open
sjrl wants to merge 4 commits into
mainfrom
feat/laya-integration
Open

sjrl wants to merge 4 commits into
mainfrom
feat/laya-integration

Conversation

@sjrl

@sjrl sjrl commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Related Issues

Proposed Changes:

Adds laya-haystack with LayaDocumentClassifier, which uses the open-weight Laya decision model to answer typed questions (choice, score, noul) about each document in a single batched forward pass. The calibrated answers are stored in meta["laya"], keyed by question ID. The model loads on the first run().

How did you test it?

Unit tests, plus an integration test that runs the real model. Integration tests run in CI on Linux with Python 3.10 only, since each run downloads the model.

Notes for the reviewer

The docs-website page will follow in a separate PR.

After discussion with @julian-risch and @ju-gu offline we thought it would be a good idea to create an integration for these new types of decision models since Sol is actively using them for clients already. Depending on how the popularity of these models progress over time we can decide to archive this integration.

Checklist

@github-actions github-actions Bot added the type:documentation Improvements or additions to documentation label Sep 29, 2026
@socket-security

socket-security Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​laya@​0.3.2198100100100100

View full report

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report (laya)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/laya/src/haystack_integrations/components/classifiers/laya
  document_classifier.py
  integrations/laya/src/haystack_integrations/components/routers/laya
  text_router.py
Project Total  

This report was generated by python-coverage-comment-action

@sjrl sjrl changed the title feat: add Laya integration with LayaDocumentClassifier feat: add Laya integration Sep 29, 2026
@sjrl sjrl mentioned this pull request Sep 29, 2026
9 tasks
@sjrl
sjrl marked this pull request as ready for review September 29, 2026 11:21
@sjrl
sjrl requested a review from a team as a code owner September 29, 2026 11:21
@sjrl
sjrl requested review from anakin87 and removed request for a team September 29, 2026 11:21
@sjrl sjrl self-assigned this Sep 29, 2026
@sjrl
sjrl requested review from julian-risch and removed request for anakin87 September 29, 2026 11:32

This branch has not been deployed

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

Labels

integration:laya topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant