From 8f1dc74a97dae127c8975fa432bec28e80689a5c Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Wed, 24 Sep 2025 11:02:08 -0400 Subject: [PATCH 1/2] [AI] Add Public Preview annotations to URL context APIs --- FirebaseAI/Sources/Tool.swift | 4 ++++ FirebaseAI/Sources/Types/Public/URLContextMetadata.swift | 4 ++++ FirebaseAI/Sources/Types/Public/URLMetadata.swift | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/FirebaseAI/Sources/Tool.swift b/FirebaseAI/Sources/Tool.swift index 53e0ee8b49e..969e60d155c 100644 --- a/FirebaseAI/Sources/Tool.swift +++ b/FirebaseAI/Sources/Tool.swift @@ -136,6 +136,10 @@ public struct Tool: Sendable { /// /// By including URLs in your request, the Gemini model will access the content from those pages /// to inform and enhance its response. + /// + /// > Warning: URL context is a **Public Preview** feature, which means + /// > that it is not subject to any SLA or deprecation policy and could change in + /// > backwards-incompatible ways. public static func urlContext() -> Tool { return self.init(urlContext: URLContext()) } diff --git a/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift b/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift index 5ff671f68eb..1c95a10026d 100644 --- a/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift +++ b/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift @@ -13,6 +13,10 @@ // limitations under the License. /// Metadata related to the ``Tool/urlContext()`` tool. +/// +/// > Warning: URL context is a **Public Preview** feature, which means +/// > that it is not subject to any SLA or deprecation policy and could change in +/// > backwards-incompatible ways. @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) public struct URLContextMetadata: Sendable, Hashable { /// List of URL metadata used to provide context to the Gemini model. diff --git a/FirebaseAI/Sources/Types/Public/URLMetadata.swift b/FirebaseAI/Sources/Types/Public/URLMetadata.swift index 50ee16a7e86..7375a7003b0 100644 --- a/FirebaseAI/Sources/Types/Public/URLMetadata.swift +++ b/FirebaseAI/Sources/Types/Public/URLMetadata.swift @@ -15,6 +15,10 @@ import Foundation /// Metadata for a single URL retrieved by the ``Tool/urlContext()`` tool. +/// +/// > Warning: URL context is a **Public Preview** feature, which means +/// > that it is not subject to any SLA or deprecation policy and could change in +/// > backwards-incompatible ways. @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) public struct URLMetadata: Sendable, Hashable { /// Status of the URL retrieval. From b21e2da46617bbb74bb682ecb3ee1809bfb1dcc8 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 24 Sep 2025 11:22:18 -0400 Subject: [PATCH 2/2] nit: Format into 100 columns wide --- FirebaseAI/Sources/Tool.swift | 5 ++--- FirebaseAI/Sources/Types/Public/URLContextMetadata.swift | 5 ++--- FirebaseAI/Sources/Types/Public/URLMetadata.swift | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/FirebaseAI/Sources/Tool.swift b/FirebaseAI/Sources/Tool.swift index 969e60d155c..e051b3b5ea4 100644 --- a/FirebaseAI/Sources/Tool.swift +++ b/FirebaseAI/Sources/Tool.swift @@ -137,9 +137,8 @@ public struct Tool: Sendable { /// By including URLs in your request, the Gemini model will access the content from those pages /// to inform and enhance its response. /// - /// > Warning: URL context is a **Public Preview** feature, which means - /// > that it is not subject to any SLA or deprecation policy and could change in - /// > backwards-incompatible ways. + /// > Warning: URL context is a **Public Preview** feature, which means that it is not subject to + /// > any SLA or deprecation policy and could change in backwards-incompatible ways. public static func urlContext() -> Tool { return self.init(urlContext: URLContext()) } diff --git a/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift b/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift index 1c95a10026d..5689c7610f7 100644 --- a/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift +++ b/FirebaseAI/Sources/Types/Public/URLContextMetadata.swift @@ -14,9 +14,8 @@ /// Metadata related to the ``Tool/urlContext()`` tool. /// -/// > Warning: URL context is a **Public Preview** feature, which means -/// > that it is not subject to any SLA or deprecation policy and could change in -/// > backwards-incompatible ways. +/// > Warning: URL context is a **Public Preview** feature, which means that it is not subject to +/// > any SLA or deprecation policy and could change in backwards-incompatible ways. @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) public struct URLContextMetadata: Sendable, Hashable { /// List of URL metadata used to provide context to the Gemini model. diff --git a/FirebaseAI/Sources/Types/Public/URLMetadata.swift b/FirebaseAI/Sources/Types/Public/URLMetadata.swift index 7375a7003b0..3833d71accf 100644 --- a/FirebaseAI/Sources/Types/Public/URLMetadata.swift +++ b/FirebaseAI/Sources/Types/Public/URLMetadata.swift @@ -16,9 +16,8 @@ import Foundation /// Metadata for a single URL retrieved by the ``Tool/urlContext()`` tool. /// -/// > Warning: URL context is a **Public Preview** feature, which means -/// > that it is not subject to any SLA or deprecation policy and could change in -/// > backwards-incompatible ways. +/// > Warning: URL context is a **Public Preview** feature, which means that it is not subject to +/// > any SLA or deprecation policy and could change in backwards-incompatible ways. @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) public struct URLMetadata: Sendable, Hashable { /// Status of the URL retrieval.