@@ -7,7 +7,6 @@ import Foundation
77
88final class GeminiDirectProvider : LLMProvider {
99 private let apiKey : String
10- private let genEndpoint = " https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent "
1110 private let fileEndpoint = " https://generativelanguage.googleapis.com/upload/v1beta/files "
1211 private let proModel = " gemini-2.5-pro "
1312 private let flashModel = " gemini-2.5-flash "
@@ -317,7 +316,6 @@ final class GeminiDirectProvider: LLMProvider {
317316 var lastError : Error ?
318317 var finalResponse = " "
319318 var finalObservations : [ Observation ] = [ ]
320- var finalUsedModel = proModel
321319
322320 // Model state for Flash fallback (persists across retries)
323321 var currentModel = proModel
@@ -387,7 +385,6 @@ final class GeminiDirectProvider: LLMProvider {
387385 print ( " ✅ Video transcription succeeded on attempt \( attempt + 1 ) " )
388386 finalResponse = response
389387 finalObservations = observations
390- finalUsedModel = usedModel
391388 break
392389
393390 } catch {
@@ -548,8 +545,6 @@ final class GeminiDirectProvider: LLMProvider {
548545 let existingCardsJSON = try encoder. encode ( context. existingCards)
549546 let existingCardsString = String ( data: existingCardsJSON, encoding: . utf8) ?? " [] "
550547
551- let exampleCategory = context. categories. first? . name ?? " Work "
552-
553548 let basePrompt = """
554549 You are a digital anthropologist, observing a user's raw activity log. Your goal is to synthesize this log into a high-level, human-readable story of their session, presented as a series of timeline cards.
555550 THE GOLDEN RULE:
@@ -1165,7 +1160,7 @@ private func uploadResumable(data: Data, mimeType: String) async throws -> Strin
11651160 // Prepare logging context
11661161 let responseHeaders : [ String : String ] = httpResponse. allHeaderFields. reduce ( into: [ : ] ) { acc, kv in
11671162 if let k = kv. key as? String , let v = kv. value as? CustomStringConvertible { acc [ k] = v. description }
1168- } ?? [ : ]
1163+ }
11691164 let modelName : String ? = {
11701165 if let u = URL ( string: urlWithKey) {
11711166 let last = u. path. split ( separator: " / " ) . last. map ( String . init)
@@ -1475,7 +1470,7 @@ private func uploadResumable(data: Data, mimeType: String) async throws -> Strin
14751470 // Prepare logging context
14761471 let responseHeaders : [ String : String ] = httpResponse. allHeaderFields. reduce ( into: [ : ] ) { acc, kv in
14771472 if let k = kv. key as? String , let v = kv. value as? CustomStringConvertible { acc [ k] = v. description }
1478- } ?? [ : ]
1473+ }
14791474 let modelName : String ? = {
14801475 if let u = URL ( string: urlWithKey) {
14811476 let last = u. path. split ( separator: " / " ) . last. map ( String . init)
0 commit comments