[Python] Add warning when toolChoice not supported in ModelInfo

Open Beginner friendly
#4,341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
ai

Research direction

Start in py/packages/genkit/src/genkit/blocks/generate.py at line 653 and inspect how toolChoice and ModelInfo are handled. Add an informative runtime warning when toolChoice is passed without model support, then run the relevant Python tests for generate.py and confirm the warning explains the unsupported configuration and next action.

Written by the indexing model from the issue text.

Description

python

Description

Should add a warning when toolChoice is used but not supported by the model.

Location

  • File: py/packages/genkit/src/genkit/blocks/generate.py
  • Line: 653
  • Current code: # TODO: add warning when toolChoice is not supported in ModelInfo

Acceptance Criteria

  • Add runtime warning when toolChoice is passed but ModelInfo indicates no support
  • Ensure warning is informative and actionable
Dominant language
TypeScript
Stars
6.5k
Forks
845
Avg merge
3d 22h
Merged PRs (30d)
56

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from genkit-ai/genkit

All issues in genkit-ai/genkit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.