Skip to content

Refactor detector clients to single DetectorClient #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

declark1
Copy link
Collaborator

@declark1 declark1 commented Jul 23, 2025

As we need to support models implementing multiple detector endpoints, e.g. Granite Guardian, we need to move to a single DetectorClient type as we cannot have more than one client per model. This also simplifies things as we ultimately didn’t need separate clients per detector endpoint.

Changes:

  • Drop traits that are no longer needed: DetectorClient, DetectorClientExt
  • Add DetectorClient implementation
  • Drop existing detector clients and implement their methods on DetectorClient
  • Update create_clients function to create DetectorClient for all detector types
  • Update detector client helper functions and tasks to use DetectorClient

@declark1 declark1 marked this pull request as ready for review July 23, 2025 21:43
Copy link
Collaborator

@mdevino mdevino left a comment

Choose a reason for hiding this comment

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

Thanks for the refactor. Changes are looking good, just left a few questions and a nit.

@mdevino mdevino mentioned this pull request Jul 24, 2025
declark1 and others added 2 commits July 24, 2025 09:23
Co-authored-by: Mateus Devino <[email protected]>
Signed-off-by: Dan Clark <[email protected]>
Copy link
Collaborator

@mdevino mdevino left a comment

Choose a reason for hiding this comment

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

LGTM!

@mdevino mdevino merged commit 528086b into foundation-model-stack:main Jul 24, 2025
2 checks passed
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