relay-opencode 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -236,8 +236,95 @@ export declare const RelayRpc: {
236
236
  readonly type: "null";
237
237
  }];
238
238
  };
239
+ readonly model: {
240
+ readonly anyOf: readonly [{
241
+ readonly type: "string";
242
+ }, {
243
+ readonly type: "null";
244
+ }];
245
+ };
246
+ readonly total: {
247
+ readonly anyOf: readonly [{
248
+ readonly type: "object";
249
+ readonly properties: {
250
+ readonly input: {
251
+ readonly type: "number";
252
+ };
253
+ readonly output: {
254
+ readonly type: "number";
255
+ };
256
+ readonly reasoning: {
257
+ readonly type: "number";
258
+ };
259
+ readonly cacheRead: {
260
+ readonly type: "number";
261
+ };
262
+ readonly cacheWrite: {
263
+ readonly type: "number";
264
+ };
265
+ readonly costUsd: {
266
+ readonly anyOf: readonly [{
267
+ readonly type: "string";
268
+ }, {
269
+ readonly type: "null";
270
+ }];
271
+ };
272
+ };
273
+ readonly required: readonly ["input", "output", "reasoning", "cacheRead", "cacheWrite", "costUsd"];
274
+ readonly additionalProperties: false;
275
+ }, {
276
+ readonly type: "null";
277
+ }];
278
+ };
279
+ readonly prices: {
280
+ readonly anyOf: readonly [{
281
+ readonly type: "object";
282
+ readonly properties: {
283
+ readonly inputPerMillion: {
284
+ readonly anyOf: readonly [{
285
+ readonly type: "string";
286
+ }, {
287
+ readonly type: "null";
288
+ }];
289
+ };
290
+ readonly outputPerMillion: {
291
+ readonly anyOf: readonly [{
292
+ readonly type: "string";
293
+ }, {
294
+ readonly type: "null";
295
+ }];
296
+ };
297
+ readonly cacheReadPerMillion: {
298
+ readonly anyOf: readonly [{
299
+ readonly type: "string";
300
+ }, {
301
+ readonly type: "null";
302
+ }];
303
+ };
304
+ readonly cacheWritePerMillion: {
305
+ readonly anyOf: readonly [{
306
+ readonly type: "string";
307
+ }, {
308
+ readonly type: "null";
309
+ }];
310
+ };
311
+ };
312
+ readonly required: readonly ["inputPerMillion", "outputPerMillion", "cacheReadPerMillion", "cacheWritePerMillion"];
313
+ readonly additionalProperties: false;
314
+ }, {
315
+ readonly type: "null";
316
+ }];
317
+ };
318
+ readonly pricesFrom: {
319
+ readonly anyOf: readonly [{
320
+ readonly type: "string";
321
+ readonly enum: readonly ["opencode", "artificial-analysis"];
322
+ }, {
323
+ readonly type: "null";
324
+ }];
325
+ };
239
326
  };
240
- readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds"];
327
+ readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds", "model", "total", "prices", "pricesFrom"];
241
328
  readonly additionalProperties: false;
242
329
  }, {
243
330
  readonly type: "null";
@@ -410,8 +497,11 @@ export declare const RelayRpc: {
410
497
  readonly required: readonly ["active", "note"];
411
498
  readonly additionalProperties: false;
412
499
  };
500
+ readonly priceKey: {
501
+ readonly type: "boolean";
502
+ };
413
503
  };
414
- readonly required: readonly ["directory", "settings", "decisions", "deciders", "checks"];
504
+ readonly required: readonly ["directory", "settings", "decisions", "deciders", "checks", "priceKey"];
415
505
  readonly additionalProperties: false;
416
506
  };
417
507
  };
@@ -764,8 +854,95 @@ export declare const RelayRpc: {
764
854
  readonly type: "null";
765
855
  }];
766
856
  };
857
+ readonly model: {
858
+ readonly anyOf: readonly [{
859
+ readonly type: "string";
860
+ }, {
861
+ readonly type: "null";
862
+ }];
863
+ };
864
+ readonly total: {
865
+ readonly anyOf: readonly [{
866
+ readonly type: "object";
867
+ readonly properties: {
868
+ readonly input: {
869
+ readonly type: "number";
870
+ };
871
+ readonly output: {
872
+ readonly type: "number";
873
+ };
874
+ readonly reasoning: {
875
+ readonly type: "number";
876
+ };
877
+ readonly cacheRead: {
878
+ readonly type: "number";
879
+ };
880
+ readonly cacheWrite: {
881
+ readonly type: "number";
882
+ };
883
+ readonly costUsd: {
884
+ readonly anyOf: readonly [{
885
+ readonly type: "string";
886
+ }, {
887
+ readonly type: "null";
888
+ }];
889
+ };
890
+ };
891
+ readonly required: readonly ["input", "output", "reasoning", "cacheRead", "cacheWrite", "costUsd"];
892
+ readonly additionalProperties: false;
893
+ }, {
894
+ readonly type: "null";
895
+ }];
896
+ };
897
+ readonly prices: {
898
+ readonly anyOf: readonly [{
899
+ readonly type: "object";
900
+ readonly properties: {
901
+ readonly inputPerMillion: {
902
+ readonly anyOf: readonly [{
903
+ readonly type: "string";
904
+ }, {
905
+ readonly type: "null";
906
+ }];
907
+ };
908
+ readonly outputPerMillion: {
909
+ readonly anyOf: readonly [{
910
+ readonly type: "string";
911
+ }, {
912
+ readonly type: "null";
913
+ }];
914
+ };
915
+ readonly cacheReadPerMillion: {
916
+ readonly anyOf: readonly [{
917
+ readonly type: "string";
918
+ }, {
919
+ readonly type: "null";
920
+ }];
921
+ };
922
+ readonly cacheWritePerMillion: {
923
+ readonly anyOf: readonly [{
924
+ readonly type: "string";
925
+ }, {
926
+ readonly type: "null";
927
+ }];
928
+ };
929
+ };
930
+ readonly required: readonly ["inputPerMillion", "outputPerMillion", "cacheReadPerMillion", "cacheWritePerMillion"];
931
+ readonly additionalProperties: false;
932
+ }, {
933
+ readonly type: "null";
934
+ }];
935
+ };
936
+ readonly pricesFrom: {
937
+ readonly anyOf: readonly [{
938
+ readonly type: "string";
939
+ readonly enum: readonly ["opencode", "artificial-analysis"];
940
+ }, {
941
+ readonly type: "null";
942
+ }];
943
+ };
767
944
  };
768
- readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds"];
945
+ readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds", "model", "total", "prices", "pricesFrom"];
769
946
  readonly additionalProperties: false;
770
947
  }, {
771
948
  readonly type: "null";
@@ -938,8 +1115,11 @@ export declare const RelayRpc: {
938
1115
  readonly required: readonly ["active", "note"];
939
1116
  readonly additionalProperties: false;
940
1117
  };
1118
+ readonly priceKey: {
1119
+ readonly type: "boolean";
1120
+ };
941
1121
  };
942
- readonly required: readonly ["directory", "settings", "decisions", "deciders", "checks"];
1122
+ readonly required: readonly ["directory", "settings", "decisions", "deciders", "checks", "priceKey"];
943
1123
  readonly additionalProperties: false;
944
1124
  };
945
1125
  };
@@ -1062,8 +1242,95 @@ export declare const RelayRpc: {
1062
1242
  readonly type: "null";
1063
1243
  }];
1064
1244
  };
1245
+ readonly model: {
1246
+ readonly anyOf: readonly [{
1247
+ readonly type: "string";
1248
+ }, {
1249
+ readonly type: "null";
1250
+ }];
1251
+ };
1252
+ readonly total: {
1253
+ readonly anyOf: readonly [{
1254
+ readonly type: "object";
1255
+ readonly properties: {
1256
+ readonly input: {
1257
+ readonly type: "number";
1258
+ };
1259
+ readonly output: {
1260
+ readonly type: "number";
1261
+ };
1262
+ readonly reasoning: {
1263
+ readonly type: "number";
1264
+ };
1265
+ readonly cacheRead: {
1266
+ readonly type: "number";
1267
+ };
1268
+ readonly cacheWrite: {
1269
+ readonly type: "number";
1270
+ };
1271
+ readonly costUsd: {
1272
+ readonly anyOf: readonly [{
1273
+ readonly type: "string";
1274
+ }, {
1275
+ readonly type: "null";
1276
+ }];
1277
+ };
1278
+ };
1279
+ readonly required: readonly ["input", "output", "reasoning", "cacheRead", "cacheWrite", "costUsd"];
1280
+ readonly additionalProperties: false;
1281
+ }, {
1282
+ readonly type: "null";
1283
+ }];
1284
+ };
1285
+ readonly prices: {
1286
+ readonly anyOf: readonly [{
1287
+ readonly type: "object";
1288
+ readonly properties: {
1289
+ readonly inputPerMillion: {
1290
+ readonly anyOf: readonly [{
1291
+ readonly type: "string";
1292
+ }, {
1293
+ readonly type: "null";
1294
+ }];
1295
+ };
1296
+ readonly outputPerMillion: {
1297
+ readonly anyOf: readonly [{
1298
+ readonly type: "string";
1299
+ }, {
1300
+ readonly type: "null";
1301
+ }];
1302
+ };
1303
+ readonly cacheReadPerMillion: {
1304
+ readonly anyOf: readonly [{
1305
+ readonly type: "string";
1306
+ }, {
1307
+ readonly type: "null";
1308
+ }];
1309
+ };
1310
+ readonly cacheWritePerMillion: {
1311
+ readonly anyOf: readonly [{
1312
+ readonly type: "string";
1313
+ }, {
1314
+ readonly type: "null";
1315
+ }];
1316
+ };
1317
+ };
1318
+ readonly required: readonly ["inputPerMillion", "outputPerMillion", "cacheReadPerMillion", "cacheWritePerMillion"];
1319
+ readonly additionalProperties: false;
1320
+ }, {
1321
+ readonly type: "null";
1322
+ }];
1323
+ };
1324
+ readonly pricesFrom: {
1325
+ readonly anyOf: readonly [{
1326
+ readonly type: "string";
1327
+ readonly enum: readonly ["opencode", "artificial-analysis"];
1328
+ }, {
1329
+ readonly type: "null";
1330
+ }];
1331
+ };
1065
1332
  };
1066
- readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds"];
1333
+ readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds", "model", "total", "prices", "pricesFrom"];
1067
1334
  readonly additionalProperties: false;
1068
1335
  }, {
1069
1336
  readonly type: "null";
@@ -1199,8 +1466,95 @@ export declare const RelayRpc: {
1199
1466
  readonly type: "null";
1200
1467
  }];
1201
1468
  };
1469
+ readonly model: {
1470
+ readonly anyOf: readonly [{
1471
+ readonly type: "string";
1472
+ }, {
1473
+ readonly type: "null";
1474
+ }];
1475
+ };
1476
+ readonly total: {
1477
+ readonly anyOf: readonly [{
1478
+ readonly type: "object";
1479
+ readonly properties: {
1480
+ readonly input: {
1481
+ readonly type: "number";
1482
+ };
1483
+ readonly output: {
1484
+ readonly type: "number";
1485
+ };
1486
+ readonly reasoning: {
1487
+ readonly type: "number";
1488
+ };
1489
+ readonly cacheRead: {
1490
+ readonly type: "number";
1491
+ };
1492
+ readonly cacheWrite: {
1493
+ readonly type: "number";
1494
+ };
1495
+ readonly costUsd: {
1496
+ readonly anyOf: readonly [{
1497
+ readonly type: "string";
1498
+ }, {
1499
+ readonly type: "null";
1500
+ }];
1501
+ };
1502
+ };
1503
+ readonly required: readonly ["input", "output", "reasoning", "cacheRead", "cacheWrite", "costUsd"];
1504
+ readonly additionalProperties: false;
1505
+ }, {
1506
+ readonly type: "null";
1507
+ }];
1508
+ };
1509
+ readonly prices: {
1510
+ readonly anyOf: readonly [{
1511
+ readonly type: "object";
1512
+ readonly properties: {
1513
+ readonly inputPerMillion: {
1514
+ readonly anyOf: readonly [{
1515
+ readonly type: "string";
1516
+ }, {
1517
+ readonly type: "null";
1518
+ }];
1519
+ };
1520
+ readonly outputPerMillion: {
1521
+ readonly anyOf: readonly [{
1522
+ readonly type: "string";
1523
+ }, {
1524
+ readonly type: "null";
1525
+ }];
1526
+ };
1527
+ readonly cacheReadPerMillion: {
1528
+ readonly anyOf: readonly [{
1529
+ readonly type: "string";
1530
+ }, {
1531
+ readonly type: "null";
1532
+ }];
1533
+ };
1534
+ readonly cacheWritePerMillion: {
1535
+ readonly anyOf: readonly [{
1536
+ readonly type: "string";
1537
+ }, {
1538
+ readonly type: "null";
1539
+ }];
1540
+ };
1541
+ };
1542
+ readonly required: readonly ["inputPerMillion", "outputPerMillion", "cacheReadPerMillion", "cacheWritePerMillion"];
1543
+ readonly additionalProperties: false;
1544
+ }, {
1545
+ readonly type: "null";
1546
+ }];
1547
+ };
1548
+ readonly pricesFrom: {
1549
+ readonly anyOf: readonly [{
1550
+ readonly type: "string";
1551
+ readonly enum: readonly ["opencode", "artificial-analysis"];
1552
+ }, {
1553
+ readonly type: "null";
1554
+ }];
1555
+ };
1202
1556
  };
1203
- readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds"];
1557
+ readonly required: readonly ["requests", "fresh", "cached", "costUsd", "seconds", "model", "total", "prices", "pricesFrom"];
1204
1558
  readonly additionalProperties: false;
1205
1559
  }, {
1206
1560
  readonly type: "null";
@@ -1324,6 +1678,818 @@ export declare const RelayRpc: {
1324
1678
  readonly additionalProperties: false;
1325
1679
  };
1326
1680
  };
1681
+ /** Usage by model: the totals of every reply Relay counted, and the credit Artificial Analysis asks for when its prices are used. Storage only. */
1682
+ readonly getRelayUsage: {
1683
+ readonly errors: {
1684
+ readonly rejected: {
1685
+ readonly type: "object";
1686
+ readonly properties: {};
1687
+ readonly additionalProperties: false;
1688
+ };
1689
+ };
1690
+ readonly input: {
1691
+ readonly type: "object";
1692
+ readonly properties: {};
1693
+ readonly additionalProperties: false;
1694
+ };
1695
+ readonly output: {
1696
+ readonly type: "object";
1697
+ readonly properties: {
1698
+ readonly directory: {
1699
+ readonly type: "string";
1700
+ };
1701
+ readonly since: {
1702
+ readonly anyOf: readonly [{
1703
+ readonly type: "string";
1704
+ }, {
1705
+ readonly type: "null";
1706
+ }];
1707
+ };
1708
+ readonly rows: {
1709
+ readonly type: "array";
1710
+ readonly items: {
1711
+ readonly type: "object";
1712
+ readonly properties: {
1713
+ readonly model: {
1714
+ readonly type: "string";
1715
+ };
1716
+ readonly messages: {
1717
+ readonly type: "number";
1718
+ };
1719
+ readonly requests: {
1720
+ readonly type: "number";
1721
+ };
1722
+ readonly input: {
1723
+ readonly type: "number";
1724
+ };
1725
+ readonly output: {
1726
+ readonly type: "number";
1727
+ };
1728
+ readonly reasoning: {
1729
+ readonly type: "number";
1730
+ };
1731
+ readonly cacheRead: {
1732
+ readonly type: "number";
1733
+ };
1734
+ readonly cacheWrite: {
1735
+ readonly type: "number";
1736
+ };
1737
+ readonly openCodeUsd: {
1738
+ readonly anyOf: readonly [{
1739
+ readonly type: "string";
1740
+ }, {
1741
+ readonly type: "null";
1742
+ }];
1743
+ };
1744
+ readonly byPrice: {
1745
+ readonly type: "object";
1746
+ readonly properties: {
1747
+ readonly input: {
1748
+ readonly anyOf: readonly [{
1749
+ readonly type: "string";
1750
+ }, {
1751
+ readonly type: "null";
1752
+ }];
1753
+ };
1754
+ readonly output: {
1755
+ readonly anyOf: readonly [{
1756
+ readonly type: "string";
1757
+ }, {
1758
+ readonly type: "null";
1759
+ }];
1760
+ };
1761
+ readonly cacheRead: {
1762
+ readonly anyOf: readonly [{
1763
+ readonly type: "string";
1764
+ }, {
1765
+ readonly type: "null";
1766
+ }];
1767
+ };
1768
+ readonly cacheWrite: {
1769
+ readonly anyOf: readonly [{
1770
+ readonly type: "string";
1771
+ }, {
1772
+ readonly type: "null";
1773
+ }];
1774
+ };
1775
+ };
1776
+ readonly required: readonly ["input", "output", "cacheRead", "cacheWrite"];
1777
+ readonly additionalProperties: false;
1778
+ };
1779
+ readonly prices: {
1780
+ readonly anyOf: readonly [{
1781
+ readonly type: "object";
1782
+ readonly properties: {
1783
+ readonly inputPerMillion: {
1784
+ readonly anyOf: readonly [{
1785
+ readonly type: "string";
1786
+ }, {
1787
+ readonly type: "null";
1788
+ }];
1789
+ };
1790
+ readonly outputPerMillion: {
1791
+ readonly anyOf: readonly [{
1792
+ readonly type: "string";
1793
+ }, {
1794
+ readonly type: "null";
1795
+ }];
1796
+ };
1797
+ readonly cacheReadPerMillion: {
1798
+ readonly anyOf: readonly [{
1799
+ readonly type: "string";
1800
+ }, {
1801
+ readonly type: "null";
1802
+ }];
1803
+ };
1804
+ readonly cacheWritePerMillion: {
1805
+ readonly anyOf: readonly [{
1806
+ readonly type: "string";
1807
+ }, {
1808
+ readonly type: "null";
1809
+ }];
1810
+ };
1811
+ };
1812
+ readonly required: readonly ["inputPerMillion", "outputPerMillion", "cacheReadPerMillion", "cacheWritePerMillion"];
1813
+ readonly additionalProperties: false;
1814
+ }, {
1815
+ readonly type: "null";
1816
+ }];
1817
+ };
1818
+ readonly pricesFrom: {
1819
+ readonly anyOf: readonly [{
1820
+ readonly type: "string";
1821
+ readonly enum: readonly ["opencode", "artificial-analysis"];
1822
+ }, {
1823
+ readonly type: "null";
1824
+ }];
1825
+ };
1826
+ };
1827
+ readonly required: readonly ["model", "messages", "requests", "input", "output", "reasoning", "cacheRead", "cacheWrite", "openCodeUsd", "byPrice", "prices", "pricesFrom"];
1828
+ readonly additionalProperties: false;
1829
+ };
1830
+ };
1831
+ readonly credit: {
1832
+ readonly anyOf: readonly [{
1833
+ readonly type: "string";
1834
+ }, {
1835
+ readonly type: "null";
1836
+ }];
1837
+ };
1838
+ };
1839
+ readonly required: readonly ["directory", "since", "rows", "credit"];
1840
+ readonly additionalProperties: false;
1841
+ };
1842
+ };
1843
+ /** For the panel: which model of each mode Relay gives big work and small work by itself, from the saved settings and the stored copies only. */
1844
+ /** The usage tab (Relay usage): every reply of every chat in a time range, added up and filtered on the server. Storage only; it also removes records past 90 days. */
1845
+ readonly getUsageLog: {
1846
+ readonly errors: {
1847
+ readonly rejected: {
1848
+ readonly type: "object";
1849
+ readonly properties: {};
1850
+ readonly additionalProperties: false;
1851
+ };
1852
+ };
1853
+ readonly input: {
1854
+ readonly type: "object";
1855
+ readonly properties: {
1856
+ readonly from: {
1857
+ readonly type: "string";
1858
+ };
1859
+ readonly to: {
1860
+ readonly type: "string";
1861
+ };
1862
+ readonly tzOffsetMinutes: {
1863
+ readonly type: "integer";
1864
+ readonly minimum: -840;
1865
+ readonly maximum: 840;
1866
+ };
1867
+ readonly timeZone: {
1868
+ readonly anyOf: readonly [{
1869
+ readonly type: "string";
1870
+ readonly maxLength: 64;
1871
+ }, {
1872
+ readonly type: "null";
1873
+ }];
1874
+ };
1875
+ readonly search: {
1876
+ readonly type: "string";
1877
+ readonly maxLength: 200;
1878
+ };
1879
+ readonly provider: {
1880
+ readonly anyOf: readonly [{
1881
+ readonly type: "string";
1882
+ }, {
1883
+ readonly type: "null";
1884
+ }];
1885
+ };
1886
+ readonly effort: {
1887
+ readonly anyOf: readonly [{
1888
+ readonly type: "string";
1889
+ }, {
1890
+ readonly type: "null";
1891
+ }];
1892
+ };
1893
+ readonly mode: {
1894
+ readonly anyOf: readonly [{
1895
+ readonly type: "string";
1896
+ }, {
1897
+ readonly type: "null";
1898
+ }];
1899
+ };
1900
+ readonly relay: {
1901
+ readonly type: "string";
1902
+ readonly enum: readonly ["any", "on", "off"];
1903
+ };
1904
+ readonly kind: {
1905
+ readonly type: "string";
1906
+ readonly enum: readonly ["any", "chat", "helper", "summary"];
1907
+ };
1908
+ readonly project: {
1909
+ readonly anyOf: readonly [{
1910
+ readonly type: "string";
1911
+ }, {
1912
+ readonly type: "null";
1913
+ }];
1914
+ };
1915
+ readonly offset: {
1916
+ readonly type: "integer";
1917
+ readonly minimum: 0;
1918
+ };
1919
+ readonly limit: {
1920
+ readonly type: "integer";
1921
+ readonly minimum: 1;
1922
+ readonly maximum: 200;
1923
+ };
1924
+ };
1925
+ readonly required: readonly ["from", "to", "tzOffsetMinutes", "search", "provider", "effort", "mode", "relay", "kind", "project", "offset", "limit"];
1926
+ readonly additionalProperties: false;
1927
+ };
1928
+ readonly output: {
1929
+ readonly type: "object";
1930
+ readonly properties: {
1931
+ readonly directory: {
1932
+ readonly type: "string";
1933
+ };
1934
+ readonly days: {
1935
+ readonly type: "array";
1936
+ readonly items: {
1937
+ readonly type: "object";
1938
+ readonly properties: {
1939
+ readonly day: {
1940
+ readonly type: "string";
1941
+ };
1942
+ readonly models: {
1943
+ readonly type: "array";
1944
+ readonly items: {
1945
+ readonly type: "object";
1946
+ readonly properties: {
1947
+ readonly model: {
1948
+ readonly type: "string";
1949
+ };
1950
+ readonly cost: {
1951
+ readonly anyOf: readonly [{
1952
+ readonly type: "string";
1953
+ }, {
1954
+ readonly type: "null";
1955
+ }];
1956
+ };
1957
+ readonly tokens: {
1958
+ readonly type: "number";
1959
+ };
1960
+ readonly requests: {
1961
+ readonly type: "number";
1962
+ };
1963
+ };
1964
+ readonly required: readonly ["model", "cost", "tokens", "requests"];
1965
+ readonly additionalProperties: false;
1966
+ };
1967
+ };
1968
+ };
1969
+ readonly required: readonly ["day", "models"];
1970
+ readonly additionalProperties: false;
1971
+ };
1972
+ };
1973
+ readonly totals: {
1974
+ readonly type: "array";
1975
+ readonly items: {
1976
+ readonly type: "object";
1977
+ readonly properties: {
1978
+ readonly model: {
1979
+ readonly type: "string";
1980
+ };
1981
+ readonly replies: {
1982
+ readonly type: "number";
1983
+ };
1984
+ readonly requests: {
1985
+ readonly type: "number";
1986
+ };
1987
+ readonly input: {
1988
+ readonly type: "number";
1989
+ };
1990
+ readonly output: {
1991
+ readonly type: "number";
1992
+ };
1993
+ readonly reasoning: {
1994
+ readonly type: "number";
1995
+ };
1996
+ readonly cacheRead: {
1997
+ readonly type: "number";
1998
+ };
1999
+ readonly cacheWrite: {
2000
+ readonly type: "number";
2001
+ };
2002
+ readonly cost: {
2003
+ readonly anyOf: readonly [{
2004
+ readonly type: "string";
2005
+ }, {
2006
+ readonly type: "null";
2007
+ }];
2008
+ };
2009
+ readonly aaPriced: {
2010
+ readonly type: "boolean";
2011
+ };
2012
+ readonly unpriced: {
2013
+ readonly type: "number";
2014
+ };
2015
+ };
2016
+ readonly required: readonly ["model", "replies", "requests", "input", "output", "reasoning", "cacheRead", "cacheWrite", "cost", "aaPriced", "unpriced"];
2017
+ readonly additionalProperties: false;
2018
+ };
2019
+ };
2020
+ readonly options: {
2021
+ readonly type: "object";
2022
+ readonly properties: {
2023
+ readonly providers: {
2024
+ readonly type: "array";
2025
+ readonly items: {
2026
+ readonly type: "string";
2027
+ };
2028
+ };
2029
+ readonly efforts: {
2030
+ readonly type: "array";
2031
+ readonly items: {
2032
+ readonly type: "string";
2033
+ };
2034
+ };
2035
+ readonly modes: {
2036
+ readonly type: "array";
2037
+ readonly items: {
2038
+ readonly type: "string";
2039
+ };
2040
+ };
2041
+ readonly projects: {
2042
+ readonly type: "array";
2043
+ readonly items: {
2044
+ readonly type: "string";
2045
+ };
2046
+ };
2047
+ };
2048
+ readonly required: readonly ["providers", "efforts", "modes", "projects"];
2049
+ readonly additionalProperties: false;
2050
+ };
2051
+ readonly records: {
2052
+ readonly type: "array";
2053
+ readonly items: {
2054
+ readonly type: "object";
2055
+ readonly properties: {
2056
+ readonly at: {
2057
+ readonly type: "string";
2058
+ };
2059
+ readonly sessionID: {
2060
+ readonly type: "string";
2061
+ };
2062
+ readonly messageID: {
2063
+ readonly type: "string";
2064
+ };
2065
+ readonly project: {
2066
+ readonly type: "string";
2067
+ };
2068
+ readonly kind: {
2069
+ readonly type: "string";
2070
+ readonly enum: readonly ["chat", "helper", "summary"];
2071
+ };
2072
+ readonly agent: {
2073
+ readonly anyOf: readonly [{
2074
+ readonly type: "string";
2075
+ }, {
2076
+ readonly type: "null";
2077
+ }];
2078
+ };
2079
+ readonly model: {
2080
+ readonly anyOf: readonly [{
2081
+ readonly type: "string";
2082
+ }, {
2083
+ readonly type: "null";
2084
+ }];
2085
+ };
2086
+ readonly requests: {
2087
+ readonly type: "number";
2088
+ };
2089
+ readonly input: {
2090
+ readonly type: "number";
2091
+ };
2092
+ readonly output: {
2093
+ readonly type: "number";
2094
+ };
2095
+ readonly reasoning: {
2096
+ readonly type: "number";
2097
+ };
2098
+ readonly cacheRead: {
2099
+ readonly type: "number";
2100
+ };
2101
+ readonly cacheWrite: {
2102
+ readonly type: "number";
2103
+ };
2104
+ readonly costByPrice: {
2105
+ readonly anyOf: readonly [{
2106
+ readonly type: "string";
2107
+ }, {
2108
+ readonly type: "null";
2109
+ }];
2110
+ };
2111
+ readonly openCodeUsd: {
2112
+ readonly anyOf: readonly [{
2113
+ readonly type: "string";
2114
+ }, {
2115
+ readonly type: "null";
2116
+ }];
2117
+ };
2118
+ readonly pricesFrom: {
2119
+ readonly anyOf: readonly [{
2120
+ readonly type: "string";
2121
+ readonly enum: readonly ["opencode", "artificial-analysis"];
2122
+ }, {
2123
+ readonly type: "null";
2124
+ }];
2125
+ };
2126
+ readonly relay: {
2127
+ readonly anyOf: readonly [{
2128
+ readonly type: "object";
2129
+ readonly properties: {
2130
+ readonly mode: {
2131
+ readonly anyOf: readonly [{
2132
+ readonly type: "string";
2133
+ readonly enum: readonly ["plan", "execute", "review"];
2134
+ }, {
2135
+ readonly type: "null";
2136
+ }];
2137
+ };
2138
+ readonly note: {
2139
+ readonly anyOf: readonly [{
2140
+ readonly type: "string";
2141
+ }, {
2142
+ readonly type: "null";
2143
+ }];
2144
+ };
2145
+ };
2146
+ readonly required: readonly ["mode", "note"];
2147
+ readonly additionalProperties: false;
2148
+ }, {
2149
+ readonly type: "null";
2150
+ }];
2151
+ };
2152
+ };
2153
+ readonly required: readonly ["at", "sessionID", "messageID", "project", "kind", "agent", "model", "requests", "input", "output", "reasoning", "cacheRead", "cacheWrite", "costByPrice", "openCodeUsd", "pricesFrom", "relay"];
2154
+ readonly additionalProperties: false;
2155
+ };
2156
+ };
2157
+ readonly matching: {
2158
+ readonly type: "number";
2159
+ };
2160
+ readonly first: {
2161
+ readonly anyOf: readonly [{
2162
+ readonly type: "string";
2163
+ }, {
2164
+ readonly type: "null";
2165
+ }];
2166
+ };
2167
+ readonly before: {
2168
+ readonly type: "object";
2169
+ readonly properties: {
2170
+ readonly since: {
2171
+ readonly anyOf: readonly [{
2172
+ readonly type: "string";
2173
+ }, {
2174
+ readonly type: "null";
2175
+ }];
2176
+ };
2177
+ readonly rows: {
2178
+ readonly type: "array";
2179
+ readonly items: {
2180
+ readonly type: "object";
2181
+ readonly properties: {
2182
+ readonly model: {
2183
+ readonly type: "string";
2184
+ };
2185
+ readonly messages: {
2186
+ readonly type: "number";
2187
+ };
2188
+ readonly requests: {
2189
+ readonly type: "number";
2190
+ };
2191
+ readonly input: {
2192
+ readonly type: "number";
2193
+ };
2194
+ readonly output: {
2195
+ readonly type: "number";
2196
+ };
2197
+ readonly reasoning: {
2198
+ readonly type: "number";
2199
+ };
2200
+ readonly cacheRead: {
2201
+ readonly type: "number";
2202
+ };
2203
+ readonly cacheWrite: {
2204
+ readonly type: "number";
2205
+ };
2206
+ readonly openCodeUsd: {
2207
+ readonly anyOf: readonly [{
2208
+ readonly type: "string";
2209
+ }, {
2210
+ readonly type: "null";
2211
+ }];
2212
+ };
2213
+ readonly byPrice: {
2214
+ readonly type: "object";
2215
+ readonly properties: {
2216
+ readonly input: {
2217
+ readonly anyOf: readonly [{
2218
+ readonly type: "string";
2219
+ }, {
2220
+ readonly type: "null";
2221
+ }];
2222
+ };
2223
+ readonly output: {
2224
+ readonly anyOf: readonly [{
2225
+ readonly type: "string";
2226
+ }, {
2227
+ readonly type: "null";
2228
+ }];
2229
+ };
2230
+ readonly cacheRead: {
2231
+ readonly anyOf: readonly [{
2232
+ readonly type: "string";
2233
+ }, {
2234
+ readonly type: "null";
2235
+ }];
2236
+ };
2237
+ readonly cacheWrite: {
2238
+ readonly anyOf: readonly [{
2239
+ readonly type: "string";
2240
+ }, {
2241
+ readonly type: "null";
2242
+ }];
2243
+ };
2244
+ };
2245
+ readonly required: readonly ["input", "output", "cacheRead", "cacheWrite"];
2246
+ readonly additionalProperties: false;
2247
+ };
2248
+ readonly prices: {
2249
+ readonly anyOf: readonly [{
2250
+ readonly type: "object";
2251
+ readonly properties: {
2252
+ readonly inputPerMillion: {
2253
+ readonly anyOf: readonly [{
2254
+ readonly type: "string";
2255
+ }, {
2256
+ readonly type: "null";
2257
+ }];
2258
+ };
2259
+ readonly outputPerMillion: {
2260
+ readonly anyOf: readonly [{
2261
+ readonly type: "string";
2262
+ }, {
2263
+ readonly type: "null";
2264
+ }];
2265
+ };
2266
+ readonly cacheReadPerMillion: {
2267
+ readonly anyOf: readonly [{
2268
+ readonly type: "string";
2269
+ }, {
2270
+ readonly type: "null";
2271
+ }];
2272
+ };
2273
+ readonly cacheWritePerMillion: {
2274
+ readonly anyOf: readonly [{
2275
+ readonly type: "string";
2276
+ }, {
2277
+ readonly type: "null";
2278
+ }];
2279
+ };
2280
+ };
2281
+ readonly required: readonly ["inputPerMillion", "outputPerMillion", "cacheReadPerMillion", "cacheWritePerMillion"];
2282
+ readonly additionalProperties: false;
2283
+ }, {
2284
+ readonly type: "null";
2285
+ }];
2286
+ };
2287
+ readonly pricesFrom: {
2288
+ readonly anyOf: readonly [{
2289
+ readonly type: "string";
2290
+ readonly enum: readonly ["opencode", "artificial-analysis"];
2291
+ }, {
2292
+ readonly type: "null";
2293
+ }];
2294
+ };
2295
+ };
2296
+ readonly required: readonly ["model", "messages", "requests", "input", "output", "reasoning", "cacheRead", "cacheWrite", "openCodeUsd", "byPrice", "prices", "pricesFrom"];
2297
+ readonly additionalProperties: false;
2298
+ };
2299
+ };
2300
+ };
2301
+ readonly required: readonly ["since", "rows"];
2302
+ readonly additionalProperties: false;
2303
+ };
2304
+ readonly credit: {
2305
+ readonly anyOf: readonly [{
2306
+ readonly type: "string";
2307
+ }, {
2308
+ readonly type: "null";
2309
+ }];
2310
+ };
2311
+ readonly removed: {
2312
+ readonly type: "number";
2313
+ };
2314
+ };
2315
+ readonly required: readonly ["directory", "days", "totals", "options", "records", "matching", "first", "before", "credit", "removed"];
2316
+ readonly additionalProperties: false;
2317
+ };
2318
+ };
2319
+ readonly getOwnChoice: {
2320
+ readonly errors: {
2321
+ readonly rejected: {
2322
+ readonly type: "object";
2323
+ readonly properties: {};
2324
+ readonly additionalProperties: false;
2325
+ };
2326
+ };
2327
+ readonly input: {
2328
+ readonly type: "object";
2329
+ readonly properties: {};
2330
+ readonly additionalProperties: false;
2331
+ };
2332
+ readonly output: {
2333
+ readonly type: "object";
2334
+ readonly properties: {
2335
+ readonly directory: {
2336
+ readonly type: "string";
2337
+ };
2338
+ readonly modes: {
2339
+ readonly type: "object";
2340
+ readonly properties: {
2341
+ readonly plan: {
2342
+ readonly anyOf: readonly [{
2343
+ readonly type: "null";
2344
+ }, {
2345
+ readonly type: "object";
2346
+ readonly properties: {
2347
+ readonly kind: {
2348
+ readonly type: "string";
2349
+ readonly enum: readonly ["unranked"];
2350
+ };
2351
+ readonly reason: {
2352
+ readonly type: "string";
2353
+ };
2354
+ };
2355
+ readonly required: readonly ["kind", "reason"];
2356
+ readonly additionalProperties: false;
2357
+ }, {
2358
+ readonly type: "object";
2359
+ readonly properties: {
2360
+ readonly kind: {
2361
+ readonly type: "string";
2362
+ readonly enum: readonly ["ranked"];
2363
+ };
2364
+ readonly strongest: {
2365
+ readonly type: "string";
2366
+ };
2367
+ readonly cheapest: {
2368
+ readonly type: "string";
2369
+ };
2370
+ };
2371
+ readonly required: readonly ["kind", "strongest", "cheapest"];
2372
+ readonly additionalProperties: false;
2373
+ }];
2374
+ };
2375
+ readonly execute: {
2376
+ readonly anyOf: readonly [{
2377
+ readonly type: "null";
2378
+ }, {
2379
+ readonly type: "object";
2380
+ readonly properties: {
2381
+ readonly kind: {
2382
+ readonly type: "string";
2383
+ readonly enum: readonly ["unranked"];
2384
+ };
2385
+ readonly reason: {
2386
+ readonly type: "string";
2387
+ };
2388
+ };
2389
+ readonly required: readonly ["kind", "reason"];
2390
+ readonly additionalProperties: false;
2391
+ }, {
2392
+ readonly type: "object";
2393
+ readonly properties: {
2394
+ readonly kind: {
2395
+ readonly type: "string";
2396
+ readonly enum: readonly ["ranked"];
2397
+ };
2398
+ readonly strongest: {
2399
+ readonly type: "string";
2400
+ };
2401
+ readonly cheapest: {
2402
+ readonly type: "string";
2403
+ };
2404
+ };
2405
+ readonly required: readonly ["kind", "strongest", "cheapest"];
2406
+ readonly additionalProperties: false;
2407
+ }];
2408
+ };
2409
+ readonly review: {
2410
+ readonly anyOf: readonly [{
2411
+ readonly type: "null";
2412
+ }, {
2413
+ readonly type: "object";
2414
+ readonly properties: {
2415
+ readonly kind: {
2416
+ readonly type: "string";
2417
+ readonly enum: readonly ["unranked"];
2418
+ };
2419
+ readonly reason: {
2420
+ readonly type: "string";
2421
+ };
2422
+ };
2423
+ readonly required: readonly ["kind", "reason"];
2424
+ readonly additionalProperties: false;
2425
+ }, {
2426
+ readonly type: "object";
2427
+ readonly properties: {
2428
+ readonly kind: {
2429
+ readonly type: "string";
2430
+ readonly enum: readonly ["ranked"];
2431
+ };
2432
+ readonly strongest: {
2433
+ readonly type: "string";
2434
+ };
2435
+ readonly cheapest: {
2436
+ readonly type: "string";
2437
+ };
2438
+ };
2439
+ readonly required: readonly ["kind", "strongest", "cheapest"];
2440
+ readonly additionalProperties: false;
2441
+ }];
2442
+ };
2443
+ };
2444
+ readonly required: readonly ["plan", "execute", "review"];
2445
+ readonly additionalProperties: false;
2446
+ };
2447
+ };
2448
+ readonly required: readonly ["directory", "modes"];
2449
+ readonly additionalProperties: false;
2450
+ };
2451
+ };
2452
+ /** Saves the Artificial Analysis key, or with null removes it, and never returns it. `note` says why the list could not be loaded with it. */
2453
+ readonly setPriceKey: {
2454
+ readonly errors: {
2455
+ readonly rejected: {
2456
+ readonly type: "object";
2457
+ readonly properties: {};
2458
+ readonly additionalProperties: false;
2459
+ };
2460
+ };
2461
+ readonly input: {
2462
+ readonly type: "object";
2463
+ readonly properties: {
2464
+ readonly key: {
2465
+ readonly anyOf: readonly [{
2466
+ readonly type: "string";
2467
+ }, {
2468
+ readonly type: "null";
2469
+ }];
2470
+ };
2471
+ };
2472
+ readonly required: readonly ["key"];
2473
+ readonly additionalProperties: false;
2474
+ };
2475
+ readonly output: {
2476
+ readonly type: "object";
2477
+ readonly properties: {
2478
+ readonly saved: {
2479
+ readonly type: "boolean";
2480
+ };
2481
+ readonly note: {
2482
+ readonly anyOf: readonly [{
2483
+ readonly type: "string";
2484
+ }, {
2485
+ readonly type: "null";
2486
+ }];
2487
+ };
2488
+ };
2489
+ readonly required: readonly ["saved", "note"];
2490
+ readonly additionalProperties: false;
2491
+ };
2492
+ };
1327
2493
  readonly listModels: {
1328
2494
  readonly errors: {
1329
2495
  readonly rejected: {