Skip to content

feat(#54): add support for gemini model wildcards#55

Merged
scastlara merged 1 commit into
mainfrom
gemini-regex
Jun 12, 2025
Merged

feat(#54): add support for gemini model wildcards#55
scastlara merged 1 commit into
mainfrom
gemini-regex

Conversation

@scastlara

@scastlara scastlara commented Jun 12, 2025

Copy link
Copy Markdown
Collaborator

closes #54

@scastlara

Copy link
Copy Markdown
Collaborator Author

/lgtm review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🦉 lgtm Review

Score: LGTM 👍

🔍 Summary

This PR introduces support for Gemini model wildcards, enabling users to specify models using patterns like gemini-2.5-flash-* to automatically select the latest available version. The implementation is well-structured, incorporating new utility functions (match_model_by_wildcard, select_latest_gemini_model) and robust error handling through custom exceptions. Comprehensive test cases are included, covering valid wildcard matches, exact model specifications, and scenarios involving invalid wildcard usage.

Overall, the code quality is high, and the feature is robustly implemented. A minor redundancy was identified in one of the utility functions, which can be easily refactored.

More information
  • Id: 4ca2437772fe444ebf4e59ea9a6f8334
  • Model: gemini-2.5-flash-preview-05-20
  • Created at: 2025-06-12T13:48:25.857269+00:00
Usage summary
Call 1
  • Request count: 1
  • Request tokens: 12512
  • Response tokens: 493
  • Total tokens: 26304
Call 2
  • Request count: 1
  • Request tokens: 7163
  • Response tokens: 447
  • Total tokens: 26234

Total tokens: 52538

See the 📚 lgtm-ai repository for more information about lgtm.

Comment thread src/lgtm_ai/ai/utils.py Outdated
@scastlara
scastlara force-pushed the gemini-regex branch 2 times, most recently from f3ffda6 to 0798f46 Compare June 12, 2025 13:51
@github-actions github-actions Bot added feature and removed feature labels Jun 12, 2025
Comment thread src/lgtm_ai/ai/utils.py
jbozanowski
jbozanowski previously approved these changes Jun 12, 2025
jbozanowski
jbozanowski previously approved these changes Jun 12, 2025
@scastlara
scastlara merged commit 138d066 into main Jun 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for selecting gemini model names with a wildcard

2 participants