Skip to content

feat(ai): document and expose GeminiLanguageModel - #16631

Merged
andrewheard merged 4 commits into
mainfrom
ah/ai-add-glm-docs
Sep 9, 2026
Merged

feat(ai): document and expose GeminiLanguageModel#16631
andrewheard merged 4 commits into
mainfrom
ah/ai-add-glm-docs

Conversation

@andrewheard

@andrewheard andrewheard commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Exposes GeminiLanguageModel for public preview and adds developer-facing DocC documentation for using Gemini with Apple's Foundation Models framework.

  • Expose in SwiftPM: Removed the GEMINI_LANGUAGE_MODEL environment variable check in Package.swift so targets and dependencies build unconditionally on Swift 6.4+ when FoundationModels is available.
  • DocC Documentation: Added documentation comments to GeminiLanguageModel and FirebaseAI.geminiLanguageModel(name:), including usage examples with LanguageModelSession, public preview callouts, and guide links.
  • CHANGELOG: Added a public preview entry in FirebaseAI/CHANGELOG.md.

Add DocC documentation comments for the GeminiLanguageModel integration
with Apple's Foundation Models framework.

Provide usage guidance, public preview warnings, and links to Apple's
LanguageModel protocol, LanguageModelSession, and DynamicProfile. In
addition, document FirebaseAI.geminiLanguageModel(name:) and include
a code example showing how to instantiate and use the model.
@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.

Remove the GEMINI_LANGUAGE_MODEL environment variable check in
Package.swift to unconditionally include GeminiLanguageModel targets
and dependencies on supported Swift 6.4+ toolchains.
@andrewheard andrewheard changed the title docs(ai): document GeminiLanguageModel APIs feat(ai): document and expose GeminiLanguageModel Sep 9, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request promotes the GeminiLanguageModel to a public preview state. It streamlines the build process by removing conditional environment checks and provides developers with detailed documentation to facilitate the adoption of Gemini models within Apple's Foundation Models ecosystem.

Highlights

  • Public Preview Exposure: Exposes the GeminiLanguageModel for public preview, enabling integration with Apple's Foundation Models framework.
  • Documentation: Added comprehensive DocC documentation, including usage examples and integration guides for developers.
  • Build Configuration: Simplified SwiftPM configuration by removing the environment variable check, allowing unconditional builds on supported Swift versions.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Activity
  • Pull request created by andrewheard.
  • Gemini Code Assist bot provided usage instructions.
  • Author requested a summary via /gemini summary.

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

Copy link
Copy Markdown
Contributor

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 introduces public preview documentation for GeminiLanguageModel and simplifies the Swift Package Manager configuration by removing the GEMINI_LANGUAGE_MODEL environment variable check, enabling the target unconditionally when compiler and framework requirements are met. Feedback was provided to percent-encode parentheses in documentation URLs to ensure they render correctly across all Markdown parsers.

Comment thread GeminiLanguageModel/Sources/GeminiLanguageModel/GeminiLanguageModel.swift Outdated
@andrewheard
andrewheard marked this pull request as ready for review September 9, 2026 18:37

@paulb777 paulb777 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM on acceptable CI

@andrewheard
andrewheard merged commit 27eaab3 into main Sep 9, 2026
156 of 157 checks passed
@andrewheard
andrewheard deleted the ah/ai-add-glm-docs branch September 9, 2026 19:57
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.

2 participants