Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support Gemini 2.5 model family with Google GenAI client#1129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mcndt wants to merge2 commits intobrowserbase:main
base:main
Choose a base branch
Loading
frommcndt:feat/add-more-gemini-models

Conversation

@mcndt
Copy link

why

I want to use the latest Gemini 2.5 models.

what changed

I updated the list of available models and mapping to model provider to include the following models:

  • Gemini 2.5 Flash
  • Gemini 2.5 Flash (September 2025 Preview)
  • Gemini 2.5 Flash Lite
  • Gemini 2.5 Flash Lite (September 2025 Preview)
  • Gemini 2.5 Pro

test plan

Works out of the box with the Google GenAI client.

greptile-apps[bot] reacted with thumbs up emoji
@changeset-bot
Copy link

changeset-botbot commentedOct 13, 2025
edited
Loading

🦋 Changeset detected

Latest commit:1fe80de

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@browserbasehq/stagehandPatch
@browserbasehq/stagehand-evalsPatch

Not sure what this means?Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@greptile-appsgreptile-appsbot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Summary

Added support for the Gemini 2.5 model family (Flash, Flash Lite, Pro, and September 2025 preview variants) by extending the model schema and provider mappings. The new models integrate seamlessly with the existing Google GenAI client.

  • Added 5 new model identifiers toAvailableModelSchema:gemini-2.5-flash,gemini-2.5-flash-preview-09-2025,gemini-2.5-flash-lite,gemini-2.5-flash-lite-preview-09-2025, andgemini-2.5-pro
  • Mapped all new models to thegoogle provider inmodelToProviderMap
  • Included changeset documenting the patch-level version bump per repository requirements

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward model additions following established patterns. All new models are correctly added to both the schema enum and provider mapping in parallel. The GoogleClient already supports these models through the Google GenAI SDK. The PR includes proper changeset documentation as required.
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
.changeset/brown-dingos-teach.md5/5Added changeset documenting Gemini 2.5 model support - follows versioning requirements
types/model.ts5/5Added 5 new Gemini 2.5 model variants to the schema enum - clean addition with consistent naming
lib/llm/LLMProvider.ts5/5Mapped new Gemini 2.5 models to google provider - consistent with existing pattern

Sequence Diagram

sequenceDiagram    participant User    participant Stagehand    participant LLMProvider    participant GoogleClient    participant GoogleGenAI    User->>Stagehand: Initialize with modelName: "gemini-2.5-flash"    Stagehand->>LLMProvider: getClient("gemini-2.5-flash")    LLMProvider->>LLMProvider: Check modelToProviderMap    Note over LLMProvider: Maps "gemini-2.5-flash" to "google"    LLMProvider->>GoogleClient: Create new GoogleClient    GoogleClient->>GoogleGenAI: Initialize with API key    GoogleClient-->>LLMProvider: Return client instance    LLMProvider-->>Stagehand: Return GoogleClient        User->>Stagehand: Perform action (act/extract/etc)    Stagehand->>GoogleClient: createChatCompletion()    GoogleClient->>GoogleGenAI: models.generateContent(modelName: "gemini-2.5-flash")    GoogleGenAI-->>GoogleClient: Return response    GoogleClient-->>Stagehand: Return formatted response    Stagehand-->>User: Return action result
Loading

2 files reviewed, no comments

Edit Code Review Agent Settings |Greptile

@miguelg719
Copy link
Collaborator

hey@mcndt , thanks for the contrib! Before merging, can you try set the modelName togoogle/<2.5-family-modelname> and see if it works/supports your config? We're adopting AI SDK more for LLM inference to avoid custom client maintenance

@mcndtmcndtforce-pushed thefeat/add-more-gemini-models branch from4567949 to1fe80deCompareNovember 4, 2025 08:45
@mcndt
Copy link
Author

Rebased this branch on the 3.0.1 release

@mcndt
Copy link
Author

@miguelg719 I verified that the model names would indeed be compatible with the AI SDK!

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

Reviewers

1 more reviewer

@greptile-appsgreptile-apps[bot]greptile-apps[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mcndt@miguelg719

[8]ページ先頭

©2009-2025 Movatter.jp