Add support for new Gemini models.#1355
Conversation
Drops preview label from Gemini 2.5 Flash and Gemini 2.5 Pro, and adds support for Gemini 2.5 Flash Lite Preview.
There was a problem hiding this comment.
Pull Request Overview
This PR updates the GeminiModels enum to remove explicit “preview” versions for Flash and Pro, alias those preview constants to the stable models, and adds support for a new Flash Lite preview.
- Replace
-preview-<date>constants for Gemini 2.5 Flash and Pro with stable model constants and alias old preview names. - Introduce
GEMINI_2_5_FLASH_LITE_PREVIEWfor the new Gemini 2.5 Flash Lite Preview.
Comments suppressed due to low confidence (2)
lib/sycamore/sycamore/llms/config.py:66
- The new
GEMINI_2_5_FLASH_LITE_PREVIEWmodel should be added to your unit tests to verify it resolves correctly and prevent future regressions.
GEMINI_2_5_FLASH_LITE_PREVIEW = GeminiModel(name="gemini-2.5-flash-lite-preview-06-17", is_chat=True)
lib/sycamore/sycamore/llms/config.py:60
- [nitpick] Since the version date suffix has been dropped for Flash, consider updating the enum class docstring or adding an inline comment to explain that the unversioned model name now points to the latest release.
GEMINI_2_5_FLASH = GeminiModel(name="gemini-2.5-flash", is_chat=True)
| GEMINI_2_5_FLASH_PREVIEW = GeminiModel(name="gemini-2.5-flash-preview-05-20", is_chat=True) | ||
| GEMINI_2_5_PRO_PREVIEW = GeminiModel(name="gemini-2.5-pro-preview-05-06", is_chat=True) | ||
| GEMINI_2_5_FLASH = GeminiModel(name="gemini-2.5-flash", is_chat=True) | ||
| GEMINI_2_5_FLASH_PREVIEW = GEMINI_2_5_FLASH # Alias for the preview model |
There was a problem hiding this comment.
[nitpick] Aliasing the preview constant to the stable Flash model may be confusing. Consider either removing the alias and using the stable constant directly or enhancing the enum’s docstring to explain that preview now defaults to the stable endpoint.
| GEMINI_2_5_FLASH_PREVIEW = GEMINI_2_5_FLASH # Alias for the preview model | ||
|
|
||
| GEMINI_2_5_PRO = GeminiModel(name="gemini-2.5-pro", is_chat=True) | ||
| GEMINI_2_5_PRO_PREVIEW = GEMINI_2_5_PRO # Alias for the preview model |
There was a problem hiding this comment.
[nitpick] Similar to Flash, the Pro preview is aliased to the stable Pro model. This might obscure intent; update documentation or remove the alias to maintain clarity.
| GEMINI_2_5_PRO_PREVIEW = GEMINI_2_5_PRO # Alias for the preview model | |
| GEMINI_2_5_PRO_PREVIEW = GeminiModel(name="gemini-2.5-pro-preview", is_chat=True) # Explicitly define the preview model |
Drops preview label from Gemini 2.5 Flash and Gemini 2.5 Pro, and adds support for Gemini 2.5 Flash Lite Preview.