@@ -238,11 +238,24 @@ public enum LanguageModel: Sendable, CustomStringConvertible, Hashable {
238238 }
239239
240240 public enum Google : String , Sendable , Hashable , CaseIterable {
241- case gemini3Flash = " gemini-3-flash "
241+ // NOTE: As of 2025-12-17, ListModels exposes Gemini 3 Flash as `gemini-3-flash-preview` on v1beta.
242+ // We keep the user-facing identifier as `gemini-3-flash` and map it to the preview model id for API calls.
243+ case gemini3Flash = " gemini-3-flash-preview "
242244 case gemini25Pro = " gemini-2.5-pro "
243245 case gemini25Flash = " gemini-2.5-flash "
244246 case gemini25FlashLite = " gemini-2.5-flash-lite "
245247
248+ public var apiModelId : String { self . rawValue }
249+
250+ public var userFacingModelId : String {
251+ switch self {
252+ case . gemini3Flash:
253+ " gemini-3-flash "
254+ default :
255+ self . rawValue
256+ }
257+ }
258+
246259 public var supportsVision : Bool { true }
247260 public var supportsTools : Bool { true }
248261
@@ -659,7 +672,7 @@ public enum LanguageModel: Sendable, CustomStringConvertible, Hashable {
659672 case let . anthropic( model) :
660673 return " Anthropic/ \( model. modelId) "
661674 case let . google( model) :
662- return " Google/ \( model. rawValue ) "
675+ return " Google/ \( model. userFacingModelId ) "
663676 case let . mistral( model) :
664677 return " Mistral/ \( model. rawValue) "
665678 case let . groq( model) :
@@ -696,7 +709,7 @@ public enum LanguageModel: Sendable, CustomStringConvertible, Hashable {
696709 case let . anthropic( model) :
697710 model. modelId
698711 case let . google( model) :
699- model. rawValue
712+ model. userFacingModelId
700713 case let . mistral( model) :
701714 model. rawValue
702715 case let . groq( model) :
0 commit comments