Skip to content

Conversation

@0xlakshan
Copy link
Contributor

@0xlakshan 0xlakshan commented Nov 14, 2025

Background

All Gemini Model 1 series have been deprecated and are no longer supported by Gemini. I'm removing obsolete functionalities, introducing a convenient way to check model tool capabilities, and updating all e2e tests, unit tests, chat options, examples, and documentation with the recommended replacements.

Summary

  • Removing obsolete functionalities
  • Convenient way to check model tool capabilities
  • Removing deprecated model IDs
  • Introduce a convenient way to check model tool capabilities. (as Gemini has so many models)
  • Workaround for msw route collision issue
  • Update Examples
  • Tests
  • Docs

Convenient way to check model tool capabilities

Google releases base models gemini-2.5-flash-lite gemini-2.5-pro along with various sub-model variants gemini-2.0-flash-lite-001 gemini-2.0-flash-exp. Each model offers different tool-calling capabilities.

Since the docs explicitly define tool support the base models, I decided to maintain a set of unsupported models check the model IDs against it to determine the tool support.

Tool support - https://ai.google.dev/gemini-api/docs/models

/**
* Returns `true` if the tool is supported, `false` if it is unsupported.
*/
export function IsToolSupported(
tool: ToolUnsupportedModelGroup,
toolName: GoogleGenerativeAIModelId,
): boolean {
return !(tool as readonly string[]).includes(toolName);
}

if (IsToolSupported(FILE_SEARCH_UNSUPPORTED_MODELS, modelId)) {
googleTools.push({ fileSearch: { ...tool.args } });
} else {
toolWarnings.push({
type: 'unsupported',
feature: `provider-defined tool ${tool.id}`,
details: `The file search tool is not supported on the following models: ${getUnsupportedModelsString(FILE_SEARCH_UNSUPPORTED_MODELS)}. Current model: ${modelId}`,
});
}

Relevant Links

Tool support - https://ai.google.dev/gemini-api/docs/models
Deprecated base models - https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/model-versions#retired-models
Deprecated base models & sub model variants - https://ai.google.dev/gemini-api/docs/changelog

@dancer dancer self-assigned this Nov 18, 2025
@dancer dancer self-requested a review November 18, 2025 19:14
@dancer
Copy link
Collaborator

dancer commented Nov 18, 2025

thank you for this pr please give me a ping whenever this is done! appreciate it a bunch @0xlakshan

@dancer dancer assigned 0xlakshan and dancer and unassigned dancer Nov 18, 2025
@theg1239
Copy link

Due to the introduction of Gemini 3.0 Pro, it would make sense to have that in place of the Gemini 2.5 Pro references

@0xlakshan 0xlakshan changed the title chore(gemini): replace deprecated gemini models chore(gemini): deprecate older Gemini models and remove obsolete functionality Nov 26, 2025
@0xlakshan 0xlakshan marked this pull request as ready for review November 26, 2025 15:20
@0xlakshan
Copy link
Contributor Author

0xlakshan commented Nov 26, 2025

Hey @gr2m @dancer , PR’s ready for review. Let me know if you need anything from me, I’m around and available, Thanks

@0xlakshan
Copy link
Contributor Author

Quick update! merge conflicts are resolved and the PR is up to date again. @gr2m @dancer @lgrammel , Just nudging this PR back onto your radar 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants