New integration: Nace Drex decision models (nace-haystack)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading CONTRIBUTING.md#create-a-new-integration and inspect the repository’s integration scaffolding and the existing TypeSafe integration, which the issue identifies as a comparable implementation. The proposal describes four components, async and sync APIs, serialization, image handling, evaluators, and CI; use those requirements to scope the work. Done means the integration and checklist items are complete, including tests, documentation, packaging, and repository inventory updates.
Written by the indexing model from the issue text.
Description
Summary and motivation
Drex is a family of decision models from Nace. Instead of generating text, a Drex model answers typed questions about a text, JSON or images in one request and returns calibrated probabilities:
choice: one label from a setscore: ordered levelsnoul: P(yes) for a yes/no statement
That's a good fit for Haystack's routing, metadata enrichment and evaluation, where today you use ConditionalRouter rules, local zero-shot models, or an LLM judge that returns a sampled label.
nace-haystack adds four components:
NaceTextRouter: one output per label, an optionallow_confidencefallback and an optionalprobabilitiesoutput. It also routes images on Drex Max.NaceDocumentClassifier: answers several typed questions per document in one request and stores the answers inDocument.meta.NaceFaithfulnessEvaluatorandNaceContextRelevanceEvaluator: the same inputs and outputs as Haystack's built-inFaithfulnessEvaluatorandContextRelevanceEvaluator, with the score being Drex's probability.
The package is already published and maintained by Nace: https://pypi.org/project/nace-haystack/ (Apache-2.0), source at https://github.com/nace-ai/nace-haystack. It follows the core-integrations layout (haystack_integrations namespace, hatch, test:unit / test:integration / test:types, pydoc config), so moving it here is mostly a copy.
Adoption signals
- GitHub stars of the main repository:
nace-ai/nace-haystackhas 1. It was made public on 2026-10-30. - PyPI downloads in the last 30 days (pypistats.org):
nace-sdk, the Python client this integration builds on: 2,074. It was first released on 2026-10-08.nace-haystack: 85 on its first day (0.1.0 was released on 2026-10-29).
- Release activity: new Drex models ship every one to two weeks (v1.5 on 2026-09-28, v2.0 on 2026-10-06, Max on 2026-10-13, Max v1.1 on 2026-10-28).
nace-sdkhas had 6 releases since 2026-10-08, the latest (0.6.2) on 2026-10-30. This integration is released with them. - Maintenance: maintained by Nace AI. The integration has unit tests on Python 3.11–3.15 on Linux, plus 3.11 and 3.15 on Windows and macOS, and nightly live tests against the production API.
- Haystack community demand: none to link yet. Drex is four weeks old.
- Anything else:
- Model usage: Drex is served on OpenRouter's decisions leaderboard. In the week of 2026-10-28 it handled roughly 39M requests: Drex v2.0 about 16.5M, Drex v1.5 about 16.2M, Drex Max about 6.1M.
- Open weights on Hugging Face:
nace-ai/drex-v1.5(842 downloads, 53 likes) andnace-ai/drex-v2.0(325 downloads, 19 likes, plus GGUF builds). - Other frameworks: Nace also maintains
langchain-nacefor LangChain. - Comparable integrations: decision models are a new category. TypeSafe's Jev is already here as
typesafe-haystack(763 downloads in the last 30 days). Drex is wire-compatible with Jev's System One API, andnace-haystackmirrorsTypeSafeTextRouterandTypeSafeDocumentClassifier, so a Jev pipeline switches with three edits. - Why not just point
typesafe-haystackat Drex? Text routing and classification do work that way.nace-haystackadds what that can't:- image input on Drex Max (screenshots, scanned documents), with automatic downscaling to the request limit and uploaded-file references;
- the two evaluators;
- an opt-in
probabilitiesoutput on the router; - an OpenRouter backend;
- Drex-specific error messages.
The numbers are small because Drex is new: the first model shipped on 2026-09-28. We expect them to grow with each model release.
Detailed design
- Import paths:
haystack_integrations.components.routers.nace→NaceTextRouterhaystack_integrations.components.classifiers.nace→NaceDocumentClassifierhaystack_integrations.components.evaluators.nace→NaceFaithfulnessEvaluator,NaceContextRelevanceEvaluator
- Built on
nace-sdk(NaceClient/AsyncNaceClient).api_key: Secretdefaults toNACE_API_KEY, andapi_base_urldefaults toNACE_BASE_URL. - The default
NACE_API_KEYis only ever sent to Nace's HTTPS production API. Any other host, OpenRouter included, needs an explicitapi_key. A saved pipeline keeps its destination, empty keys are refused, and cross-origin redirects are refused. - Every component has
runandrun_async,warm_up/warm_up_asyncandclose/close_async, and fullto_dict/from_dictsupport, including YAML. modeldefaults to the newest Drex model (drex-max-v1.1). Any model ID is sent as given: there's no model enum, so new Drex models work without a release.- The classifier and evaluators run up to
max_workersrequests in parallel and honourraise_on_failure. Failed documents go tofailed_documentswithmeta["classification_error"]; failed evaluator items score NaN. Missing answers and invalid probabilities count as failures. - Retries on 429/529 honour
retry-after-ms. Errors keep nace-sdk's exception classes and carry readable messages. - Corner cases covered by tests:
- images on a text-only model are refused before sending;
- images over the 4 MiB request limit are shrunk, with EXIF rotation and 16-bit grayscale handled;
- reserved output names are refused;
- a new event loop gets a new async client;
- after a failure, queued batch requests are not sent.
- Usage examples: README, an example support-email pipeline and a notebook.
Checklist
If the request is accepted, ensure the following checklist is complete before closing this issue.
Follow the instructions in https://github.com/deepset-ai/haystack-core-integrations/blob/main/CONTRIBUTING.md#create-a-new-integration and use our scaffolding script for the implementation.
Tasks
- The code is documented with docstrings and was merged in the
mainbranch - Docs are published at https://docs.haystack.deepset.ai/
- There is a Github workflow running the tests for the integration nightly and at every PR
- A new label named like
integration:<your integration name>has been added to the list of labels for this repository - The labeler.yml file has been updated
- The package has been released on PyPI
- An integration tile with a usage example has been added to https://github.com/deepset-ai/haystack-integrations
- The integration has been listed in the Inventory section of this repo README
- The feature was announced through social media
- Dominant language
- Python
- Stars
- 212
- Forks
- 396
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 95
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deepset-ai/haystack-core-integrations
-
integration:qdrant P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepset-ai/haystack-core-integrations#4228 · 4 comments ·
Maintainers usually reply within 1 day
-
Qdrant: `in` filter with an empty list matches all documents (delete_by_filter deletes everything)Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
deepset-ai/haystack-core-integrations#4334 ·
Maintainers usually reply within 1 day
-
FAISS: filtered search misses matching documents outside the first top_k * 10 neighboursPossibly taken @davidsbatista claimed this 2 days ago. Open
deepset-ai/haystack-core-integrations#4322 · 1 assignee ·
Maintainers usually reply within 1 day
-
Add Late Interaction Qdrant RetrieverPossibly taken @anakin87 claimed this 6 days ago. Open
deepset-ai/haystack-core-integrations#4307 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Ollama - `OllamaChatGenerator` returns `finish_reason=None` when output is truncated (`done_reason="length"`)Possibly taken @davidsbatista claimed this 6 days ago. Open
deepset-ai/haystack-core-integrations#4302 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in deepset-ai/haystack-core-integrations
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
micronaut-projects/micronaut-core#14585 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
langgenius/graphon#443 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
[BUG]: Management endpoints /v1/memory/stats and /v1/memory/counts bypass API key authenticationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
docling-project/docling-serve#788 ·
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
opensearch-project/cross-cluster-replication#1805 ·
Maintainers usually reply within 1 day