Skip to content

feat: implement GeminiLanguageModel for FoundationModels - #16528

Draft
andrewheard wants to merge 5 commits into
ah/gemini-for-foundation-modelsfrom
ah/ai-gemini-language-model
Draft

feat: implement GeminiLanguageModel for FoundationModels#16528
andrewheard wants to merge 5 commits into
ah/gemini-for-foundation-modelsfrom
ah/ai-gemini-language-model

Conversation

@andrewheard

Copy link
Copy Markdown
Contributor

Introduces GeminiLanguageModel to allow access to Gemini models through Apple's Foundation Models framework (LanguageModel protocol).

  • Adds GeminiLanguageModelExecutor to translate model session requests into Gemini REST API calls via GeminiAPIClient.
  • Adds GeminiTranscriptTranslator to handle Apple transcript formatting.
  • Introduces BackendConfiguration to encapsulate backend URL routing.
  • Secures the apiKey convenience initializer behind a Swift Package trait (DirectGeminiDeveloperAPIAccess) to prevent hardcoded keys in client apps from Firebase AI Logic.
  • Includes comprehensive unit tests and mock protocols for the executor.

@gemini-code-assist

Copy link
Copy Markdown
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
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 counterproductive. 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.

@andrewheard
andrewheard force-pushed the ah/ai-gemini-api-client branch from 79caeac to f3e6a43 Compare August 31, 2026 21:41
@andrewheard
andrewheard force-pushed the ah/ai-gemini-language-model branch from e8f22c1 to cab5b74 Compare August 31, 2026 21:42
@andrewheard
andrewheard force-pushed the ah/ai-gemini-api-client branch from 89b3b80 to 41f89da Compare September 1, 2026 00:04
@andrewheard
andrewheard force-pushed the ah/ai-gemini-language-model branch from cab5b74 to 53cec62 Compare September 1, 2026 00:04
@andrewheard
andrewheard force-pushed the ah/ai-gemini-api-client branch from 41f89da to a139002 Compare September 1, 2026 00:05
@andrewheard
andrewheard force-pushed the ah/ai-gemini-language-model branch 2 times, most recently from bfa74af to 857f0f6 Compare September 1, 2026 16:34
Base automatically changed from ah/ai-gemini-api-client to ah/gemini-for-foundation-models September 1, 2026 22:14
@andrewheard
andrewheard force-pushed the ah/ai-gemini-language-model branch from 857f0f6 to 7600831 Compare September 1, 2026 22:14
@andrewheard
andrewheard force-pushed the ah/ai-gemini-language-model branch from 7600831 to c34ef9c Compare September 1, 2026 22:45
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.

1 participant