Skip to content

Add whichmodel-haystack integration — cost-aware LLM model selection#468

Open
simonamsharp wants to merge 2 commits intodeepset-ai:mainfrom
simonamsharp:add-whichmodel-integration
Open

Add whichmodel-haystack integration — cost-aware LLM model selection#468
simonamsharp wants to merge 2 commits intodeepset-ai:mainfrom
simonamsharp:add-whichmodel-integration

Conversation

@simonamsharp
Copy link
Copy Markdown

Summary

Adds the whichmodel-haystack integration listing for the WhichModel custom component.

The WhichModelRouter component calls the WhichModel MCP recommendation engine to select the most cost-effective LLM for a given task type and complexity — before routing to a generator. No API key required; it calls the public endpoint.

Key features:

  • Dynamic model selection based on task type, complexity, token estimates, and budget cap
  • Returns model_id, provider, confidence, full recommendation, alternative, and budget model
  • Serialisable via to_dict/from_dict for pipeline persistence
  • 12 tests passing, Apache-2.0 licensed

Checklist

  • PyPI package published and tested
  • Tests pass (pytest tests/ -v)
  • README with usage examples in the package
  • Integration listing follows the draft-integration.md format

simonamsharp and others added 2 commits April 20, 2026 08:42
Adds the WhichModel integration listing for whichmodel-haystack 0.1.0,
a custom component that provides cost-aware LLM model selection via the
WhichModel MCP recommendation engine.

PyPI: https://pypi.org/project/whichmodel-haystack/

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new integration listing for whichmodel-haystack, a Haystack custom component that selects an LLM via the public WhichModel recommendation service before downstream generation.

Changes:

  • Adds integrations/whichmodel.md with front matter, overview, installation, and usage examples.
  • Documents WhichModelRouter inputs and outputs for cost-aware model selection.
  • Links the listing to the published PyPI package and source repository.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +22
### **Table of Contents**

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usage)

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.

2 participants