Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e8b141a
[Firebase AI] Rename module to `FirebaseAILogic`
andrewheard Aug 29, 2025
3e644af
Add `FirebaseAILogic.podspec`
andrewheard Sep 2, 2025
f394232
Merge branch 'main' into ah/ai-logic-rename
andrewheard Sep 2, 2025
b37340a
Add availability annotation to `FirebaseAI` typealias
andrewheard Sep 2, 2025
4f640ab
Update `FirebaseManifest` to include `FirebaseAILogic` pod
andrewheard Sep 2, 2025
e61e1a1
Merge branch 'main' into ah/ai-logic-rename
andrewheard Sep 18, 2025
8cc0df4
Revert rename of `FirebaseAI` to `AILog`; keep module rename.
andrewheard Sep 18, 2025
65af1d2
Merge branch 'main' into ah/ai-logic-rename
andrewheard Sep 18, 2025
fadb9d3
Updates for 12.4.0
andrewheard Sep 18, 2025
c8a4360
Revert rename in GenerateContentIntegrationTests.swift
andrewheard Sep 18, 2025
82b4803
Merge branch 'main' into ah/ai-logic-rename
andrewheard Sep 24, 2025
ba145be
Add initial `FirebaseAILogicBinary.json` file for Carthage
andrewheard Sep 24, 2025
9c343a6
Merge branch 'main' into ah/ai-logic-rename
andrewheard Sep 26, 2025
d83dc64
Move `FirebaseAIWrapper` into subdir and add API tests
andrewheard Sep 26, 2025
5a8c1a9
Remove trailing comma
andrewheard Sep 26, 2025
d20f1f5
Add `quickstart_framework_firebaseai` job
andrewheard Sep 29, 2025
209d26f
Add workaround to use the FirebaseAIExampleZip scheme
andrewheard Sep 29, 2025
2ee9ca3
Merge branch 'main' into ah/ai-logic-rename
andrewheard Oct 14, 2025
6e05d06
Update versions to `12.5.0`
andrewheard Oct 14, 2025
11ca484
Update new imports to `FirebaseAILogic`
andrewheard Oct 14, 2025
314e9a1
Fix `GoogleService-Info.plist` path in `zip.yml`
andrewheard Oct 14, 2025
653355a
Merge branch 'main' into ah/ai-logic-rename
andrewheard Oct 14, 2025
7881814
Add `$(inherited)` to `HEADER_SEARCH_PATHS` in `zip_quickstart_test.sh`
andrewheard Oct 15, 2025
9bbb5fa
Merge branch 'main' into ah/ai-logic-rename
andrewheard Oct 15, 2025
05f3846
Update new Live tests to `import FirebaseAILogic`
andrewheard Oct 16, 2025
c3cf78d
Fix another import
andrewheard Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/firebaseai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ permissions:

jobs:
spm:
strategy:
matrix:
target: [FirebaseAILogicUnit, FirebaseAIUnit]
uses: ./.github/workflows/common.yml
with:
target: FirebaseAIUnit
target: ${{ matrix.target }}
setup_command: scripts/update_vertexai_responses.sh

testapp-integration:
Expand Down Expand Up @@ -77,9 +80,12 @@ jobs:
retention-days: 2

pod_lib_lint:
strategy:
matrix:
product: [FirebaseAILogic, FirebaseAI]
uses: ./.github/workflows/common_cocoapods.yml
with:
product: FirebaseAI
product: ${{ matrix.product }}
supports_swift6: true
setup_command: scripts/update_vertexai_responses.sh

Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,57 @@ jobs:
name: quickstart_artifacts database
path: quickstart-ios/

quickstart_framework_firebaseai:
needs: package-head
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
env:
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
SDK: "FirebaseAI"
# This is a workaround to use the FirebaseAIExampleZip scheme that does not have the SPM dependency.
SWIFT_SUFFIX: "Zip"
strategy:
matrix:
artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic]
build-env:
- os: macos-15
xcode: Xcode_16.4
runs-on: ${{ matrix.build-env.os }}
steps:
- uses: actions/checkout@v4
- name: Get framework dir
uses: actions/download-artifact@v4.1.7
with:
name: ${{ matrix.artifact }}
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
- name: Xcode
run: sudo xcode-select -s /Applications/${{ matrix.build-env.xcode }}.app/Contents/Developer
- name: Setup Bundler
run: ./scripts/setup_bundler.sh
- name: Move frameworks
run: |
mkdir -p "${HOME}"/ios_frameworks/
find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} +
- uses: actions/checkout@v4
- name: Setup quickstart
run: SAMPLE="$SDK" TARGET="${SDK}ExampleZip" scripts/setup_quickstart_framework.sh \
"${HOME}"/ios_frameworks/Firebase/FirebaseAILogic/* \
"${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/*
- name: Install Secret GoogleService-Info.plist
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info.plist.gpg \
quickstart-ios/firebaseai/GoogleService-Info.plist "$plist_secret"
- name: Test Quickstart
run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}")
- name: Remove data before upload
if: ${{ failure() }}
run: scripts/remove_data.sh firebaseai
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: quickstart_artifacts_firebaseai
path: quickstart-ios/

quickstart_framework_firestore:
needs: package-head
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
Expand Down
15 changes: 3 additions & 12 deletions FirebaseAI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Build AI-powered apps and features with the Gemini API using the Firebase AI SDK
s.prefix_header_file = false

s.source_files = [
'FirebaseAI/Sources/**/*.swift',
'FirebaseAI/Wrapper/Sources/**/*.swift',
]

s.swift_version = '5.9'
Expand All @@ -43,13 +43,11 @@ Build AI-powered apps and features with the Gemini API using the Firebase AI SDK
s.tvos.framework = 'UIKit'
s.watchos.framework = 'WatchKit'

s.dependency 'FirebaseAppCheckInterop', '~> 12.5.0'
s.dependency 'FirebaseAuthInterop', '~> 12.5.0'
s.dependency 'FirebaseAILogic', '12.5.0'
s.dependency 'FirebaseCore', '~> 12.5.0'
s.dependency 'FirebaseCoreExtension', '~> 12.5.0'

s.test_spec 'unit' do |unit_tests|
unit_tests_dir = 'FirebaseAI/Tests/Unit/'
unit_tests_dir = 'FirebaseAI/Wrapper/Tests/'
unit_tests.scheme = { :code_coverage => true }
unit_tests.platforms = {
:ios => ios_deployment_target,
Expand All @@ -59,12 +57,5 @@ Build AI-powered apps and features with the Gemini API using the Firebase AI SDK
unit_tests.source_files = [
unit_tests_dir + '**/*.swift',
]
unit_tests.exclude_files = [
unit_tests_dir + 'Snippets/**/*.swift',
]
unit_tests.resources = [
unit_tests_dir + 'vertexai-sdk-test-data/mock-responses',
unit_tests_dir + 'Resources/**/*',
]
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseAITestApp
import FirebaseAuth
import FirebaseCore
import FirebaseStorage
import Testing

@testable import struct FirebaseAI.APIConfig
@testable import struct FirebaseAILogic.APIConfig

@Suite(.serialized)
struct CountTokensIntegrationTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseAITestApp
import FirebaseAuth
import FirebaseCore
Expand All @@ -23,7 +23,7 @@ import Testing
import UIKit
#endif // canImport(UIKit)

@testable import struct FirebaseAI.BackendError
@testable import struct FirebaseAILogic.BackendError

@Suite(.serialized)
struct GenerateContentIntegrationTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseAITestApp
import FirebaseAuth
import FirebaseCore
Expand All @@ -24,7 +24,7 @@ import Testing
#endif // canImport(UIKit)

// TODO(#14452): Remove `@testable import` when `generateImages(prompt:gcsURI:)` is public.
@testable import class FirebaseAI.ImagenModel
@testable import class FirebaseAILogic.ImagenModel

@Suite(
.enabled(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseAITestApp
import FirebaseAuth
import FirebaseCore
import FirebaseStorage
import XCTest

@testable import struct FirebaseAI.CountTokensRequest
@testable import struct FirebaseAILogic.CountTokensRequest

// TODO(#14405): Migrate to Swift Testing and parameterize tests.
final class IntegrationTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseAITestApp
import SwiftUI
import Testing

@testable import struct FirebaseAI.APIConfig
@testable import struct FirebaseAILogic.APIConfig

@Suite(.serialized)
struct LiveSessionTests {
Expand Down
4 changes: 2 additions & 2 deletions FirebaseAI/Tests/TestApp/Tests/Integration/SchemaTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseAITestApp
import FirebaseAuth
import FirebaseCore
Expand All @@ -23,7 +23,7 @@ import Testing
import UIKit
#endif // canImport(UIKit)

@testable import struct FirebaseAI.BackendError
@testable import struct FirebaseAILogic.BackendError

/// Test the schema fields.
@Suite(.serialized)
Expand Down
4 changes: 2 additions & 2 deletions FirebaseAI/Tests/TestApp/Tests/Utilities/InstanceConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseAITestApp
import FirebaseCore
import Testing

@testable import struct FirebaseAI.APIConfig
@testable import struct FirebaseAILogic.APIConfig

struct InstanceConfig: Equatable, Encodable {
static let vertexAI_v1beta = InstanceConfig(
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/APITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import XCTest
#if canImport(AppKit)
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/ChatTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import FirebaseCore
import Foundation
import XCTest

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class ChatTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/GenerationConfigTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import Foundation
import XCTest

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/GenerativeModelGoogleAITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import FirebaseAuthInterop
import FirebaseCore
import XCTest

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class GenerativeModelGoogleAITests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/GenerativeModelVertexAITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import FirebaseAuthInterop
import FirebaseCore
import XCTest

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class GenerativeModelVertexAITests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/JSONValueTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.
import XCTest

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class JSONValueTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/PartTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import Foundation
import XCTest

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class PartTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/PartsRepresentableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import XCTest
import CoreImage
#endif // canImport(CoreImage)

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class PartsRepresentableTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/RequestOptionsTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import XCTest

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class RequestOptionsTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/SafetyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import XCTest

@testable import FirebaseAI
@testable import FirebaseAILogic

@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
final class SafetyTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/Snippets/ChatSnippets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import XCTest

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/Snippets/CloudStorageSnippets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#if SWIFT_PACKAGE // The FirebaseStorage dependency has only been added in Package.swift.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import FirebaseStorage

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/Snippets/CountTokensSnippets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import XCTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import XCTest

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/Snippets/LiveSnippets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import XCTest

Expand Down
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/Unit/Snippets/MultimodalSnippets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import XCTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAI
import FirebaseAILogic
import FirebaseCore
import XCTest

Expand Down
Loading
Loading