Skip to content

feat(checks): accept model strings in set_default_generator - #2794

Merged
kevinmessiaen merged 4 commits into
mainfrom
cursor/set-default-generator-str-cf0b
Aug 26, 2026
Merged

feat(checks): accept model strings in set_default_generator#2794
kevinmessiaen merged 4 commits into
mainfrom
cursor/set-default-generator-str-cf0b

Conversation

@henchaves

@henchaves henchaves commented Aug 25, 2026

Copy link
Copy Markdown
Member

Description

set_default_generator now accepts a model identifier string as well as a BaseGenerator instance. A string is wrapped in giskard.agents.Generator, so the common case no longer needs a separate import:

from giskard.checks import set_default_generator

set_default_generator("azure/gpt-5.6-luna")

Passing a generator instance is unchanged, including identity:

from giskard.agents import Generator
from giskard.checks import set_default_generator

set_default_generator(Generator(model="azure/gpt-5.6-luna"))

The string is converted with the existing giskard.agents.Generator import. A lazy from giskard.agents.generators import Generator is not used because giskard-checks may only import that library from the package root.

Also regenerates THIRD_PARTY_NOTICES.md (boto3/botocore 1.43.78 → 1.43.79) so make check-notices matches current licensecheck output.

Related Issue

N/A — requested as an API convenience.

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

Coding agents

Autonomous agents with no human in the loop must read AUTONOMOUS.md before opening a PR.

PR title: agent-opened PRs must end the title with 🤖🤖🤖🤖 (exactly four robot emojis). Do not omit — that suffix is how the expedited agent PR workflow picks up the PR.

Checklist

  • I've read the CODE_OF_CONDUCT.md document.
  • I've read the CONTRIBUTING.md guide.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in NumPy format for all the methods and classes that I created or modified.
  • I've updated the uv.lock running uv lock (only applicable when pyproject.toml has been modified)
Open in Web Open in Cursor 

Allow set_default_generator to take a model identifier string and wrap it
in Generator, so callers no longer need a separate giskard.agents import
for the common case.

Co-authored-by: henrique <henrique@giskard.ai>
giskard-checks may only import giskard.agents from the package root, so
string overloads reuse the existing Generator import instead of
giskard.agents.generators.

Co-authored-by: henrique <henrique@giskard.ai>
@henchaves
henchaves marked this pull request as ready for review August 25, 2026 14:57
Sync THIRD_PARTY_NOTICES.md with make generate-notices so check-notices
matches the current licensecheck output.

Co-authored-by: henrique <henrique@giskard.ai>
@henchaves henchaves self-assigned this Aug 25, 2026
@kevinmessiaen kevinmessiaen changed the title feat(checks): accept model strings in set_default_generator 🤖🤖🤖🤖 feat(checks): accept model strings in set_default_generator Aug 26, 2026
Keep boto3/botocore 1.43.80 from main; the PR notices bump to 1.43.79 is superseded.

Co-authored-by: Kevin Messiaen <kevinmessiaen@users.noreply.github.com>
@kevinmessiaen
kevinmessiaen merged commit 90f3dad into main Aug 26, 2026
28 of 50 checks passed
@kevinmessiaen
kevinmessiaen deleted the cursor/set-default-generator-str-cf0b branch August 26, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants