summarylogtreecommitdiffstats
path: root/roo-code-5223_gemini-cli.diff
blob: a3b8c499bc0ad52dda267e75d441af4ad0c4cc20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
*** /dev/null	2025-09-08 17:49:14.163141544 +0200
--- Roo-Code-3.28.0-patched/packages/types/src/providers/gemini-cli.ts	2025-09-11 17:55:48.176786061 +0200
***************
*** 0 ****
--- 1,120 ----
+ import type { ModelInfo } from "../model.js"
+ 
+ // Gemini CLI models with free tier pricing (all $0)
+ export type GeminiCliModelId = keyof typeof geminiCliModels
+ 
+ export const geminiCliDefaultModelId: GeminiCliModelId = "gemini-2.5-pro"
+ 
+ export const geminiCliModels = {
+ 	"gemini-2.0-flash-001": {
+ 		maxTokens: 8192,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-2.0-flash-thinking-exp-01-21": {
+ 		maxTokens: 65_536,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-2.0-flash-thinking-exp-1219": {
+ 		maxTokens: 8192,
+ 		contextWindow: 32_767,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-2.0-flash-exp": {
+ 		maxTokens: 8192,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-1.5-flash-002": {
+ 		maxTokens: 8192,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-1.5-flash-exp-0827": {
+ 		maxTokens: 8192,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-1.5-flash-8b-exp-0827": {
+ 		maxTokens: 8192,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-1.5-pro-002": {
+ 		maxTokens: 8192,
+ 		contextWindow: 2_097_152,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-1.5-pro-exp-0827": {
+ 		maxTokens: 8192,
+ 		contextWindow: 2_097_152,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-exp-1206": {
+ 		maxTokens: 8192,
+ 		contextWindow: 2_097_152,
+ 		supportsImages: true,
+ 		supportsPromptCache: false,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 	},
+ 	"gemini-2.5-flash-lite": {
+ 		maxTokens: 65_536,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: true,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 		maxThinkingTokens: 24_576,
+ 		supportsReasoningBudget: true,
+ 	},
+ 	"gemini-2.5-flash": {
+ 		maxTokens: 65_536,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: true,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 		maxThinkingTokens: 24_576,
+ 		supportsReasoningBudget: true,
+ 	},
+ 	"gemini-2.5-pro": {
+ 		maxTokens: 65_536,
+ 		contextWindow: 1_048_576,
+ 		supportsImages: true,
+ 		supportsPromptCache: true,
+ 		inputPrice: 0,
+ 		outputPrice: 0,
+ 		maxThinkingTokens: 32_768,
+ 		supportsReasoningBudget: true,
+ 		requiredReasoningBudget: true,
+ 	},
+ } as const satisfies Record<string, ModelInfo>
*** Roo-Code-3.28.0/packages/types/src/providers/index.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/packages/types/src/providers/index.ts	2025-09-11 17:40:28.525068791 +0200
***************
*** 8,13 ****
--- 8,14 ----
  export * from "./featherless.js"
  export * from "./fireworks.js"
  export * from "./gemini.js"
+ export * from "./gemini-cli.js"
  export * from "./glama.js"
  export * from "./groq.js"
  export * from "./huggingface.js"
*** Roo-Code-3.28.0/src/api/index.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/api/index.ts	2025-09-11 17:40:28.525125782 +0200
***************
*** 15,20 ****
--- 15,21 ----
  	OpenAiHandler,
  	LmStudioHandler,
  	GeminiHandler,
+ 	GeminiCliHandler,
  	OpenAiNativeHandler,
  	DeepSeekHandler,
  	MoonshotHandler,
***************
*** 113,118 ****
--- 114,121 ----
  			return new LmStudioHandler(options)
  		case "gemini":
  			return new GeminiHandler(options)
+ 		case "gemini-cli":
+ 			return new GeminiCliHandler(options)
  		case "openai-native":
  			return new OpenAiNativeHandler(options)
  		case "deepseek":
*** /dev/null	2025-09-08 17:49:14.163141544 +0200
--- Roo-Code-3.28.0-patched/src/api/providers/__tests__/gemini-cli.spec.ts	2025-09-11 17:40:28.525281319 +0200
***************
*** 0 ****
--- 1,329 ----
+ import { describe, it, expect, vi, beforeEach } from "vitest"
+ import { GeminiCliHandler } from "../gemini-cli"
+ import { geminiCliDefaultModelId, geminiCliModels } from "@roo-code/types"
+ import * as fs from "fs/promises"
+ import axios from "axios"
+ 
+ vi.mock("fs/promises")
+ vi.mock("axios")
+ vi.mock("google-auth-library", () => ({
+ 	OAuth2Client: vi.fn().mockImplementation(() => ({
+ 		setCredentials: vi.fn(),
+ 		refreshAccessToken: vi.fn().mockResolvedValue({
+ 			credentials: {
+ 				access_token: "refreshed-token",
+ 				refresh_token: "refresh-token",
+ 				token_type: "Bearer",
+ 				expiry_date: Date.now() + 3600 * 1000,
+ 			},
+ 		}),
+ 		request: vi.fn(),
+ 	})),
+ }))
+ 
+ describe("GeminiCliHandler", () => {
+ 	let handler: GeminiCliHandler
+ 	const mockCredentials = {
+ 		access_token: "test-access-token",
+ 		refresh_token: "test-refresh-token",
+ 		token_type: "Bearer",
+ 		expiry_date: Date.now() + 3600 * 1000,
+ 	}
+ 
+ 	beforeEach(() => {
+ 		vi.clearAllMocks()
+ 		;(fs.readFile as any).mockResolvedValue(JSON.stringify(mockCredentials))
+ 		;(fs.writeFile as any).mockResolvedValue(undefined)
+ 
+ 		// Set up default mock
+ 		;(axios.post as any).mockResolvedValue({
+ 			data: {},
+ 		})
+ 
+ 		handler = new GeminiCliHandler({
+ 			apiModelId: geminiCliDefaultModelId,
+ 		})
+ 
+ 		// Set up default mock for OAuth2Client request
+ 		handler["authClient"].request = vi.fn().mockResolvedValue({
+ 			data: {},
+ 		})
+ 
+ 		// Mock the discoverProjectId to avoid real API calls in tests
+ 		handler["projectId"] = "test-project-123"
+ 		vi.spyOn(handler as any, "discoverProjectId").mockResolvedValue("test-project-123")
+ 	})
+ 
+ 	describe("constructor", () => {
+ 		it("should initialize with provided config", () => {
+ 			expect(handler["options"].apiModelId).toBe(geminiCliDefaultModelId)
+ 		})
+ 	})
+ 
+ 	describe("getModel", () => {
+ 		it("should return correct model info", () => {
+ 			const modelInfo = handler.getModel()
+ 			expect(modelInfo.id).toBe(geminiCliDefaultModelId)
+ 			expect(modelInfo.info).toBeDefined()
+ 			expect(modelInfo.info.inputPrice).toBe(0)
+ 			expect(modelInfo.info.outputPrice).toBe(0)
+ 		})
+ 
+ 		it("should return default model if invalid model specified", () => {
+ 			const invalidHandler = new GeminiCliHandler({
+ 				apiModelId: "invalid-model",
+ 			})
+ 			const modelInfo = invalidHandler.getModel()
+ 			expect(modelInfo.id).toBe(geminiCliDefaultModelId)
+ 		})
+ 
+ 		it("should handle :thinking suffix", () => {
+ 			const thinkingHandler = new GeminiCliHandler({
+ 				apiModelId: "gemini-2.5-pro:thinking",
+ 			})
+ 			const modelInfo = thinkingHandler.getModel()
+ 			// The :thinking suffix should be removed from the ID
+ 			expect(modelInfo.id).toBe("gemini-2.5-pro")
+ 			// But the model should still have reasoning support
+ 			expect(modelInfo.info.supportsReasoningBudget).toBe(true)
+ 			expect(modelInfo.info.requiredReasoningBudget).toBe(true)
+ 		})
+ 	})
+ 
+ 	describe("OAuth authentication", () => {
+ 		it("should load OAuth credentials from default path", async () => {
+ 			await handler["loadOAuthCredentials"]()
+ 			expect(fs.readFile).toHaveBeenCalledWith(expect.stringMatching(/\.gemini[/\\]oauth_creds\.json$/), "utf-8")
+ 		})
+ 
+ 		it("should load OAuth credentials from custom path", async () => {
+ 			const customHandler = new GeminiCliHandler({
+ 				apiModelId: geminiCliDefaultModelId,
+ 				geminiCliOAuthPath: "/custom/path/oauth.json",
+ 			})
+ 			await customHandler["loadOAuthCredentials"]()
+ 			expect(fs.readFile).toHaveBeenCalledWith("/custom/path/oauth.json", "utf-8")
+ 		})
+ 
+ 		it("should refresh expired tokens", async () => {
+ 			const expiredCredentials = {
+ 				...mockCredentials,
+ 				expiry_date: Date.now() - 1000, // Expired
+ 			}
+ 			;(fs.readFile as any).mockResolvedValueOnce(JSON.stringify(expiredCredentials))
+ 
+ 			await handler["ensureAuthenticated"]()
+ 
+ 			expect(handler["authClient"].refreshAccessToken).toHaveBeenCalled()
+ 			expect(fs.writeFile).toHaveBeenCalledWith(
+ 				expect.stringMatching(/\.gemini[/\\]oauth_creds\.json$/),
+ 				expect.stringContaining("refreshed-token"),
+ 			)
+ 		})
+ 
+ 		it("should throw error if credentials file not found", async () => {
+ 			;(fs.readFile as any).mockRejectedValueOnce(new Error("ENOENT"))
+ 
+ 			await expect(handler["loadOAuthCredentials"]()).rejects.toThrow("errors.geminiCli.oauthLoadFailed")
+ 		})
+ 	})
+ 
+ 	describe("project ID discovery", () => {
+ 		it("should use provided project ID", async () => {
+ 			const customHandler = new GeminiCliHandler({
+ 				apiModelId: geminiCliDefaultModelId,
+ 				geminiCliProjectId: "custom-project",
+ 			})
+ 
+ 			const projectId = await customHandler["discoverProjectId"]()
+ 			expect(projectId).toBe("custom-project")
+ 			expect(customHandler["projectId"]).toBe("custom-project")
+ 		})
+ 
+ 		it("should discover project ID through API", async () => {
+ 			// Create a new handler without the mocked discoverProjectId
+ 			const testHandler = new GeminiCliHandler({
+ 				apiModelId: geminiCliDefaultModelId,
+ 			})
+ 			testHandler["authClient"].request = vi.fn().mockResolvedValue({
+ 				data: {},
+ 			})
+ 
+ 			// Mock the callEndpoint method
+ 			testHandler["callEndpoint"] = vi.fn().mockResolvedValueOnce({
+ 				cloudaicompanionProject: "discovered-project-123",
+ 			})
+ 
+ 			const projectId = await testHandler["discoverProjectId"]()
+ 			expect(projectId).toBe("discovered-project-123")
+ 			expect(testHandler["projectId"]).toBe("discovered-project-123")
+ 		})
+ 
+ 		it("should onboard user if no existing project", async () => {
+ 			// Create a new handler without the mocked discoverProjectId
+ 			const testHandler = new GeminiCliHandler({
+ 				apiModelId: geminiCliDefaultModelId,
+ 			})
+ 			testHandler["authClient"].request = vi.fn().mockResolvedValue({
+ 				data: {},
+ 			})
+ 
+ 			// Mock the callEndpoint method
+ 			testHandler["callEndpoint"] = vi
+ 				.fn()
+ 				.mockResolvedValueOnce({
+ 					allowedTiers: [{ id: "free-tier", isDefault: true }],
+ 				})
+ 				.mockResolvedValueOnce({
+ 					done: false,
+ 				})
+ 				.mockResolvedValueOnce({
+ 					done: true,
+ 					response: {
+ 						cloudaicompanionProject: {
+ 							id: "onboarded-project-456",
+ 						},
+ 					},
+ 				})
+ 
+ 			const projectId = await testHandler["discoverProjectId"]()
+ 			expect(projectId).toBe("onboarded-project-456")
+ 			expect(testHandler["projectId"]).toBe("onboarded-project-456")
+ 			expect(testHandler["callEndpoint"]).toHaveBeenCalledTimes(3)
+ 		})
+ 	})
+ 
+ 	describe("completePrompt", () => {
+ 		it("should complete prompt successfully", async () => {
+ 			handler["authClient"].request = vi.fn().mockResolvedValue({
+ 				data: {
+ 					candidates: [
+ 						{
+ 							content: {
+ 								parts: [{ text: "Test response" }],
+ 							},
+ 						},
+ 					],
+ 				},
+ 			})
+ 
+ 			const result = await handler.completePrompt("Test prompt")
+ 			expect(result).toBe("Test response")
+ 		})
+ 
+ 		it("should handle empty response", async () => {
+ 			handler["authClient"].request = vi.fn().mockResolvedValue({
+ 				data: {
+ 					candidates: [],
+ 				},
+ 			})
+ 
+ 			const result = await handler.completePrompt("Test prompt")
+ 			expect(result).toBe("")
+ 		})
+ 
+ 		it("should filter out thinking parts", async () => {
+ 			handler["authClient"].request = vi.fn().mockResolvedValue({
+ 				data: {
+ 					candidates: [
+ 						{
+ 							content: {
+ 								parts: [{ text: "Thinking...", thought: true }, { text: "Actual response" }],
+ 							},
+ 						},
+ 					],
+ 				},
+ 			})
+ 
+ 			const result = await handler.completePrompt("Test prompt")
+ 			expect(result).toBe("Actual response")
+ 		})
+ 
+ 		it("should handle API errors", async () => {
+ 			handler["authClient"].request = vi.fn().mockRejectedValue(new Error("API Error"))
+ 
+ 			await expect(handler.completePrompt("Test prompt")).rejects.toThrow("errors.geminiCli.completionError")
+ 		})
+ 	})
+ 
+ 	describe("createMessage streaming", () => {
+ 		it("should handle streaming response with reasoning", async () => {
+ 			// Create a mock Node.js readable stream
+ 			const { Readable } = require("stream")
+ 			const mockStream = new Readable({
+ 				read() {
+ 					this.push('data: {"candidates":[{"content":{"parts":[{"text":"Hello"}]}}]}\n\n')
+ 					this.push(
+ 						'data: {"candidates":[{"content":{"parts":[{"thought":true,"text":"thinking..."}]}}]}\n\n',
+ 					)
+ 					this.push(
+ 						'data: {"candidates":[{"content":{"parts":[{"text":" world"}]}}],"usageMetadata":{"promptTokenCount":10,"candidatesTokenCount":5}}\n\n',
+ 					)
+ 					this.push("data: [DONE]\n\n")
+ 					this.push(null) // End the stream
+ 				},
+ 			})
+ 
+ 			handler["authClient"].request = vi.fn().mockResolvedValue({
+ 				data: mockStream,
+ 			})
+ 
+ 			const stream = handler.createMessage("System", [])
+ 			const chunks: any[] = []
+ 
+ 			for await (const chunk of stream) {
+ 				chunks.push(chunk)
+ 			}
+ 
+ 			// Check we got the expected chunks
+ 			expect(chunks).toHaveLength(4) // 2 text chunks, 1 reasoning chunk, 1 usage chunk
+ 
+ 			// Filter out only text chunks (not reasoning chunks)
+ 			const textChunks = chunks.filter((c) => c.type === "text").map((c) => c.text)
+ 			expect(textChunks).toEqual(["Hello", " world"])
+ 
+ 			// Check reasoning chunk
+ 			const reasoningChunks = chunks.filter((c) => c.type === "reasoning")
+ 			expect(reasoningChunks).toHaveLength(1)
+ 			expect(reasoningChunks[0].text).toBe("thinking...")
+ 
+ 			// Check usage chunk
+ 			const usageChunks = chunks.filter((c) => c.type === "usage")
+ 			expect(usageChunks).toHaveLength(1)
+ 			expect(usageChunks[0]).toMatchObject({
+ 				type: "usage",
+ 				inputTokens: 10,
+ 				outputTokens: 5,
+ 				totalCost: 0,
+ 			})
+ 		})
+ 
+ 		it("should handle rate limit errors", async () => {
+ 			handler["authClient"].request = vi.fn().mockRejectedValue({
+ 				response: {
+ 					status: 429,
+ 					data: { error: { message: "Rate limit exceeded" } },
+ 				},
+ 			})
+ 
+ 			const stream = handler.createMessage("System", [])
+ 
+ 			await expect(async () => {
+ 				for await (const _chunk of stream) {
+ 					// Should throw before yielding
+ 				}
+ 			}).rejects.toThrow("errors.geminiCli.rateLimitExceeded")
+ 		})
+ 	})
+ 
+ 	describe("countTokens", () => {
+ 		it("should fall back to base provider implementation", async () => {
+ 			const content = [{ type: "text" as const, text: "Hello world" }]
+ 			const tokenCount = await handler.countTokens(content)
+ 
+ 			// Should return a number (tiktoken fallback)
+ 			expect(typeof tokenCount).toBe("number")
+ 			expect(tokenCount).toBeGreaterThan(0)
+ 		})
+ 	})
+ })
*** /dev/null	2025-09-08 17:49:14.163141544 +0200
--- Roo-Code-3.28.0-patched/src/api/providers/gemini-cli.ts	2025-09-11 17:40:28.525430919 +0200
***************
*** 0 ****
--- 1,419 ----
+ import type { Anthropic } from "@anthropic-ai/sdk"
+ import { OAuth2Client } from "google-auth-library"
+ import * as fs from "fs/promises"
+ import * as path from "path"
+ import * as os from "os"
+ import axios from "axios"
+ 
+ import { type ModelInfo, type GeminiCliModelId, geminiCliDefaultModelId, geminiCliModels } from "@roo-code/types"
+ 
+ import type { ApiHandlerOptions } from "../../shared/api"
+ import { t } from "../../i18n"
+ 
+ import { convertAnthropicContentToGemini, convertAnthropicMessageToGemini } from "../transform/gemini-format"
+ import type { ApiStream } from "../transform/stream"
+ import { getModelParams } from "../transform/model-params"
+ 
+ import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index"
+ import { BaseProvider } from "./base-provider"
+ 
+ // OAuth2 Configuration (from Cline implementation)
+ const OAUTH_CLIENT_ID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com"
+ const OAUTH_CLIENT_SECRET = "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"
+ const OAUTH_REDIRECT_URI = "http://localhost:45289"
+ 
+ // Code Assist API Configuration
+ const CODE_ASSIST_ENDPOINT = "https://cloudcode-pa.googleapis.com"
+ const CODE_ASSIST_API_VERSION = "v1internal"
+ 
+ interface OAuthCredentials {
+ 	access_token: string
+ 	refresh_token: string
+ 	token_type: string
+ 	expiry_date: number
+ }
+ 
+ export class GeminiCliHandler extends BaseProvider implements SingleCompletionHandler {
+ 	protected options: ApiHandlerOptions
+ 	private authClient: OAuth2Client
+ 	private projectId: string | null = null
+ 	private credentials: OAuthCredentials | null = null
+ 
+ 	constructor(options: ApiHandlerOptions) {
+ 		super()
+ 		this.options = options
+ 
+ 		// Initialize OAuth2 client
+ 		this.authClient = new OAuth2Client(OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_REDIRECT_URI)
+ 	}
+ 
+ 	private async loadOAuthCredentials(): Promise<void> {
+ 		try {
+ 			const credPath = this.options.geminiCliOAuthPath || path.join(os.homedir(), ".gemini", "oauth_creds.json")
+ 			const credData = await fs.readFile(credPath, "utf-8")
+ 			this.credentials = JSON.parse(credData)
+ 
+ 			// Set credentials on the OAuth2 client
+ 			if (this.credentials) {
+ 				this.authClient.setCredentials({
+ 					access_token: this.credentials.access_token,
+ 					refresh_token: this.credentials.refresh_token,
+ 					expiry_date: this.credentials.expiry_date,
+ 				})
+ 			}
+ 		} catch (error) {
+ 			throw new Error(t("common:errors.geminiCli.oauthLoadFailed", { error }))
+ 		}
+ 	}
+ 
+ 	private async ensureAuthenticated(): Promise<void> {
+ 		if (!this.credentials) {
+ 			await this.loadOAuthCredentials()
+ 		}
+ 
+ 		// Check if token needs refresh
+ 		if (this.credentials && this.credentials.expiry_date < Date.now()) {
+ 			try {
+ 				const { credentials } = await this.authClient.refreshAccessToken()
+ 				if (credentials.access_token) {
+ 					this.credentials = {
+ 						access_token: credentials.access_token!,
+ 						refresh_token: credentials.refresh_token || this.credentials.refresh_token,
+ 						token_type: credentials.token_type || "Bearer",
+ 						expiry_date: credentials.expiry_date || Date.now() + 3600 * 1000,
+ 					}
+ 					// Optionally save refreshed credentials back to file
+ 					const credPath =
+ 						this.options.geminiCliOAuthPath || path.join(os.homedir(), ".gemini", "oauth_creds.json")
+ 					await fs.writeFile(credPath, JSON.stringify(this.credentials, null, 2))
+ 				}
+ 			} catch (error) {
+ 				throw new Error(t("common:errors.geminiCli.tokenRefreshFailed", { error }))
+ 			}
+ 		}
+ 	}
+ 
+ 	/**
+ 	 * Call a Code Assist API endpoint
+ 	 */
+ 	private async callEndpoint(method: string, body: any, retryAuth: boolean = true): Promise<any> {
+ 		try {
+ 			const res = await this.authClient.request({
+ 				url: `${CODE_ASSIST_ENDPOINT}/${CODE_ASSIST_API_VERSION}:${method}`,
+ 				method: "POST",
+ 				headers: {
+ 					"Content-Type": "application/json",
+ 				},
+ 				responseType: "json",
+ 				data: JSON.stringify(body),
+ 			})
+ 			return res.data
+ 		} catch (error: any) {
+ 			console.error(`[GeminiCLI] Error calling ${method}:`, error)
+ 			console.error(`[GeminiCLI] Error response:`, error.response?.data)
+ 			console.error(`[GeminiCLI] Error status:`, error.response?.status)
+ 			console.error(`[GeminiCLI] Error message:`, error.message)
+ 
+ 			// If we get a 401 and haven't retried yet, try refreshing auth
+ 			if (error.response?.status === 401 && retryAuth) {
+ 				await this.ensureAuthenticated() // This will refresh the token
+ 				return this.callEndpoint(method, body, false) // Retry without further auth retries
+ 			}
+ 
+ 			throw error
+ 		}
+ 	}
+ 
+ 	/**
+ 	 * Discover or retrieve the project ID
+ 	 */
+ 	private async discoverProjectId(): Promise<string> {
+ 		// If we already have a project ID, use it
+ 		if (this.options.geminiCliProjectId) {
+ 			this.projectId = this.options.geminiCliProjectId
+ 			return this.projectId
+ 		}
+ 
+ 		// If we've already discovered it, return it
+ 		if (this.projectId) {
+ 			return this.projectId
+ 		}
+ 
+ 		// Start with a default project ID (can be anything for personal OAuth)
+ 		const initialProjectId = "default"
+ 
+ 		// Prepare client metadata
+ 		const clientMetadata = {
+ 			ideType: "IDE_UNSPECIFIED",
+ 			platform: "PLATFORM_UNSPECIFIED",
+ 			pluginType: "GEMINI",
+ 			duetProject: initialProjectId,
+ 		}
+ 
+ 		try {
+ 			// Call loadCodeAssist to discover the actual project ID
+ 			const loadRequest = {
+ 				cloudaicompanionProject: initialProjectId,
+ 				metadata: clientMetadata,
+ 			}
+ 
+ 			const loadResponse = await this.callEndpoint("loadCodeAssist", loadRequest)
+ 
+ 			// Check if we already have a project ID from the response
+ 			if (loadResponse.cloudaicompanionProject) {
+ 				this.projectId = loadResponse.cloudaicompanionProject
+ 				return this.projectId as string
+ 			}
+ 
+ 			// If no existing project, we need to onboard
+ 			const defaultTier = loadResponse.allowedTiers?.find((tier: any) => tier.isDefault)
+ 			const tierId = defaultTier?.id || "free-tier"
+ 
+ 			const onboardRequest = {
+ 				tierId: tierId,
+ 				cloudaicompanionProject: initialProjectId,
+ 				metadata: clientMetadata,
+ 			}
+ 
+ 			let lroResponse = await this.callEndpoint("onboardUser", onboardRequest)
+ 
+ 			// Poll until operation is complete with timeout protection
+ 			const MAX_RETRIES = 30 // Maximum number of retries (60 seconds total)
+ 			let retryCount = 0
+ 
+ 			while (!lroResponse.done && retryCount < MAX_RETRIES) {
+ 				await new Promise((resolve) => setTimeout(resolve, 2000))
+ 				lroResponse = await this.callEndpoint("onboardUser", onboardRequest)
+ 				retryCount++
+ 			}
+ 
+ 			if (!lroResponse.done) {
+ 				throw new Error(t("common:errors.geminiCli.onboardingTimeout"))
+ 			}
+ 
+ 			const discoveredProjectId = lroResponse.response?.cloudaicompanionProject?.id || initialProjectId
+ 			this.projectId = discoveredProjectId
+ 			return this.projectId as string
+ 		} catch (error: any) {
+ 			console.error("Failed to discover project ID:", error.response?.data || error.message)
+ 			throw new Error(t("common:errors.geminiCli.projectDiscoveryFailed"))
+ 		}
+ 	}
+ 
+ 	/**
+ 	 * Parse Server-Sent Events from a stream
+ 	 */
+ 	private async *parseSSEStream(stream: NodeJS.ReadableStream): AsyncGenerator<any> {
+ 		let buffer = ""
+ 
+ 		for await (const chunk of stream) {
+ 			buffer += chunk.toString()
+ 			const lines = buffer.split("\n")
+ 			buffer = lines.pop() || ""
+ 
+ 			for (const line of lines) {
+ 				if (line.startsWith("data: ")) {
+ 					const data = line.slice(6).trim()
+ 					if (data === "[DONE]") continue
+ 
+ 					try {
+ 						const parsed = JSON.parse(data)
+ 						yield parsed
+ 					} catch (e) {
+ 						console.error("Error parsing SSE data:", e)
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	async *createMessage(
+ 		systemInstruction: string,
+ 		messages: Anthropic.Messages.MessageParam[],
+ 		metadata?: ApiHandlerCreateMessageMetadata,
+ 	): ApiStream {
+ 		await this.ensureAuthenticated()
+ 		const projectId = await this.discoverProjectId()
+ 
+ 		const { id: model, info, reasoning: thinkingConfig, maxTokens } = this.getModel()
+ 
+ 		// Convert messages to Gemini format
+ 		const contents = messages.map(convertAnthropicMessageToGemini)
+ 
+ 		// Prepare request body for Code Assist API - matching Cline's structure
+ 		const requestBody: any = {
+ 			model: model,
+ 			project: projectId,
+ 			request: {
+ 				contents: [
+ 					{
+ 						role: "user",
+ 						parts: [{ text: systemInstruction }],
+ 					},
+ 					...contents,
+ 				],
+ 				generationConfig: {
+ 					temperature: this.options.modelTemperature ?? 0.7,
+ 					maxOutputTokens: this.options.modelMaxTokens ?? maxTokens ?? 8192,
+ 				},
+ 			},
+ 		}
+ 
+ 		// Add thinking config if applicable
+ 		if (thinkingConfig) {
+ 			requestBody.request.generationConfig.thinkingConfig = thinkingConfig
+ 		}
+ 
+ 		try {
+ 			// Call Code Assist streaming endpoint using OAuth2Client
+ 			const response = await this.authClient.request({
+ 				url: `${CODE_ASSIST_ENDPOINT}/${CODE_ASSIST_API_VERSION}:streamGenerateContent`,
+ 				method: "POST",
+ 				params: { alt: "sse" },
+ 				headers: {
+ 					"Content-Type": "application/json",
+ 				},
+ 				responseType: "stream",
+ 				data: JSON.stringify(requestBody),
+ 			})
+ 
+ 			// Process the SSE stream
+ 			let lastUsageMetadata: any = undefined
+ 
+ 			for await (const jsonData of this.parseSSEStream(response.data as NodeJS.ReadableStream)) {
+ 				// Extract content from the response
+ 				const responseData = jsonData.response || jsonData
+ 				const candidate = responseData.candidates?.[0]
+ 
+ 				if (candidate?.content?.parts) {
+ 					for (const part of candidate.content.parts) {
+ 						if (part.text) {
+ 							// Check if this is a thinking/reasoning part
+ 							if (part.thought === true) {
+ 								yield {
+ 									type: "reasoning",
+ 									text: part.text,
+ 								}
+ 							} else {
+ 								yield {
+ 									type: "text",
+ 									text: part.text,
+ 								}
+ 							}
+ 						}
+ 					}
+ 				}
+ 
+ 				// Store usage metadata for final reporting
+ 				if (responseData.usageMetadata) {
+ 					lastUsageMetadata = responseData.usageMetadata
+ 				}
+ 
+ 				// Check if this is the final chunk
+ 				if (candidate?.finishReason) {
+ 					break
+ 				}
+ 			}
+ 
+ 			// Yield final usage information
+ 			if (lastUsageMetadata) {
+ 				const inputTokens = lastUsageMetadata.promptTokenCount ?? 0
+ 				const outputTokens = lastUsageMetadata.candidatesTokenCount ?? 0
+ 				const cacheReadTokens = lastUsageMetadata.cachedContentTokenCount
+ 				const reasoningTokens = lastUsageMetadata.thoughtsTokenCount
+ 
+ 				yield {
+ 					type: "usage",
+ 					inputTokens,
+ 					outputTokens,
+ 					cacheReadTokens,
+ 					reasoningTokens,
+ 					totalCost: 0, // Free tier - all costs are 0
+ 				}
+ 			}
+ 		} catch (error: any) {
+ 			console.error("[GeminiCLI] API Error:", error.response?.status, error.response?.statusText)
+ 			console.error("[GeminiCLI] Error Response:", error.response?.data)
+ 
+ 			if (error.response?.status === 429) {
+ 				throw new Error(t("common:errors.geminiCli.rateLimitExceeded"))
+ 			}
+ 			if (error.response?.status === 400) {
+ 				throw new Error(
+ 					t("common:errors.geminiCli.badRequest", {
+ 						details: JSON.stringify(error.response?.data) || error.message,
+ 					}),
+ 				)
+ 			}
+ 			throw new Error(t("common:errors.geminiCli.apiError", { error: error.message }))
+ 		}
+ 	}
+ 
+ 	override getModel() {
+ 		const modelId = this.options.apiModelId
+ 		// Handle :thinking suffix before checking if model exists
+ 		const baseModelId = modelId?.endsWith(":thinking") ? modelId.replace(":thinking", "") : modelId
+ 		let id =
+ 			baseModelId && baseModelId in geminiCliModels ? (baseModelId as GeminiCliModelId) : geminiCliDefaultModelId
+ 		const info: ModelInfo = geminiCliModels[id]
+ 		const params = getModelParams({ format: "gemini", modelId: id, model: info, settings: this.options })
+ 
+ 		// Return the cleaned model ID
+ 		return { id, info, ...params }
+ 	}
+ 
+ 	async completePrompt(prompt: string): Promise<string> {
+ 		await this.ensureAuthenticated()
+ 		const projectId = await this.discoverProjectId()
+ 
+ 		try {
+ 			const { id: model } = this.getModel()
+ 
+ 			const requestBody = {
+ 				model: model,
+ 				project: projectId,
+ 				request: {
+ 					contents: [{ role: "user", parts: [{ text: prompt }] }],
+ 					generationConfig: {
+ 						temperature: this.options.modelTemperature ?? 0.7,
+ 					},
+ 				},
+ 			}
+ 
+ 			const response = await this.authClient.request({
+ 				url: `${CODE_ASSIST_ENDPOINT}/${CODE_ASSIST_API_VERSION}:generateContent`,
+ 				method: "POST",
+ 				headers: {
+ 					"Content-Type": "application/json",
+ 				},
+ 				data: JSON.stringify(requestBody),
+ 			})
+ 
+ 			// Extract text from response
+ 			const responseData = response.data as any
+ 			if (responseData.candidates && responseData.candidates.length > 0) {
+ 				const candidate = responseData.candidates[0]
+ 				if (candidate.content && candidate.content.parts) {
+ 					const textParts = candidate.content.parts
+ 						.filter((part: any) => part.text && !part.thought)
+ 						.map((part: any) => part.text)
+ 						.join("")
+ 					return textParts
+ 				}
+ 			}
+ 
+ 			return ""
+ 		} catch (error) {
+ 			if (error instanceof Error) {
+ 				throw new Error(t("common:errors.geminiCli.completionError", { error: error.message }))
+ 			}
+ 			throw error
+ 		}
+ 	}
+ 
+ 	override async countTokens(content: Array<Anthropic.Messages.ContentBlockParam>): Promise<number> {
+ 		// For OAuth/free tier, we can't use the token counting API
+ 		// Fall back to the base provider's tiktoken implementation
+ 		return super.countTokens(content)
+ 	}
+ }
*** Roo-Code-3.28.0/src/api/providers/index.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/api/providers/index.ts	2025-09-11 17:40:28.525480786 +0200
***************
*** 9,14 ****
--- 9,15 ----
  export { MoonshotHandler } from "./moonshot"
  export { FakeAIHandler } from "./fake-ai"
  export { GeminiHandler } from "./gemini"
+ export { GeminiCliHandler } from "./gemini-cli"
  export { GlamaHandler } from "./glama"
  export { GroqHandler } from "./groq"
  export { HuggingFaceHandler } from "./huggingface"
*** Roo-Code-3.28.0/src/i18n/locales/ca/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/ca/common.json	2025-09-11 17:40:28.525543713 +0200
***************
*** 104,109 ****
--- 104,119 ----
  			"generate_complete_prompt": "Error de finalització de Gemini: {{error}}",
  			"sources": "Fonts:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "No s'han pogut carregar les credencials OAuth. Si us plau, autentica't primer: {{error}}",
+ 			"tokenRefreshFailed": "No s'ha pogut actualitzar el token OAuth: {{error}}",
+ 			"onboardingTimeout": "L'operació d'onboarding ha esgotat el temps després de 60 segons. Si us plau, torna-ho a provar més tard.",
+ 			"projectDiscoveryFailed": "No s'ha pogut descobrir l'ID del projecte. Assegura't d'estar autenticat amb 'gemini auth'.",
+ 			"rateLimitExceeded": "S'ha superat el límit de velocitat. S'han assolit els límits del nivell gratuït.",
+ 			"badRequest": "Sol·licitud incorrecta: {{details}}",
+ 			"apiError": "Error de l'API Gemini CLI: {{error}}",
+ 			"completionError": "Error de compleció de Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Ha fallat l'autenticació de l'API de Cerebras. Comproveu que la vostra clau d'API sigui vàlida i no hagi caducat.",
  			"accessForbidden": "Accés denegat a l'API de Cerebras. La vostra clau d'API pot no tenir accés al model o funcionalitat sol·licitats.",
*** Roo-Code-3.28.0/src/i18n/locales/de/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/de/common.json	2025-09-11 17:40:28.525619700 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Fehler bei der Vervollständigung durch Gemini: {{error}}",
  			"sources": "Quellen:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Fehler beim Laden der OAuth-Anmeldedaten. Bitte authentifiziere dich zuerst: {{error}}",
+ 			"tokenRefreshFailed": "Fehler beim Aktualisieren des OAuth-Tokens: {{error}}",
+ 			"onboardingTimeout": "Onboarding-Vorgang nach 60 Sekunden abgebrochen. Bitte versuche es später erneut.",
+ 			"projectDiscoveryFailed": "Projekt-ID konnte nicht ermittelt werden. Stelle sicher, dass du mit 'gemini auth' authentifiziert bist.",
+ 			"rateLimitExceeded": "Anfragenlimit überschritten. Die Limits des kostenlosen Tarifs wurden erreicht.",
+ 			"badRequest": "Ungültige Anfrage: {{details}}",
+ 			"apiError": "Gemini CLI API-Fehler: {{error}}",
+ 			"completionError": "Gemini CLI Vervollständigungsfehler: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API-Authentifizierung fehlgeschlagen. Bitte überprüfe, ob dein API-Schlüssel gültig und nicht abgelaufen ist.",
  			"accessForbidden": "Cerebras API-Zugriff verweigert. Dein API-Schlüssel hat möglicherweise keinen Zugriff auf das angeforderte Modell oder die Funktion.",
*** Roo-Code-3.28.0/src/i18n/locales/en/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/en/common.json	2025-09-11 17:40:28.525702811 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Gemini completion error: {{error}}",
  			"sources": "Sources:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Failed to load OAuth credentials. Please authenticate first: {{error}}",
+ 			"tokenRefreshFailed": "Failed to refresh OAuth token: {{error}}",
+ 			"onboardingTimeout": "Onboarding operation timed out after 60 seconds. Please try again later.",
+ 			"projectDiscoveryFailed": "Could not discover project ID. Make sure you're authenticated with 'gemini auth'.",
+ 			"rateLimitExceeded": "Rate limit exceeded. Free tier limits have been reached.",
+ 			"badRequest": "Bad request: {{details}}",
+ 			"apiError": "Gemini CLI API error: {{error}}",
+ 			"completionError": "Gemini CLI completion error: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API authentication failed. Please check your API key is valid and not expired.",
  			"accessForbidden": "Cerebras API access forbidden. Your API key may not have access to the requested model or feature.",
*** Roo-Code-3.28.0/src/i18n/locales/es/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/es/common.json	2025-09-11 17:40:28.525765738 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Error de finalización de Gemini: {{error}}",
  			"sources": "Fuentes:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Error al cargar credenciales OAuth. Por favor autentícate primero: {{error}}",
+ 			"tokenRefreshFailed": "Error al actualizar token OAuth: {{error}}",
+ 			"onboardingTimeout": "La operación de incorporación expiró después de 60 segundos. Inténtalo de nuevo más tarde.",
+ 			"projectDiscoveryFailed": "No se pudo descubrir el ID del proyecto. Asegúrate de estar autenticado con 'gemini auth'.",
+ 			"rateLimitExceeded": "Límite de velocidad excedido. Se han alcanzado los límites del nivel gratuito.",
+ 			"badRequest": "Solicitud incorrecta: {{details}}",
+ 			"apiError": "Error de API de Gemini CLI: {{error}}",
+ 			"completionError": "Error de completado de Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Falló la autenticación de la API de Cerebras. Verifica que tu clave de API sea válida y no haya expirado.",
  			"accessForbidden": "Acceso prohibido a la API de Cerebras. Tu clave de API puede no tener acceso al modelo o función solicitada.",
*** Roo-Code-3.28.0/src/i18n/locales/fr/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/fr/common.json	2025-09-11 17:40:28.525829853 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Erreur d'achèvement de Gemini : {{error}}",
  			"sources": "Sources :"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Échec du chargement des identifiants OAuth. Veuillez vous authentifier d'abord : {{error}}",
+ 			"tokenRefreshFailed": "Échec du renouvellement du token OAuth : {{error}}",
+ 			"onboardingTimeout": "L'opération d'intégration a expiré après 60 secondes. Veuillez réessayer plus tard.",
+ 			"projectDiscoveryFailed": "Impossible de découvrir l'ID du projet. Assurez-vous d'être authentifié avec 'gemini auth'.",
+ 			"rateLimitExceeded": "Limite de débit dépassée. Les limites du niveau gratuit ont été atteintes.",
+ 			"badRequest": "Requête incorrecte : {{details}}",
+ 			"apiError": "Erreur API Gemini CLI : {{error}}",
+ 			"completionError": "Erreur de complétion Gemini CLI : {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Échec de l'authentification de l'API Cerebras. Vérifiez que votre clé API est valide et n'a pas expiré.",
  			"accessForbidden": "Accès interdit à l'API Cerebras. Votre clé API peut ne pas avoir accès au modèle ou à la fonction demandée.",
*** Roo-Code-3.28.0/src/i18n/locales/hi/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/hi/common.json	2025-09-11 17:40:28.525901091 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "जेमिनी समापन त्रुटि: {{error}}",
  			"sources": "स्रोत:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "OAuth क्रेडेंशियल लोड करने में विफल। कृपया पहले प्रमाणीकरण करें: {{error}}",
+ 			"tokenRefreshFailed": "OAuth टोकन रीफ्रेश करने में विफल: {{error}}",
+ 			"onboardingTimeout": "ऑनबोर्डिंग ऑपरेशन 60 सेकंड बाद टाइमआउट हो गया। कृपया बाद में पुनः प्रयास करें।",
+ 			"projectDiscoveryFailed": "प्रोजेक्ट ID खोजने में असमर्थ। सुनिश्चित करें कि आप 'gemini auth' के साथ प्रमाणित हैं।",
+ 			"rateLimitExceeded": "दर सीमा पार हो गई। मुफ्त टियर की सीमा पहुंच गई है।",
+ 			"badRequest": "गलत अनुरोध: {{details}}",
+ 			"apiError": "Gemini CLI API त्रुटि: {{error}}",
+ 			"completionError": "Gemini CLI पूर्णता त्रुटि: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API प्रमाणीकरण विफल हुआ। कृपया जांचें कि आपकी API कुंजी वैध है और समाप्त नहीं हुई है।",
  			"accessForbidden": "Cerebras API पहुंच निषेध। आपकी API कुंजी का अनुरोधित मॉडल या सुविधा तक पहुंच नहीं हो सकती है।",
*** Roo-Code-3.28.0/src/i18n/locales/id/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/id/common.json	2025-09-11 17:40:28.525973517 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Kesalahan penyelesaian Gemini: {{error}}",
  			"sources": "Sumber:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Gagal memuat kredensial OAuth. Silakan autentikasi terlebih dahulu: {{error}}",
+ 			"tokenRefreshFailed": "Gagal memperbarui token OAuth: {{error}}",
+ 			"onboardingTimeout": "Operasi onboarding habis waktu setelah 60 detik. Silakan coba lagi nanti.",
+ 			"projectDiscoveryFailed": "Tidak dapat menemukan ID proyek. Pastikan Anda terautentikasi dengan 'gemini auth'.",
+ 			"rateLimitExceeded": "Batas kecepatan terlampaui. Batas tingkat gratis telah tercapai.",
+ 			"badRequest": "Permintaan tidak valid: {{details}}",
+ 			"apiError": "Kesalahan API Gemini CLI: {{error}}",
+ 			"completionError": "Kesalahan penyelesaian Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Autentikasi API Cerebras gagal. Silakan periksa apakah kunci API Anda valid dan belum kedaluwarsa.",
  			"accessForbidden": "Akses API Cerebras ditolak. Kunci API Anda mungkin tidak memiliki akses ke model atau fitur yang diminta.",
*** Roo-Code-3.28.0/src/i18n/locales/it/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/it/common.json	2025-09-11 17:40:28.526047129 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Errore di completamento Gemini: {{error}}",
  			"sources": "Fonti:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Impossibile caricare le credenziali OAuth. Autenticati prima: {{error}}",
+ 			"tokenRefreshFailed": "Impossibile aggiornare il token OAuth: {{error}}",
+ 			"onboardingTimeout": "L'operazione di onboarding è scaduta dopo 60 secondi. Riprova più tardi.",
+ 			"projectDiscoveryFailed": "Impossibile scoprire l'ID del progetto. Assicurati di essere autenticato con 'gemini auth'.",
+ 			"rateLimitExceeded": "Limite di velocità superato. I limiti del livello gratuito sono stati raggiunti.",
+ 			"badRequest": "Richiesta non valida: {{details}}",
+ 			"apiError": "Errore API Gemini CLI: {{error}}",
+ 			"completionError": "Errore di completamento Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Autenticazione API Cerebras fallita. Verifica che la tua chiave API sia valida e non scaduta.",
  			"accessForbidden": "Accesso API Cerebras negato. La tua chiave API potrebbe non avere accesso al modello o alla funzione richiesta.",
*** Roo-Code-3.28.0/src/i18n/locales/ja/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/ja/common.json	2025-09-11 17:40:28.526112431 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Gemini 完了エラー: {{error}}",
  			"sources": "ソース:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "OAuth認証情報の読み込みに失敗しました。まず認証してください: {{error}}",
+ 			"tokenRefreshFailed": "OAuthトークンの更新に失敗しました: {{error}}",
+ 			"onboardingTimeout": "オンボーディング操作が60秒でタイムアウトしました。後でもう一度お試しください。",
+ 			"projectDiscoveryFailed": "プロジェクトIDを発見できませんでした。'gemini auth'で認証されていることを確認してください。",
+ 			"rateLimitExceeded": "レート制限を超過しました。無料プランの制限に達しています。",
+ 			"badRequest": "不正なリクエスト: {{details}}",
+ 			"apiError": "Gemini CLI APIエラー: {{error}}",
+ 			"completionError": "Gemini CLI補完エラー: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API認証が失敗しました。APIキーが有効で期限切れではないことを確認してください。",
  			"accessForbidden": "Cerebras APIアクセスが禁止されています。あなたのAPIキーは要求されたモデルや機能にアクセスできない可能性があります。",
*** Roo-Code-3.28.0/src/i18n/locales/ko/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/ko/common.json	2025-09-11 17:40:28.526178920 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Gemini 완료 오류: {{error}}",
  			"sources": "출처:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "OAuth 자격 증명을 로드하지 못했습니다. 먼저 인증하세요: {{error}}",
+ 			"tokenRefreshFailed": "OAuth 토큰을 새로 고치지 못했습니다: {{error}}",
+ 			"onboardingTimeout": "온보딩 작업이 60초 후 시간 초과되었습니다. 나중에 다시 시도하세요.",
+ 			"projectDiscoveryFailed": "프로젝트 ID를 찾을 수 없습니다. 'gemini auth'로 인증되었는지 확인하세요.",
+ 			"rateLimitExceeded": "속도 제한을 초과했습니다. 무료 등급 제한에 도달했습니다.",
+ 			"badRequest": "잘못된 요청: {{details}}",
+ 			"apiError": "Gemini CLI API 오류: {{error}}",
+ 			"completionError": "Gemini CLI 완성 오류: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API 인증에 실패했습니다. API 키가 유효하고 만료되지 않았는지 확인하세요.",
  			"accessForbidden": "Cerebras API 액세스가 금지되었습니다. API 키가 요청된 모델이나 기능에 액세스할 수 없을 수 있습니다.",
*** Roo-Code-3.28.0/src/i18n/locales/nl/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/nl/common.json	2025-09-11 17:40:28.526252533 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Fout bij het voltooien door Gemini: {{error}}",
  			"sources": "Bronnen:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Kan OAuth-referenties niet laden. Authenticeer eerst: {{error}}",
+ 			"tokenRefreshFailed": "Kan OAuth-token niet vernieuwen: {{error}}",
+ 			"onboardingTimeout": "Onboarding-operatie is na 60 seconden verlopen. Probeer het later opnieuw.",
+ 			"projectDiscoveryFailed": "Kan project-ID niet ontdekken. Zorg ervoor dat je geauthenticeerd bent met 'gemini auth'.",
+ 			"rateLimitExceeded": "Snelheidslimiet overschreden. Gratis tier limieten zijn bereikt.",
+ 			"badRequest": "Ongeldig verzoek: {{details}}",
+ 			"apiError": "Gemini CLI API-fout: {{error}}",
+ 			"completionError": "Gemini CLI voltooiingsfout: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API-authenticatie mislukt. Controleer of je API-sleutel geldig is en niet verlopen.",
  			"accessForbidden": "Cerebras API-toegang geweigerd. Je API-sleutel heeft mogelijk geen toegang tot het gevraagde model of de functie.",
*** Roo-Code-3.28.0/src/i18n/locales/pl/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/pl/common.json	2025-09-11 17:40:28.526315460 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Błąd uzupełniania Gemini: {{error}}",
  			"sources": "Źródła:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Nie udało się załadować danych uwierzytelniających OAuth. Najpierw się uwierzytelnij: {{error}}",
+ 			"tokenRefreshFailed": "Nie udało się odświeżyć tokenu OAuth: {{error}}",
+ 			"onboardingTimeout": "Operacja wdrażania przekroczyła limit czasu po 60 sekundach. Spróbuj ponownie później.",
+ 			"projectDiscoveryFailed": "Nie można odkryć ID projektu. Upewnij się, że jesteś uwierzytelniony za pomocą 'gemini auth'.",
+ 			"rateLimitExceeded": "Przekroczono limit szybkości. Osiągnięto limity darmowego poziomu.",
+ 			"badRequest": "Nieprawidłowe żądanie: {{details}}",
+ 			"apiError": "Błąd API Gemini CLI: {{error}}",
+ 			"completionError": "Błąd uzupełniania Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Uwierzytelnianie API Cerebras nie powiodło się. Sprawdź, czy twój klucz API jest ważny i nie wygasł.",
  			"accessForbidden": "Dostęp do API Cerebras zabroniony. Twój klucz API może nie mieć dostępu do żądanego modelu lub funkcji.",
*** Roo-Code-3.28.0/src/i18n/locales/pt-BR/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/pt-BR/common.json	2025-09-11 17:40:28.526380762 +0200
***************
*** 105,110 ****
--- 105,120 ----
  			"generate_complete_prompt": "Erro de conclusão do Gemini: {{error}}",
  			"sources": "Fontes:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Falha ao carregar credenciais OAuth. Por favor, autentique-se primeiro: {{error}}",
+ 			"tokenRefreshFailed": "Falha ao atualizar token OAuth: {{error}}",
+ 			"onboardingTimeout": "A operação de integração expirou após 60 segundos. Por favor, tente novamente mais tarde.",
+ 			"projectDiscoveryFailed": "Não foi possível descobrir o ID do projeto. Certifique-se de estar autenticado com 'gemini auth'.",
+ 			"rateLimitExceeded": "Limite de taxa excedido. Os limites do nível gratuito foram atingidos.",
+ 			"badRequest": "Solicitação inválida: {{details}}",
+ 			"apiError": "Erro da API Gemini CLI: {{error}}",
+ 			"completionError": "Erro de conclusão do Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Falha na autenticação da API Cerebras. Verifique se sua chave de API é válida e não expirou.",
  			"accessForbidden": "Acesso à API Cerebras negado. Sua chave de API pode não ter acesso ao modelo ou recurso solicitado.",
*** Roo-Code-3.28.0/src/i18n/locales/ru/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/ru/common.json	2025-09-11 17:40:28.526457936 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Ошибка завершения Gemini: {{error}}",
  			"sources": "Источники:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Не удалось загрузить учетные данные OAuth. Сначала выполните аутентификацию: {{error}}",
+ 			"tokenRefreshFailed": "Не удалось обновить токен OAuth: {{error}}",
+ 			"onboardingTimeout": "Операция подключения истекла через 60 секунд. Пожалуйста, попробуйте позже.",
+ 			"projectDiscoveryFailed": "Не удалось обнаружить идентификатор проекта. Убедитесь, что вы аутентифицированы с помощью 'gemini auth'.",
+ 			"rateLimitExceeded": "Превышен лимит скорости. Достигнуты лимиты бесплатного уровня.",
+ 			"badRequest": "Неверный запрос: {{details}}",
+ 			"apiError": "Ошибка API Gemini CLI: {{error}}",
+ 			"completionError": "Ошибка завершения Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Ошибка аутентификации Cerebras API. Убедитесь, что ваш API-ключ действителен и не истек.",
  			"accessForbidden": "Доступ к Cerebras API запрещен. Ваш API-ключ может не иметь доступа к запрашиваемой модели или функции.",
*** Roo-Code-3.28.0/src/i18n/locales/tr/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/tr/common.json	2025-09-11 17:40:28.526526800 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Gemini tamamlama hatası: {{error}}",
  			"sources": "Kaynaklar:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "OAuth kimlik bilgileri yüklenemedi. Lütfen önce kimlik doğrulaması yapın: {{error}}",
+ 			"tokenRefreshFailed": "OAuth token yenilenemedi: {{error}}",
+ 			"onboardingTimeout": "Onboarding işlemi 60 saniye sonra zaman aşımına uğradı. Lütfen daha sonra tekrar deneyin.",
+ 			"projectDiscoveryFailed": "Proje ID'si keşfedilemedi. 'gemini auth' ile kimlik doğrulaması yaptığınızdan emin olun.",
+ 			"rateLimitExceeded": "Hız sınırı aşıldı. Ücretsiz seviye sınırlarına ulaşıldı.",
+ 			"badRequest": "Geçersiz istek: {{details}}",
+ 			"apiError": "Gemini CLI API hatası: {{error}}",
+ 			"completionError": "Gemini CLI tamamlama hatası: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API kimlik doğrulama başarısız oldu. API anahtarınızın geçerli olduğunu ve süresi dolmadığını kontrol edin.",
  			"accessForbidden": "Cerebras API erişimi yasak. API anahtarınız istenen modele veya özelliğe erişimi olmayabilir.",
*** Roo-Code-3.28.0/src/i18n/locales/vi/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/vi/common.json	2025-09-11 17:40:28.526589727 +0200
***************
*** 101,106 ****
--- 101,116 ----
  			"generate_complete_prompt": "Lỗi hoàn thành Gemini: {{error}}",
  			"sources": "Nguồn:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "Không thể tải thông tin xác thực OAuth. Vui lòng xác thực trước: {{error}}",
+ 			"tokenRefreshFailed": "Không thể làm mới token OAuth: {{error}}",
+ 			"onboardingTimeout": "Thao tác onboarding đã hết thời gian chờ sau 60 giây. Vui lòng thử lại sau.",
+ 			"projectDiscoveryFailed": "Không thể khám phá ID dự án. Đảm bảo bạn đã xác thực bằng 'gemini auth'.",
+ 			"rateLimitExceeded": "Đã vượt quá giới hạn tốc độ. Đã đạt đến giới hạn của gói miễn phí.",
+ 			"badRequest": "Yêu cầu không hợp lệ: {{details}}",
+ 			"apiError": "Lỗi API Gemini CLI: {{error}}",
+ 			"completionError": "Lỗi hoàn thành Gemini CLI: {{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Xác thực API Cerebras thất bại. Vui lòng kiểm tra khóa API của bạn có hợp lệ và chưa hết hạn.",
  			"accessForbidden": "Truy cập API Cerebras bị từ chối. Khóa API của bạn có thể không có quyền truy cập vào mô hình hoặc tính năng được yêu cầu.",
*** Roo-Code-3.28.0/src/i18n/locales/zh-CN/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/zh-CN/common.json	2025-09-11 17:40:28.526656216 +0200
***************
*** 106,111 ****
--- 106,121 ----
  			"generate_complete_prompt": "Gemini 完成错误:{{error}}",
  			"sources": "来源:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "加载 OAuth 凭据失败。请先进行身份验证:{{error}}",
+ 			"tokenRefreshFailed": "刷新 OAuth Token 失败:{{error}}",
+ 			"onboardingTimeout": "入门操作在 60 秒后超时。请稍后重试。",
+ 			"projectDiscoveryFailed": "无法发现项目 ID。请确保已使用 'gemini auth' 进行身份验证。",
+ 			"rateLimitExceeded": "API 请求频率限制已超出。免费层级限制已达到。",
+ 			"badRequest": "请求错误:{{details}}",
+ 			"apiError": "Gemini CLI API 错误:{{error}}",
+ 			"completionError": "Gemini CLI 补全错误:{{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API 身份验证失败。请检查你的 API 密钥是否有效且未过期。",
  			"accessForbidden": "Cerebras API 访问被禁止。你的 API 密钥可能无法访问请求的模型或功能。",
*** Roo-Code-3.28.0/src/i18n/locales/zh-TW/common.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/i18n/locales/zh-TW/common.json	2025-09-11 17:40:28.526717956 +0200
***************
*** 100,105 ****
--- 100,115 ----
  			"generate_complete_prompt": "Gemini 完成錯誤:{{error}}",
  			"sources": "來源:"
  		},
+ 		"geminiCli": {
+ 			"oauthLoadFailed": "無法載入 OAuth 憑證。請先進行驗證:{{error}}",
+ 			"tokenRefreshFailed": "無法重新整理 OAuth 權杖:{{error}}",
+ 			"onboardingTimeout": "新手導引操作在 60 秒後逾時。請稍後再試。",
+ 			"projectDiscoveryFailed": "無法發現專案 ID。請確保您已使用 'gemini auth' 進行驗證。",
+ 			"rateLimitExceeded": "超過速率限制。已達到免費層級限制。",
+ 			"badRequest": "錯誤的請求:{{details}}",
+ 			"apiError": "Gemini CLI API 錯誤:{{error}}",
+ 			"completionError": "Gemini CLI 完成錯誤:{{error}}"
+ 		},
  		"cerebras": {
  			"authenticationFailed": "Cerebras API 驗證失敗。請檢查您的 API 金鑰是否有效且未過期。",
  			"accessForbidden": "Cerebras API 存取被拒絕。您的 API 金鑰可能無法存取所請求的模型或功能。",
*** Roo-Code-3.28.0/src/shared/checkExistApiConfig.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/src/shared/checkExistApiConfig.ts	2025-09-11 17:40:28.526774947 +0200
***************
*** 5,14 ****
  		return false
  	}
  
! 	// Special case for human-relay, fake-ai, claude-code, qwen-code, and roo providers which don't need any configuration.
  	if (
  		config.apiProvider &&
! 		["human-relay", "fake-ai", "claude-code", "qwen-code", "roo"].includes(config.apiProvider)
  	) {
  		return true
  	}
--- 5,14 ----
  		return false
  	}
  
! 	// Special case for human-relay, fake-ai, claude-code, qwen-code, gemini-cli, and roo providers which don't need any configuration.
  	if (
  		config.apiProvider &&
! 		["human-relay", "fake-ai", "claude-code", "qwen-code", "gemini-cli", "roo"].includes(config.apiProvider)
  	) {
  		return true
  	}
*** Roo-Code-3.28.0/webview-ui/src/components/settings/ApiOptions.tsx	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/components/settings/ApiOptions.tsx	2025-09-11 17:40:28.526852121 +0200
***************
*** 19,24 ****
--- 19,25 ----
  	claudeCodeDefaultModelId,
  	qwenCodeDefaultModelId,
  	geminiDefaultModelId,
+ 	geminiCliDefaultModelId,
  	deepSeekDefaultModelId,
  	moonshotDefaultModelId,
  	mistralDefaultModelId,
***************
*** 71,76 ****
--- 72,78 ----
  	DeepSeek,
  	Doubao,
  	Gemini,
+ 	GeminiCli,
  	Glama,
  	Groq,
  	HuggingFace,
***************
*** 323,328 ****
--- 325,331 ----
  				"qwen-code": { field: "apiModelId", default: qwenCodeDefaultModelId },
  				"openai-native": { field: "apiModelId", default: openAiNativeDefaultModelId },
  				gemini: { field: "apiModelId", default: geminiDefaultModelId },
+ 				"gemini-cli": { field: "apiModelId", default: geminiCliDefaultModelId },
  				deepseek: { field: "apiModelId", default: deepSeekDefaultModelId },
  				doubao: { field: "apiModelId", default: doubaoDefaultModelId },
  				moonshot: { field: "apiModelId", default: moonshotDefaultModelId },
***************
*** 549,554 ****
--- 552,561 ----
  				/>
  			)}
  
+ 			{selectedProvider === "gemini-cli" && (
+ 				<GeminiCli apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
+ 			)}
+ 
  			{selectedProvider === "openai" && (
  				<OpenAICompatible
  					apiConfiguration={apiConfiguration}
*** Roo-Code-3.28.0/webview-ui/src/components/settings/constants.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/components/settings/constants.ts	2025-09-11 17:40:28.526918610 +0200
***************
*** 8,13 ****
--- 8,14 ----
  	deepSeekModels,
  	moonshotModels,
  	geminiModels,
+ 	geminiCliModels,
  	mistralModels,
  	openAiNativeModels,
  	qwenCodeModels,
***************
*** 32,37 ****
--- 33,39 ----
  	doubao: doubaoModels,
  	moonshot: moonshotModels,
  	gemini: geminiModels,
+ 	"gemini-cli": geminiCliModels,
  	mistral: mistralModels,
  	"openai-native": openAiNativeModels,
  	"qwen-code": qwenCodeModels,
***************
*** 53,58 ****
--- 55,61 ----
  	{ value: "claude-code", label: "Claude Code" },
  	{ value: "cerebras", label: "Cerebras" },
  	{ value: "gemini", label: "Google Gemini" },
+ 	{ value: "gemini-cli", label: "Gemini CLI" },
  	{ value: "doubao", label: "Doubao" },
  	{ value: "deepseek", label: "DeepSeek" },
  	{ value: "moonshot", label: "Moonshot" },
*** /dev/null	2025-09-08 17:49:14.163141544 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/components/settings/providers/GeminiCli.tsx	2025-09-11 17:40:28.526973226 +0200
***************
*** 0 ****
--- 1,81 ----
+ import { useCallback } from "react"
+ import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
+ 
+ import type { ProviderSettings } from "@roo-code/types"
+ 
+ import { useAppTranslation } from "@src/i18n/TranslationContext"
+ import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
+ 
+ import { inputEventTransform } from "../transforms"
+ 
+ type GeminiCliProps = {
+ 	apiConfiguration: ProviderSettings
+ 	setApiConfigurationField: (field: keyof ProviderSettings, value: ProviderSettings[keyof ProviderSettings]) => void
+ }
+ 
+ export const GeminiCli = ({ apiConfiguration, setApiConfigurationField }: GeminiCliProps) => {
+ 	const { t } = useAppTranslation()
+ 
+ 	const handleInputChange = useCallback(
+ 		<K extends keyof ProviderSettings, E>(
+ 			field: K,
+ 			transform: (event: E) => ProviderSettings[K] = inputEventTransform,
+ 		) =>
+ 			(event: E | Event) => {
+ 				setApiConfigurationField(field, transform(event as E))
+ 			},
+ 		[setApiConfigurationField],
+ 	)
+ 
+ 	return (
+ 		<>
+ 			<VSCodeTextField
+ 				value={apiConfiguration?.geminiCliOAuthPath || ""}
+ 				onInput={handleInputChange("geminiCliOAuthPath")}
+ 				placeholder="~/.gemini/oauth_creds.json"
+ 				className="w-full">
+ 				<label className="block font-medium mb-1">{t("settings:providers.geminiCli.oauthPath")}</label>
+ 			</VSCodeTextField>
+ 			<div className="text-sm text-vscode-descriptionForeground -mt-2">
+ 				{t("settings:providers.geminiCli.oauthPathDescription")}
+ 			</div>
+ 
+ 			<div className="text-sm text-vscode-descriptionForeground mt-3">
+ 				{t("settings:providers.geminiCli.description")}
+ 			</div>
+ 
+ 			<div className="text-sm text-vscode-descriptionForeground mt-2">
+ 				{t("settings:providers.geminiCli.instructions")}{" "}
+ 				<code className="text-vscode-textPreformat-foreground">gemini</code>{" "}
+ 				{t("settings:providers.geminiCli.instructionsContinued")}
+ 			</div>
+ 
+ 			<VSCodeLink
+ 				href="https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#quickstart"
+ 				className="text-vscode-textLink-foreground hover:text-vscode-textLink-activeForeground mt-2 inline-block">
+ 				{t("settings:providers.geminiCli.setupLink")}
+ 			</VSCodeLink>
+ 
+ 			<div className="mt-3 p-3 bg-vscode-editorWidget-background border border-vscode-editorWidget-border rounded">
+ 				<div className="flex items-center gap-2 mb-2">
+ 					<i className="codicon codicon-warning text-vscode-notificationsWarningIcon-foreground" />
+ 					<span className="font-semibold text-sm">{t("settings:providers.geminiCli.requirementsTitle")}</span>
+ 				</div>
+ 				<ul className="list-disc list-inside space-y-1 text-sm text-vscode-descriptionForeground">
+ 					<li>{t("settings:providers.geminiCli.requirement1")}</li>
+ 					<li>{t("settings:providers.geminiCli.requirement2")}</li>
+ 					<li>{t("settings:providers.geminiCli.requirement3")}</li>
+ 					<li>{t("settings:providers.geminiCli.requirement4")}</li>
+ 					<li>{t("settings:providers.geminiCli.requirement5")}</li>
+ 				</ul>
+ 			</div>
+ 
+ 			<div className="mt-3 flex items-center gap-2">
+ 				<i className="codicon codicon-check text-vscode-notificationsInfoIcon-foreground" />
+ 				<span className="text-sm text-vscode-descriptionForeground">
+ 					{t("settings:providers.geminiCli.freeAccess")}
+ 				</span>
+ 			</div>
+ 		</>
+ 	)
+ }
*** /dev/null	2025-09-08 17:49:14.163141544 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/components/settings/providers/__tests__/GeminiCli.spec.tsx	2025-09-11 17:40:28.527052776 +0200
***************
*** 0 ****
--- 1,169 ----
+ import { render, screen, fireEvent } from "@testing-library/react"
+ import { describe, it, expect, vi } from "vitest"
+ 
+ import type { ProviderSettings } from "@roo-code/types"
+ 
+ import { GeminiCli } from "../GeminiCli"
+ 
+ // Mock the translation hook
+ vi.mock("@src/i18n/TranslationContext", () => ({
+ 	useAppTranslation: () => ({
+ 		t: (key: string) => key,
+ 	}),
+ }))
+ 
+ // Mock VSCodeLink to render as a regular anchor tag
+ vi.mock("@vscode/webview-ui-toolkit/react", async () => {
+ 	const actual = await vi.importActual("@vscode/webview-ui-toolkit/react")
+ 	return {
+ 		...actual,
+ 		VSCodeLink: ({ children, href, ...props }: any) => (
+ 			<a href={href} {...props}>
+ 				{children}
+ 			</a>
+ 		),
+ 	}
+ })
+ 
+ describe("GeminiCli", () => {
+ 	const mockSetApiConfigurationField = vi.fn()
+ 	const defaultProps = {
+ 		apiConfiguration: {} as ProviderSettings,
+ 		setApiConfigurationField: mockSetApiConfigurationField,
+ 	}
+ 
+ 	beforeEach(() => {
+ 		vi.clearAllMocks()
+ 	})
+ 
+ 	it("renders all required elements", () => {
+ 		render(<GeminiCli {...defaultProps} />)
+ 
+ 		// Check for OAuth path input
+ 		expect(screen.getByText("settings:providers.geminiCli.oauthPath")).toBeInTheDocument()
+ 		expect(screen.getByPlaceholderText("~/.gemini/oauth_creds.json")).toBeInTheDocument()
+ 
+ 		// Check for description text
+ 		expect(screen.getByText("settings:providers.geminiCli.description")).toBeInTheDocument()
+ 
+ 		// Check for instructions - they're in the same div but broken up by the code element
+ 		// Find all elements that contain the instruction parts
+ 		const instructionsDivs = screen.getAllByText((_content, element) => {
+ 			// Check if this element contains all the expected text parts
+ 			const fullText = element?.textContent || ""
+ 			return (
+ 				fullText.includes("settings:providers.geminiCli.instructions") &&
+ 				fullText.includes("gemini") &&
+ 				fullText.includes("settings:providers.geminiCli.instructionsContinued")
+ 			)
+ 		})
+ 		// Find the div with the correct classes
+ 		const instructionsDiv = instructionsDivs.find(
+ 			(div) =>
+ 				div.classList.contains("text-sm") &&
+ 				div.classList.contains("text-vscode-descriptionForeground") &&
+ 				div.classList.contains("mt-2"),
+ 		)
+ 		expect(instructionsDiv).toBeDefined()
+ 		expect(instructionsDiv).toBeInTheDocument()
+ 
+ 		// Also verify the code element exists
+ 		const codeElement = screen.getByText("gemini")
+ 		expect(codeElement).toBeInTheDocument()
+ 		expect(codeElement.tagName).toBe("CODE")
+ 
+ 		// Check for setup link
+ 		expect(screen.getByText("settings:providers.geminiCli.setupLink")).toBeInTheDocument()
+ 
+ 		// Check for requirements
+ 		expect(screen.getByText("settings:providers.geminiCli.requirementsTitle")).toBeInTheDocument()
+ 		expect(screen.getByText("settings:providers.geminiCli.requirement1")).toBeInTheDocument()
+ 		expect(screen.getByText("settings:providers.geminiCli.requirement2")).toBeInTheDocument()
+ 		expect(screen.getByText("settings:providers.geminiCli.requirement3")).toBeInTheDocument()
+ 		expect(screen.getByText("settings:providers.geminiCli.requirement4")).toBeInTheDocument()
+ 		expect(screen.getByText("settings:providers.geminiCli.requirement5")).toBeInTheDocument()
+ 
+ 		// Check for free access note
+ 		expect(screen.getByText("settings:providers.geminiCli.freeAccess")).toBeInTheDocument()
+ 	})
+ 
+ 	it("displays OAuth path from configuration", () => {
+ 		const apiConfiguration: ProviderSettings = {
+ 			geminiCliOAuthPath: "/custom/path/oauth.json",
+ 		}
+ 
+ 		render(<GeminiCli {...defaultProps} apiConfiguration={apiConfiguration} />)
+ 
+ 		const oauthInput = screen.getByDisplayValue("/custom/path/oauth.json")
+ 		expect(oauthInput).toBeInTheDocument()
+ 	})
+ 
+ 	it("calls setApiConfigurationField when OAuth path is changed", () => {
+ 		render(<GeminiCli {...defaultProps} />)
+ 
+ 		const oauthInput = screen.getByPlaceholderText("~/.gemini/oauth_creds.json")
+ 
+ 		// Simulate input event with VSCodeTextField
+ 		fireEvent.input(oauthInput, { target: { value: "/new/path.json" } })
+ 
+ 		// Check that setApiConfigurationField was called
+ 		expect(mockSetApiConfigurationField).toHaveBeenCalledWith("geminiCliOAuthPath", "/new/path.json")
+ 	})
+ 
+ 	it("renders setup link with correct href", () => {
+ 		render(<GeminiCli {...defaultProps} />)
+ 
+ 		const setupLink = screen.getByText("settings:providers.geminiCli.setupLink")
+ 		expect(setupLink).toHaveAttribute(
+ 			"href",
+ 			"https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#quickstart",
+ 		)
+ 	})
+ 
+ 	it("shows OAuth path description", () => {
+ 		render(<GeminiCli {...defaultProps} />)
+ 
+ 		expect(screen.getByText("settings:providers.geminiCli.oauthPathDescription")).toBeInTheDocument()
+ 	})
+ 
+ 	it("renders all requirements in a list", () => {
+ 		render(<GeminiCli {...defaultProps} />)
+ 
+ 		const listItems = screen.getAllByRole("listitem")
+ 		expect(listItems).toHaveLength(5)
+ 		expect(listItems[0]).toHaveTextContent("settings:providers.geminiCli.requirement1")
+ 		expect(listItems[1]).toHaveTextContent("settings:providers.geminiCli.requirement2")
+ 		expect(listItems[2]).toHaveTextContent("settings:providers.geminiCli.requirement3")
+ 		expect(listItems[3]).toHaveTextContent("settings:providers.geminiCli.requirement4")
+ 		expect(listItems[4]).toHaveTextContent("settings:providers.geminiCli.requirement5")
+ 	})
+ 
+ 	it("applies correct styling classes", () => {
+ 		render(<GeminiCli {...defaultProps} />)
+ 
+ 		// Check for styled warning box
+ 		const warningBox = screen.getByText("settings:providers.geminiCli.requirementsTitle").closest("div.mt-3")
+ 		expect(warningBox).toHaveClass("bg-vscode-editorWidget-background")
+ 		expect(warningBox).toHaveClass("border-vscode-editorWidget-border")
+ 		expect(warningBox).toHaveClass("rounded")
+ 		expect(warningBox).toHaveClass("p-3")
+ 
+ 		// Check for warning icon
+ 		const warningIcon = screen.getByText("settings:providers.geminiCli.requirementsTitle").previousElementSibling
+ 		expect(warningIcon).toHaveClass("codicon-warning")
+ 		expect(warningIcon).toHaveClass("text-vscode-notificationsWarningIcon-foreground")
+ 
+ 		// Check for check icon
+ 		const checkIcon = screen.getByText("settings:providers.geminiCli.freeAccess").previousElementSibling
+ 		expect(checkIcon).toHaveClass("codicon-check")
+ 		expect(checkIcon).toHaveClass("text-vscode-notificationsInfoIcon-foreground")
+ 	})
+ 
+ 	it("renders instructions with code element", () => {
+ 		render(<GeminiCli {...defaultProps} />)
+ 
+ 		const codeElement = screen.getByText("gemini")
+ 		expect(codeElement.tagName).toBe("CODE")
+ 		expect(codeElement).toHaveClass("text-vscode-textPreformat-foreground")
+ 	})
+ })
*** Roo-Code-3.28.0/webview-ui/src/components/settings/providers/index.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/components/settings/providers/index.ts	2025-09-11 17:40:28.527090769 +0200
***************
*** 6,11 ****
--- 6,12 ----
  export { DeepSeek } from "./DeepSeek"
  export { Doubao } from "./Doubao"
  export { Gemini } from "./Gemini"
+ export { GeminiCli } from "./GeminiCli"
  export { Glama } from "./Glama"
  export { Groq } from "./Groq"
  export { HuggingFace } from "./HuggingFace"
*** Roo-Code-3.28.0/webview-ui/src/components/ui/hooks/useSelectedModel.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/components/ui/hooks/useSelectedModel.ts	2025-09-11 17:40:28.527140636 +0200
***************
*** 14,19 ****
--- 14,21 ----
  	moonshotModels,
  	geminiDefaultModelId,
  	geminiModels,
+ 	geminiCliDefaultModelId,
+ 	geminiCliModels,
  	mistralDefaultModelId,
  	mistralModels,
  	openAiModelInfoSaneDefaults,
***************
*** 222,227 ****
--- 224,234 ----
  			const info = geminiModels[id as keyof typeof geminiModels]
  			return { id, info }
  		}
+ 		case "gemini-cli": {
+ 			const id = apiConfiguration.apiModelId ?? geminiCliDefaultModelId
+ 			const info = geminiCliModels[id as keyof typeof geminiCliModels]
+ 			return { id, info }
+ 		}
  		case "deepseek": {
  			const id = apiConfiguration.apiModelId ?? deepSeekDefaultModelId
  			const info = deepSeekModels[id as keyof typeof deepSeekModels]
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/ca/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/ca/settings.json	2025-09-11 17:40:28.527245119 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Per defecte: claude",
  			"maxTokensLabel": "Tokens màxims de sortida",
  			"maxTokensDescription": "Nombre màxim de tokens de sortida per a les respostes de Claude Code. El valor per defecte és 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Aquest proveïdor utilitza l'autenticació OAuth de l'eina Gemini CLI i no requereix claus d'API.",
+ 			"oauthPath": "Ruta de Credencials OAuth (opcional)",
+ 			"oauthPathDescription": "Ruta al fitxer de credencials OAuth. Deixa buit per utilitzar la ubicació per defecte (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Si encara no t'has autenticat, executa",
+ 			"instructionsContinued": "al teu terminal primer.",
+ 			"setupLink": "Instruccions de Configuració de Gemini CLI",
+ 			"requirementsTitle": "Requisits Importants",
+ 			"requirement1": "Primer, necessites instal·lar l'eina Gemini CLI",
+ 			"requirement2": "Després, executa gemini al teu terminal i assegura't d'iniciar sessió amb Google",
+ 			"requirement3": "Només funciona amb comptes personals de Google (no comptes de Google Workspace)",
+ 			"requirement4": "No utilitza claus d'API - l'autenticació es gestiona via OAuth",
+ 			"requirement5": "Requereix que l'eina Gemini CLI estigui instal·lada i autenticada primer",
+ 			"freeAccess": "Accés gratuït via autenticació OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/de/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/de/settings.json	2025-09-11 17:40:28.527359100 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Standard: claude",
  			"maxTokensLabel": "Maximale Ausgabe-Tokens",
  			"maxTokensDescription": "Maximale Anzahl an Ausgabe-Tokens für Claude Code-Antworten. Standard ist 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Dieser Anbieter verwendet OAuth-Authentifizierung vom Gemini CLI-Tool und benötigt keine API-Schlüssel.",
+ 			"oauthPath": "OAuth-Anmeldedaten-Pfad (optional)",
+ 			"oauthPathDescription": "Pfad zur OAuth-Anmeldedaten-Datei. Leer lassen, um den Standardort zu verwenden (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Falls du dich noch nicht authentifiziert hast, führe bitte",
+ 			"instructionsContinued": "in deinem Terminal zuerst aus.",
+ 			"setupLink": "Gemini CLI Setup-Anweisungen",
+ 			"requirementsTitle": "Wichtige Anforderungen",
+ 			"requirement1": "Zuerst musst du das Gemini CLI-Tool installieren",
+ 			"requirement2": "Dann führe gemini in deinem Terminal aus und stelle sicher, dass du dich mit Google anmeldest",
+ 			"requirement3": "Funktioniert nur mit persönlichen Google-Konten (nicht mit Google Workspace-Konten)",
+ 			"requirement4": "Verwendet keine API-Schlüssel - Authentifizierung wird über OAuth abgewickelt",
+ 			"requirement5": "Erfordert, dass das Gemini CLI-Tool zuerst installiert und authentifiziert wird",
+ 			"freeAccess": "Kostenloser Zugang über OAuth-Authentifizierung"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/en/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/en/settings.json	2025-09-11 17:40:28.527451710 +0200
***************
*** 470,475 ****
--- 470,490 ----
  			"placeholder": "Default: claude",
  			"maxTokensLabel": "Max Output Tokens",
  			"maxTokensDescription": "Maximum number of output tokens for Claude Code responses. Default is 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "This provider uses OAuth authentication from the Gemini CLI tool and does not require API keys.",
+ 			"oauthPath": "OAuth Credentials Path (optional)",
+ 			"oauthPathDescription": "Path to the OAuth credentials file. Leave empty to use the default location (~/.gemini/oauth_creds.json).",
+ 			"instructions": "If you haven't authenticated yet, please run",
+ 			"instructionsContinued": "in your terminal first.",
+ 			"setupLink": "Gemini CLI Setup Instructions",
+ 			"requirementsTitle": "Important Requirements",
+ 			"requirement1": "First, you need to install the Gemini CLI tool",
+ 			"requirement2": "Then, run gemini in your terminal and make sure you Log in with Google",
+ 			"requirement3": "Only works with personal Google accounts (not Google Workspace accounts)",
+ 			"requirement4": "Does not use API keys - authentication is handled via OAuth",
+ 			"requirement5": "Requires the Gemini CLI tool to be installed and authenticated first",
+ 			"freeAccess": "Free tier access via OAuth authentication"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/es/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/es/settings.json	2025-09-11 17:40:28.527543132 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Por defecto: claude",
  			"maxTokensLabel": "Tokens máximos de salida",
  			"maxTokensDescription": "Número máximo de tokens de salida para las respuestas de Claude Code. El valor predeterminado es 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Este proveedor usa autenticación OAuth de la herramienta Gemini CLI y no requiere claves API.",
+ 			"oauthPath": "Ruta de Credenciales OAuth (opcional)",
+ 			"oauthPathDescription": "Ruta al archivo de credenciales OAuth. Deja vacío para usar la ubicación predeterminada (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Si aún no te has autenticado, por favor ejecuta",
+ 			"instructionsContinued": "en tu terminal primero.",
+ 			"setupLink": "Instrucciones de Configuración de Gemini CLI",
+ 			"requirementsTitle": "Requisitos Importantes",
+ 			"requirement1": "Primero, necesitas instalar la herramienta Gemini CLI",
+ 			"requirement2": "Luego, ejecuta gemini en tu terminal y asegúrate de iniciar sesión con Google",
+ 			"requirement3": "Solo funciona con cuentas personales de Google (no cuentas de Google Workspace)",
+ 			"requirement4": "No usa claves API - la autenticación se maneja vía OAuth",
+ 			"requirement5": "Requiere que la herramienta Gemini CLI esté instalada y autenticada primero",
+ 			"freeAccess": "Acceso gratuito vía autenticación OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/fr/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/fr/settings.json	2025-09-11 17:40:28.527638116 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Défaut : claude",
  			"maxTokensLabel": "Jetons de sortie max",
  			"maxTokensDescription": "Nombre maximum de jetons de sortie pour les réponses de Claude Code. La valeur par défaut est 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Ce fournisseur utilise l'authentification OAuth de l'outil Gemini CLI et ne nécessite pas de clés API.",
+ 			"oauthPath": "Chemin des Identifiants OAuth (optionnel)",
+ 			"oauthPathDescription": "Chemin vers le fichier d'identifiants OAuth. Laissez vide pour utiliser l'emplacement par défaut (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Si vous ne vous êtes pas encore authentifié, veuillez exécuter",
+ 			"instructionsContinued": "dans votre terminal d'abord.",
+ 			"setupLink": "Instructions de Configuration Gemini CLI",
+ 			"requirementsTitle": "Exigences Importantes",
+ 			"requirement1": "D'abord, vous devez installer l'outil Gemini CLI",
+ 			"requirement2": "Ensuite, exécutez gemini dans votre terminal et assurez-vous de vous connecter avec Google",
+ 			"requirement3": "Fonctionne uniquement avec les comptes Google personnels (pas les comptes Google Workspace)",
+ 			"requirement4": "N'utilise pas de clés API - l'authentification est gérée via OAuth",
+ 			"requirement5": "Nécessite que l'outil Gemini CLI soit installé et authentifié d'abord",
+ 			"freeAccess": "Accès gratuit via l'authentification OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/hi/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/hi/settings.json	2025-09-11 17:40:28.527769907 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "डिफ़ॉल्ट: claude",
  			"maxTokensLabel": "अधिकतम आउटपुट टोकन",
  			"maxTokensDescription": "Claude Code प्रतिक्रियाओं के लिए आउटपुट टोकन की अधिकतम संख्या। डिफ़ॉल्ट 8000 है।"
+ 		},
+ 		"geminiCli": {
+ 			"description": "यह प्रदाता Gemini CLI टूल से OAuth प्रमाणीकरण का उपयोग करता है और API कुंजियों की आवश्यकता नहीं है।",
+ 			"oauthPath": "OAuth क्रेडेंशियल पथ (वैकल्पिक)",
+ 			"oauthPathDescription": "OAuth क्रेडेंशियल फ़ाइल का पथ। डिफ़ॉल्ट स्थान (~/.gemini/oauth_creds.json) का उपयोग करने के लिए खाली छोड़ें।",
+ 			"instructions": "यदि आपने अभी तक प्रमाणीकरण नहीं किया है, तो कृपया पहले",
+ 			"instructionsContinued": "को अपने टर्मिनल में चलाएं।",
+ 			"setupLink": "Gemini CLI सेटअप निर्देश",
+ 			"requirementsTitle": "महत्वपूर्ण आवश्यकताएं",
+ 			"requirement1": "पहले, आपको Gemini CLI टूल इंस्टॉल करना होगा",
+ 			"requirement2": "फिर, अपने टर्मिनल में gemini चलाएं और सुनिश्चित करें कि आप Google से लॉग इन करें",
+ 			"requirement3": "केवल व्यक्तिगत Google खातों के साथ काम करता है (Google Workspace खाते नहीं)",
+ 			"requirement4": "API कुंजियों का उपयोग नहीं करता - प्रमाणीकरण OAuth के माध्यम से संभाला जाता है",
+ 			"requirement5": "Gemini CLI टूल को पहले इंस्टॉल और प्रमाणित करने की आवश्यकता है",
+ 			"freeAccess": "OAuth प्रमाणीकरण के माध्यम से मुफ्त पहुंच"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/id/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/id/settings.json	2025-09-11 17:40:28.527892199 +0200
***************
*** 475,480 ****
--- 475,495 ----
  			"placeholder": "Default: claude",
  			"maxTokensLabel": "Token Output Maks",
  			"maxTokensDescription": "Jumlah maksimum token output untuk respons Claude Code. Default adalah 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Penyedia ini menggunakan autentikasi OAuth dari alat Gemini CLI dan tidak memerlukan kunci API.",
+ 			"oauthPath": "Jalur Kredensial OAuth (opsional)",
+ 			"oauthPathDescription": "Jalur ke file kredensial OAuth. Biarkan kosong untuk menggunakan lokasi default (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Jika Anda belum melakukan autentikasi, jalankan",
+ 			"instructionsContinued": "di terminal Anda terlebih dahulu.",
+ 			"setupLink": "Petunjuk Pengaturan Gemini CLI",
+ 			"requirementsTitle": "Persyaratan Penting",
+ 			"requirement1": "Pertama, Anda perlu menginstal alat Gemini CLI",
+ 			"requirement2": "Kemudian, jalankan gemini di terminal Anda dan pastikan Anda masuk dengan Google",
+ 			"requirement3": "Hanya berfungsi dengan akun Google pribadi (bukan akun Google Workspace)",
+ 			"requirement4": "Tidak menggunakan kunci API - autentikasi ditangani melalui OAuth",
+ 			"requirement5": "Memerlukan alat Gemini CLI diinstal dan diautentikasi terlebih dahulu",
+ 			"freeAccess": "Akses gratis melalui autentikasi OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/it/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/it/settings.json	2025-09-11 17:40:28.527987184 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Predefinito: claude",
  			"maxTokensLabel": "Token di output massimi",
  			"maxTokensDescription": "Numero massimo di token di output per le risposte di Claude Code. Il valore predefinito è 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Questo provider utilizza l'autenticazione OAuth dallo strumento Gemini CLI e non richiede chiavi API.",
+ 			"oauthPath": "Percorso Credenziali OAuth (opzionale)",
+ 			"oauthPathDescription": "Percorso al file delle credenziali OAuth. Lascia vuoto per utilizzare la posizione predefinita (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Se non ti sei ancora autenticato, esegui",
+ 			"instructionsContinued": "nel tuo terminale prima.",
+ 			"setupLink": "Istruzioni di Configurazione Gemini CLI",
+ 			"requirementsTitle": "Requisiti Importanti",
+ 			"requirement1": "Prima, devi installare lo strumento Gemini CLI",
+ 			"requirement2": "Poi, esegui gemini nel tuo terminale e assicurati di accedere con Google",
+ 			"requirement3": "Funziona solo con account Google personali (non account Google Workspace)",
+ 			"requirement4": "Non utilizza chiavi API - l'autenticazione è gestita tramite OAuth",
+ 			"requirement5": "Richiede che lo strumento Gemini CLI sia installato e autenticato prima",
+ 			"freeAccess": "Accesso gratuito tramite autenticazione OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/ja/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/ja/settings.json	2025-09-11 17:40:28.528079793 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "デフォルト:claude",
  			"maxTokensLabel": "最大出力トークン",
  			"maxTokensDescription": "Claude Codeレスポンスの最大出力トークン数。デフォルトは8000です。"
+ 		},
+ 		"geminiCli": {
+ 			"description": "このプロバイダーはGemini CLIツールからのOAuth認証を使用し、APIキーは必要ありません。",
+ 			"oauthPath": "OAuth認証情報パス(オプション)",
+ 			"oauthPathDescription": "OAuth認証情報ファイルへのパス。デフォルトの場所(~/.gemini/oauth_creds.json)を使用する場合は空のままにしてください。",
+ 			"instructions": "まだ認証していない場合は、まず",
+ 			"instructionsContinued": "をターミナルで実行してください。",
+ 			"setupLink": "Gemini CLI セットアップ手順",
+ 			"requirementsTitle": "重要な要件",
+ 			"requirement1": "まず、Gemini CLIツールをインストールする必要があります",
+ 			"requirement2": "次に、ターミナルでgeminiを実行し、Googleでログインすることを確認してください",
+ 			"requirement3": "個人のGoogleアカウントでのみ動作します(Google Workspaceアカウントは不可)",
+ 			"requirement4": "APIキーは使用しません - 認証はOAuthで処理されます",
+ 			"requirement5": "Gemini CLIツールが最初にインストールされ、認証されている必要があります",
+ 			"freeAccess": "OAuth認証による無料アクセス"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/ko/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/ko/settings.json	2025-09-11 17:40:28.528172403 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "기본값: claude",
  			"maxTokensLabel": "최대 출력 토큰",
  			"maxTokensDescription": "Claude Code 응답의 최대 출력 토큰 수. 기본값은 8000입니다."
+ 		},
+ 		"geminiCli": {
+ 			"description": "이 공급자는 Gemini CLI 도구의 OAuth 인증을 사용하며 API 키가 필요하지 않습니다.",
+ 			"oauthPath": "OAuth 자격 증명 경로 (선택사항)",
+ 			"oauthPathDescription": "OAuth 자격 증명 파일의 경로입니다. 기본 위치(~/.gemini/oauth_creds.json)를 사용하려면 비워두세요.",
+ 			"instructions": "아직 인증하지 않았다면",
+ 			"instructionsContinued": "를 터미널에서 먼저 실행하세요.",
+ 			"setupLink": "Gemini CLI 설정 지침",
+ 			"requirementsTitle": "중요한 요구사항",
+ 			"requirement1": "먼저 Gemini CLI 도구를 설치해야 합니다",
+ 			"requirement2": "그 다음 터미널에서 gemini를 실행하고 Google로 로그인했는지 확인하세요",
+ 			"requirement3": "개인 Google 계정에서만 작동합니다 (Google Workspace 계정 불가)",
+ 			"requirement4": "API 키를 사용하지 않습니다 - 인증은 OAuth를 통해 처리됩니다",
+ 			"requirement5": "Gemini CLI 도구가 먼저 설치되고 인증되어야 합니다",
+ 			"freeAccess": "OAuth 인증을 통한 무료 액세스"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/nl/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/nl/settings.json	2025-09-11 17:40:28.528280448 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Standaard: claude",
  			"maxTokensLabel": "Max Output Tokens",
  			"maxTokensDescription": "Maximaal aantal output-tokens voor Claude Code-reacties. Standaard is 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Deze provider gebruikt OAuth-authenticatie van de Gemini CLI-tool en vereist geen API-sleutels.",
+ 			"oauthPath": "OAuth-referentiepad (optioneel)",
+ 			"oauthPathDescription": "Pad naar het OAuth-referentiebestand. Laat leeg om de standaardlocatie te gebruiken (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Als je nog niet bent geauthenticeerd, voer dan eerst",
+ 			"instructionsContinued": "uit in je terminal.",
+ 			"setupLink": "Gemini CLI Setup-instructies",
+ 			"requirementsTitle": "Belangrijke vereisten",
+ 			"requirement1": "Eerst moet je de Gemini CLI-tool installeren",
+ 			"requirement2": "Voer vervolgens gemini uit in je terminal en zorg ervoor dat je inlogt met Google",
+ 			"requirement3": "Werkt alleen met persoonlijke Google-accounts (geen Google Workspace-accounts)",
+ 			"requirement4": "Gebruikt geen API-sleutels - authenticatie wordt afgehandeld via OAuth",
+ 			"requirement5": "Vereist dat de Gemini CLI-tool eerst wordt geïnstalleerd en geauthenticeerd",
+ 			"freeAccess": "Gratis toegang via OAuth-authenticatie"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/pl/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/pl/settings.json	2025-09-11 17:40:28.528369495 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Domyślnie: claude",
  			"maxTokensLabel": "Maksymalna liczba tokenów wyjściowych",
  			"maxTokensDescription": "Maksymalna liczba tokenów wyjściowych dla odpowiedzi Claude Code. Domyślnie 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Ten dostawca używa uwierzytelniania OAuth z narzędzia Gemini CLI i nie wymaga kluczy API.",
+ 			"oauthPath": "Ścieżka danych uwierzytelniających OAuth (opcjonalne)",
+ 			"oauthPathDescription": "Ścieżka do pliku danych uwierzytelniających OAuth. Pozostaw puste, aby użyć domyślnej lokalizacji (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Jeśli jeszcze się nie uwierzytelniłeś, uruchom najpierw",
+ 			"instructionsContinued": "w swoim terminalu.",
+ 			"setupLink": "Instrukcje konfiguracji Gemini CLI",
+ 			"requirementsTitle": "Ważne wymagania",
+ 			"requirement1": "Najpierw musisz zainstalować narzędzie Gemini CLI",
+ 			"requirement2": "Następnie uruchom gemini w swoim terminalu i upewnij się, że logujesz się przez Google",
+ 			"requirement3": "Działa tylko z osobistymi kontami Google (nie z kontami Google Workspace)",
+ 			"requirement4": "Nie używa kluczy API - uwierzytelnianie jest obsługiwane przez OAuth",
+ 			"requirement5": "Wymaga, aby narzędzie Gemini CLI było najpierw zainstalowane i uwierzytelnione",
+ 			"freeAccess": "Darmowy dostęp przez uwierzytelnianie OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/pt-BR/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/pt-BR/settings.json	2025-09-11 17:40:28.528458543 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Padrão: claude",
  			"maxTokensLabel": "Tokens de saída máximos",
  			"maxTokensDescription": "Número máximo de tokens de saída para respostas do Claude Code. O padrão é 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Este provedor usa autenticação OAuth da ferramenta Gemini CLI e não requer chaves de API.",
+ 			"oauthPath": "Caminho das Credenciais OAuth (opcional)",
+ 			"oauthPathDescription": "Caminho para o arquivo de credenciais OAuth. Deixe vazio para usar o local padrão (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Se você ainda não se autenticou, execute",
+ 			"instructionsContinued": "no seu terminal primeiro.",
+ 			"setupLink": "Instruções de Configuração do Gemini CLI",
+ 			"requirementsTitle": "Requisitos Importantes",
+ 			"requirement1": "Primeiro, você precisa instalar a ferramenta Gemini CLI",
+ 			"requirement2": "Em seguida, execute gemini no seu terminal e certifique-se de fazer login com o Google",
+ 			"requirement3": "Funciona apenas com contas pessoais do Google (não contas do Google Workspace)",
+ 			"requirement4": "Não usa chaves de API - a autenticação é tratada via OAuth",
+ 			"requirement5": "Requer que a ferramenta Gemini CLI seja instalada e autenticada primeiro",
+ 			"freeAccess": "Acesso gratuito via autenticação OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/ru/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/ru/settings.json	2025-09-11 17:40:28.528553527 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "По умолчанию: claude",
  			"maxTokensLabel": "Макс. выходных токенов",
  			"maxTokensDescription": "Максимальное количество выходных токенов для ответов Claude Code. По умолчанию 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Этот провайдер использует OAuth-аутентификацию из инструмента Gemini CLI и не требует API-ключей.",
+ 			"oauthPath": "Путь к учетным данным OAuth (необязательно)",
+ 			"oauthPathDescription": "Путь к файлу учетных данных OAuth. Оставьте пустым для использования местоположения по умолчанию (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Если вы еще не прошли аутентификацию, выполните",
+ 			"instructionsContinued": "в вашем терминале сначала.",
+ 			"setupLink": "Инструкции по настройке Gemini CLI",
+ 			"requirementsTitle": "Важные требования",
+ 			"requirement1": "Сначала вам нужно установить инструмент Gemini CLI",
+ 			"requirement2": "Затем запустите gemini в вашем терминале и убедитесь, что вы вошли в Google",
+ 			"requirement3": "Работает только с личными аккаунтами Google (не с аккаунтами Google Workspace)",
+ 			"requirement4": "Не использует API-ключи - аутентификация обрабатывается через OAuth",
+ 			"requirement5": "Требует, чтобы инструмент Gemini CLI был сначала установлен и аутентифицирован",
+ 			"freeAccess": "Бесплатный доступ через OAuth-аутентификацию"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/tr/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/tr/settings.json	2025-09-11 17:40:28.528655636 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Varsayılan: claude",
  			"maxTokensLabel": "Maksimum Çıktı Token sayısı",
  			"maxTokensDescription": "Claude Code yanıtları için maksimum çıktı token sayısı. Varsayılan 8000'dir."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Bu sağlayıcı Gemini CLI aracından OAuth kimlik doğrulaması kullanır ve API anahtarları gerektirmez.",
+ 			"oauthPath": "OAuth Kimlik Bilgileri Yolu (isteğe bağlı)",
+ 			"oauthPathDescription": "OAuth kimlik bilgileri dosyasının yolu. Varsayılan konumu kullanmak için boş bırakın (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Henüz kimlik doğrulaması yapmadıysanız, önce",
+ 			"instructionsContinued": "komutunu terminalinizde çalıştırın.",
+ 			"setupLink": "Gemini CLI Kurulum Talimatları",
+ 			"requirementsTitle": "Önemli Gereksinimler",
+ 			"requirement1": "Önce Gemini CLI aracını yüklemeniz gerekir",
+ 			"requirement2": "Sonra terminalinizde gemini çalıştırın ve Google ile giriş yaptığınızdan emin olun",
+ 			"requirement3": "Sadece kişisel Google hesaplarıyla çalışır (Google Workspace hesapları değil)",
+ 			"requirement4": "API anahtarları kullanmaz - kimlik doğrulama OAuth ile yapılır",
+ 			"requirement5": "Gemini CLI aracının önce yüklenmesi ve kimlik doğrulaması yapılması gerekir",
+ 			"freeAccess": "OAuth kimlik doğrulaması ile ücretsiz erişim"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/vi/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/vi/settings.json	2025-09-11 17:40:28.528758931 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "Mặc định: claude",
  			"maxTokensLabel": "Số token đầu ra tối đa",
  			"maxTokensDescription": "Số lượng token đầu ra tối đa cho các phản hồi của Claude Code. Mặc định là 8000."
+ 		},
+ 		"geminiCli": {
+ 			"description": "Nhà cung cấp này sử dụng xác thực OAuth từ công cụ Gemini CLI và không yêu cầu khóa API.",
+ 			"oauthPath": "Đường dẫn Thông tin xác thực OAuth (tùy chọn)",
+ 			"oauthPathDescription": "Đường dẫn đến tệp thông tin xác thực OAuth. Để trống để sử dụng vị trí mặc định (~/.gemini/oauth_creds.json).",
+ 			"instructions": "Nếu bạn chưa xác thực, vui lòng chạy",
+ 			"instructionsContinued": "trong terminal của bạn trước.",
+ 			"setupLink": "Hướng dẫn Thiết lập Gemini CLI",
+ 			"requirementsTitle": "Yêu cầu Quan trọng",
+ 			"requirement1": "Trước tiên, bạn cần cài đặt công cụ Gemini CLI",
+ 			"requirement2": "Sau đó, chạy gemini trong terminal của bạn và đảm bảo bạn đăng nhập bằng Google",
+ 			"requirement3": "Chỉ hoạt động với tài khoản Google cá nhân (không phải tài khoản Google Workspace)",
+ 			"requirement4": "Không sử dụng khóa API - xác thực được xử lý qua OAuth",
+ 			"requirement5": "Yêu cầu công cụ Gemini CLI được cài đặt và xác thực trước",
+ 			"freeAccess": "Truy cập miễn phí qua xác thực OAuth"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/zh-CN/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/zh-CN/settings.json	2025-09-11 17:40:28.528851541 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "默认:claude",
  			"maxTokensLabel": "最大输出 Token",
  			"maxTokensDescription": "Claude Code 响应的最大输出 Token 数量。默认为 8000。"
+ 		},
+ 		"geminiCli": {
+ 			"description": "此提供商使用 Gemini CLI 工具的 OAuth 身份验证,不需要 API 密钥。",
+ 			"oauthPath": "OAuth 凭据路径(可选)",
+ 			"oauthPathDescription": "OAuth 凭据文件的路径。留空以使用默认位置(~/.gemini/oauth_creds.json)。",
+ 			"instructions": "如果您尚未进行身份验证,请先运行",
+ 			"instructionsContinued": "在您的终端中。",
+ 			"setupLink": "Gemini CLI 设置说明",
+ 			"requirementsTitle": "重要要求",
+ 			"requirement1": "首先,您需要安装 Gemini CLI 工具",
+ 			"requirement2": "然后,在终端中运行 gemini 并确保使用 Google 登录",
+ 			"requirement3": "仅适用于个人 Google 账户(不支持 Google Workspace 账户)",
+ 			"requirement4": "不使用 API 密钥 - 身份验证通过 OAuth 处理",
+ 			"requirement5": "需要先安装并验证 Gemini CLI 工具",
+ 			"freeAccess": "通过 OAuth 身份验证免费访问"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/i18n/locales/zh-TW/settings.json	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/i18n/locales/zh-TW/settings.json	2025-09-11 17:40:28.528935839 +0200
***************
*** 471,476 ****
--- 471,491 ----
  			"placeholder": "預設:claude",
  			"maxTokensLabel": "最大輸出 Token",
  			"maxTokensDescription": "Claude Code 回應的最大輸出 Token 數量。預設為 8000。"
+ 		},
+ 		"geminiCli": {
+ 			"description": "此提供商使用 Gemini CLI 工具的 OAuth 身份驗證,不需要 API 金鑰。",
+ 			"oauthPath": "OAuth 憑證路徑(可選)",
+ 			"oauthPathDescription": "OAuth 憑證檔案的路徑。留空以使用預設位置(~/.gemini/oauth_creds.json)。",
+ 			"instructions": "如果您尚未進行身份驗證,請先執行",
+ 			"instructionsContinued": "在您的終端機中。",
+ 			"setupLink": "Gemini CLI 設定說明",
+ 			"requirementsTitle": "重要要求",
+ 			"requirement1": "首先,您需要安裝 Gemini CLI 工具",
+ 			"requirement2": "然後,在終端機中執行 gemini 並確保使用 Google 登入",
+ 			"requirement3": "僅適用於個人 Google 帳戶(不支援 Google Workspace 帳戶)",
+ 			"requirement4": "不使用 API 金鑰 - 身份驗證透過 OAuth 處理",
+ 			"requirement5": "需要先安裝並驗證 Gemini CLI 工具",
+ 			"freeAccess": "透過 OAuth 身份驗證免費存取"
  		}
  	},
  	"browser": {
*** Roo-Code-3.28.0/webview-ui/src/utils/validate.ts	2025-09-10 22:37:53.000000000 +0200
--- Roo-Code-3.28.0-patched/webview-ui/src/utils/validate.ts	2025-09-11 17:40:28.529015389 +0200
***************
*** 77,82 ****
--- 77,85 ----
  				return i18next.t("settings:validation.apiKey")
  			}
  			break
+ 		case "gemini-cli":
+ 			// OAuth-based provider, no API key validation needed
+ 			break
  		case "openai-native":
  			if (!apiConfiguration.openAiNativeApiKey) {
  				return i18next.t("settings:validation.apiKey")