Skip to content

[AI] Implement low-hanging fruit methods in on-device model#7673

Merged
rlazo merged 11 commits intofeature/hybridfrom
rlh.lowhanging.fruit
Jan 28, 2026
Merged

[AI] Implement low-hanging fruit methods in on-device model#7673
rlazo merged 11 commits intofeature/hybridfrom
rlh.lowhanging.fruit

Conversation

@rlazo
Copy link
Collaborator

@rlazo rlazo commented Jan 24, 2026

The change introduces a new exception type to make it easier to wrap unknown errors thrown by MLKit.

Additionally, we moved the mlkitModel field to the constructor for easier testing.

rlazo added 3 commits January 24, 2026 10:51
Ensure we don't accidentally change how converters work and break them accidentally.
The change introduces a new exception type to make it easier to wrap
unknown errors thrown by MLKit.

Additionally, we moved the `mlkitModel` field to the constructor for
easier testing.
@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@rlazo rlazo marked this pull request as draft January 24, 2026 16:24
@rlazo
Copy link
Collaborator Author

rlazo commented Jan 24, 2026

/gemini review

@google-oss-bot
Copy link
Collaborator

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements several methods in GenerativeModelImpl that were previously marked as TODO. The implementations for isAvailable, getBaseModelName, getTokenLimit, and warmup now delegate to the underlying MLKit model. The mlkitModel has been moved to the constructor to improve testability. A new FirebaseAIOnDeviceUnknownException and a factory method FirebaseAIOnDeviceException.from have been introduced to provide a consistent way of handling and wrapping exceptions from MLKit. Overall, the changes are solid and improve the functionality and robustness of the on-device model.

@rlazo
Copy link
Collaborator Author

rlazo commented Jan 25, 2026

Test code depends on the changes introduced in #7672

@rlazo rlazo marked this pull request as ready for review January 25, 2026 17:00
@rlazo rlazo merged commit c3236d5 into feature/hybrid Jan 28, 2026
28 checks passed
@rlazo rlazo deleted the rlh.lowhanging.fruit branch January 28, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants