Revert commit dd2cfa8df1 (#16685) to undo
the renaming from Gemini Enterprise Agent Platform to Gemini Enterprise
API.
- Restore Backend.agentPlatform(location:) as the primary public API
and remove Backend.enterprise(location:).
- Revert APIConfig.Service.enterprise to .agentPlatform and restore
agentPlatformStagingBypassProxy.
- Revert documentation comments, DocC topics, and guides back to
Agent Platform Gemini API and Gemini Enterprise Agent Platform.
- Clean up leftover Vertex AI symbols to align with Agent Platform and
FirebaseAILogic (isFirebaseAILogicServiceDisabledError and
defaultAgentPlatformAPIConfig).
- Re-align tests and conflict resolutions from #16689, #16693, #16676,
and #16756.
Update scripts/update_firebase_spm_dependency.sh and
scripts/quickstart_build_spm.sh to reliably update SPM dependencies
across quickstart projects (such as FirebaseAI) in CI.
Key changes:
- Match any requirement type (branch, revision, exactVersion) using
Perl \K and preserve trailing package attributes like traits.
- Fix --version mode to map to exactVersion instead of branch.
- Pass parameters to Perl via environment variables to prevent regex
delimiter collisions and variable interpolation issues.
- Add an exit/signal trap with a backup_successful guard to safely
restore project.pbxproj on failure.
- Run update script as a subprocess rather than sourcing in quickstart
build script, passing FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT
explicitly to test.sh.
- Copy mock GoogleService-Info.plist to both sample and nested app
directories for Xcode 16 synchronized groups.
- Format scripts to adhere to the Google Shell Style Guide and pass
shellcheck with zero warnings.
Add an integration test in FirebaseAITestApp verifying streaming
responses using GeminiLanguageModel and FoundationModels on supported
platforms. Update the TestApp project to link FirebaseAILogic.
Enhance scripts/repo to support array options for --filter and
--exclude so multiple test targets can be passed to xcodebuild.
Update sdk.ai.yml to introduce a dedicated integration job running
on xcode-27 with GEMINI_LANGUAGE_MODEL: 1, exclude
GeminiLanguageModelTests from standard integration runs, and provide
human-readable display names for testapp-integration matrix jobs.
Implemented `GeminiLanguageModel`, providing an adapter for Google's
Gemini models conforming to Apple's `FoundationModels.LanguageModel`
protocol. This PR includes text to text generation capabilities; other
modalities and Gemini features will be handled in follow-up PRs.
**Note:** The `GeminiLanguageModel` implementation is guarded by the
environment variable `GEMINI_LANGUAGE_MODEL`. By default none of the
`GeminiLanguageModel` implementation is included.
Key additions:
- `GeminiLanguageModel`: Implements `LanguageModel` protocol with
reasoning capabilities, configuring execution via `ModelResource`
and `EndpointConfiguration`.
- `GeminiLanguageModelExecutor`: Converts prompt instructions and
history into Gemini streaming requests, yielding responses as
`LanguageModelSession.ResponseStream`.
- `GeminiTranscriptTranslator`: Translates Apple `Transcript` entries
and segments into Gemini `Content` structures while preserving thought
signatures and validating supported transcript features.
- `GeminiLanguageModel.Error` and `GeminiErrorMapper`: Translates Gemini
API, HTTP, and network errors into standard `LanguageModelError` cases
(`rateLimited`, `timeout`, `guardrailViolation`, `refusal`, and
`unsupportedLanguageOrLocale`) or `GeminiLanguageModel.Error` cases
(`serviceUnavailable`, `networkFailure`, `modelNotFound`, `apiError`).
The `APIError` payload is designed for seamless forward compatibility
with both GenerateContent and the upcoming Interactions API.
- Testing infrastructure: Adds `ConditionTrait.requireFoundationModels`
to conditionally run Foundation Models tests only on supported
platforms (macOS 27+, iOS 27+, watchOS 27+, visionOS 27+), along with
shared test constants, mock fixtures, and comprehensive unit and
integration test suites.