Skip to content

feat: model name Filter#172

Open
aradhalevy wants to merge 6 commits into
llm-d:mainfrom
aradhalevy:model-name-filter
Open

feat: model name Filter#172
aradhalevy wants to merge 6 commits into
llm-d:mainfrom
aradhalevy:model-name-filter

Conversation

@aradhalevy

@aradhalevy aradhalevy commented Jun 17, 2026

Copy link
Copy Markdown

What type of PR is this?

What this PR does / why we need it:

Adds a model-name-filter that restricts the candidate models to the model name requested in the body.

The configured request-body fieldis read as a string:

  • a single model name → that model is the only candidate;
  • absent / empty string / "[]" → no constraint, all candidates pass through.

Which issue(s) this PR fixes:

Fixes #171

Release note (write NONE if no user-facing change):

NONE

Signed-off-by: Arad Halevy <arad.halevy@ibm.com>
Signed-off-by: Arad Halevy <arad.halevy@ibm.com>
@github-actions github-actions Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 17, 2026
Comment thread pkg/modelselector/model_selector_pipeline.go Outdated

@nirrozenbaum nirrozenbaum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not sure I understood the intention in this PR.
when a model is specified in the body, we shouldn't run model selector at all.
(when it is a single model).
this should be done by creating a profile picker that checks whether model is set in the body or not, and if model is already set, then select a profile without model selector.

regarding the use case of multiple models in an array alike value.. this is an invented syntax, no cli or client library for openai (or other formats) would work that way.

I would suggest to do some changes here:

  • if your intention is to restrict to a single model - that should be done using new ProfilePicker.
  • if your intention is to restrict to a subset of models, I'd be happy to get more details on this. assuming we have models a,b,c,d,e and this filter allows only b,c. then why do we need models a,d,e? will those ever be used? why are they deployed?
  • if it's still a valid case - I think it's legit to specify a subset of allowed models in a header, not inside the body. (same is done in epp btw, using subset header).

aradhalevy and others added 4 commits June 21, 2026 15:48
Signed-off-by: Arad Halevy <arad.halevy@ibm.com>
Signed-off-by: Arad Halevy <arad.halevy@ibm.com>
Signed-off-by: Arad Halevy <arad.halevy@ibm.com>
@aradhalevy aradhalevy marked this pull request as ready for review June 21, 2026 16:18
@aradhalevy

Copy link
Copy Markdown
Author

@nirrozenbaum Changed the Filter to allow Filter the model name exactly, else an empty field and then we let all the possible models work

@nirrozenbaum

Copy link
Copy Markdown
Collaborator

@nirrozenbaum Changed the Filter to allow Filter the model name exactly, else an empty field and then we let all the possible models work

@aradhalevy thanks. this looks better.
what are your thoughts about generalizing the filter to be called something like ByField, with configuration of fieldName and optionalValues?
This kind of filter would allow you to configure ByModel filter (from type ByField, with name ByModel) and would also allow a broader behavior.
e.g., (just as an example) - when a request is sent to an external anthropic model on bedrock, we would be able to filter models by their version (cause anthropic request specify a field "anthropic_version": "bedrock-2023-05-31").

wdyt?

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

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add a basic model name Filter

2 participants