@sixb/client 0.1.6 → 0.1.7

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.
Files changed (41) hide show
  1. package/README.md +25 -0
  2. package/dist/browser.js +2 -2
  3. package/dist/{chunk-9bwme2g7.js → chunk-b3bfdm80.js} +1 -1
  4. package/dist/{chunk-hwg7mwq7.js → chunk-dcebhkmz.js} +25 -6
  5. package/dist/{chunk-hwg7mwq7.js.map → chunk-dcebhkmz.js.map} +4 -4
  6. package/dist/{chunk-g19v53kt.js → chunk-h80qj1f8.js} +1 -1
  7. package/dist/{chunk-5y58b4tr.js → chunk-m4by7m5r.js} +2 -2
  8. package/dist/{chunk-ks27bq5b.js → chunk-p0xrjaz6.js} +2 -2
  9. package/dist/{chunk-ehjnq01h.js → chunk-r8p88mbg.js} +78 -9
  10. package/dist/chunk-r8p88mbg.js.map +19 -0
  11. package/dist/connectors/queries.d.ts.map +1 -1
  12. package/dist/file.d.ts +11 -0
  13. package/dist/file.d.ts.map +1 -1
  14. package/dist/generated/@tanstack/react-query.gen.d.ts +2407 -367
  15. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  16. package/dist/generated/index.d.ts +2 -2
  17. package/dist/generated/index.d.ts.map +1 -1
  18. package/dist/generated/sdk.gen.d.ts +41 -7
  19. package/dist/generated/sdk.gen.d.ts.map +1 -1
  20. package/dist/generated/types.gen.d.ts +975 -172
  21. package/dist/generated/types.gen.d.ts.map +1 -1
  22. package/dist/hooks.js +166 -22
  23. package/dist/hooks.js.map +3 -3
  24. package/dist/index.js +26 -8
  25. package/dist/index.js.map +1 -1
  26. package/dist/logs.js +3 -3
  27. package/dist/models.js +20 -4
  28. package/dist/models.js.map +1 -1
  29. package/dist/query.js +3 -3
  30. package/package.json +2 -2
  31. package/src/agent-streams.ts +0 -1
  32. package/src/file.ts +36 -0
  33. package/src/generated/@tanstack/react-query.gen.ts +320 -31
  34. package/src/generated/index.ts +52 -4
  35. package/src/generated/sdk.gen.ts +197 -18
  36. package/src/generated/types.gen.ts +1266 -146
  37. package/dist/chunk-ehjnq01h.js.map +0 -19
  38. /package/dist/{chunk-9bwme2g7.js.map → chunk-b3bfdm80.js.map} +0 -0
  39. /package/dist/{chunk-g19v53kt.js.map → chunk-h80qj1f8.js.map} +0 -0
  40. /package/dist/{chunk-5y58b4tr.js.map → chunk-m4by7m5r.js.map} +0 -0
  41. /package/dist/{chunk-ks27bq5b.js.map → chunk-p0xrjaz6.js.map} +0 -0
@@ -220,6 +220,63 @@ export type ObjectQuerySortField = {
220
220
  kind: "relevance";
221
221
  direction?: "asc" | "desc";
222
222
  };
223
+ export type CreateDeviceAuthorizationData = {
224
+ body: {
225
+ clientName: string;
226
+ tokenName: string;
227
+ expiresIn?: "90d";
228
+ };
229
+ path?: never;
230
+ query?: never;
231
+ url: "/api/auth/device-authorizations";
232
+ };
233
+ export type CreateDeviceAuthorizationErrors = {
234
+ /**
235
+ * Response for status 429
236
+ */
237
+ 429: {
238
+ error: string;
239
+ };
240
+ };
241
+ export type CreateDeviceAuthorizationError = CreateDeviceAuthorizationErrors[keyof CreateDeviceAuthorizationErrors];
242
+ export type CreateDeviceAuthorizationResponses = {
243
+ /**
244
+ * Response for status 201
245
+ */
246
+ 201: {
247
+ deviceCode: string;
248
+ userCode: string;
249
+ verificationUri: string;
250
+ verificationUriComplete: string;
251
+ expiresAt: string;
252
+ interval: number;
253
+ };
254
+ };
255
+ export type CreateDeviceAuthorizationResponse = CreateDeviceAuthorizationResponses[keyof CreateDeviceAuthorizationResponses];
256
+ export type ExchangeDeviceAuthorizationData = {
257
+ body: {
258
+ deviceCode: string;
259
+ };
260
+ path?: never;
261
+ query?: never;
262
+ url: "/api/auth/device-authorizations/token";
263
+ };
264
+ export type ExchangeDeviceAuthorizationResponses = {
265
+ /**
266
+ * Response for status 200
267
+ */
268
+ 200: {
269
+ status: "pending";
270
+ } | {
271
+ status: "denied";
272
+ } | {
273
+ status: "expired";
274
+ } | {
275
+ status: "approved";
276
+ accessToken: string;
277
+ };
278
+ };
279
+ export type ExchangeDeviceAuthorizationResponse = ExchangeDeviceAuthorizationResponses[keyof ExchangeDeviceAuthorizationResponses];
223
280
  export type GetAuthSessionData = {
224
281
  body?: never;
225
282
  path?: never;
@@ -1460,6 +1517,12 @@ export type GetAiAccountingOverviewErrors = {
1460
1517
  400: {
1461
1518
  error: string;
1462
1519
  };
1520
+ /**
1521
+ * Response for status 403
1522
+ */
1523
+ 403: {
1524
+ error: string;
1525
+ };
1463
1526
  /**
1464
1527
  * Response for status 501
1465
1528
  */
@@ -1573,7 +1636,32 @@ export type GetAiAccountingOverviewResponses = {
1573
1636
  unpriceableCallCount: number;
1574
1637
  unvaluedCallCount: number;
1575
1638
  };
1576
- agentId: string;
1639
+ kind: "agent";
1640
+ } | {
1641
+ modelCallCount: number;
1642
+ usage: {
1643
+ inputTokens?: number;
1644
+ outputTokens?: number;
1645
+ totalTokens?: number;
1646
+ uncachedInputTokens?: number;
1647
+ cacheReadInputTokens?: number;
1648
+ cacheWriteInputTokens?: number;
1649
+ textOutputTokens?: number;
1650
+ reasoningOutputTokens?: number;
1651
+ reportingStatus: "complete" | "partial" | "unavailable";
1652
+ };
1653
+ costs: {
1654
+ amounts: Array<{
1655
+ currency: string;
1656
+ amountNanos: string;
1657
+ }>;
1658
+ ratedCallCount: number;
1659
+ unpriceableCallCount: number;
1660
+ unvaluedCallCount: number;
1661
+ };
1662
+ kind: "workflowAgent";
1663
+ workflowId: string;
1664
+ agentStepId: string;
1577
1665
  }>;
1578
1666
  workflows: Array<{
1579
1667
  modelCallCount: number;
@@ -1597,12 +1685,663 @@ export type GetAiAccountingOverviewResponses = {
1597
1685
  unpriceableCallCount: number;
1598
1686
  unvaluedCallCount: number;
1599
1687
  };
1600
- workflowId: string;
1601
- }>;
1688
+ workflowId: string;
1689
+ }>;
1690
+ };
1691
+ };
1692
+ export type GetAiAccountingOverviewResponse = GetAiAccountingOverviewResponses[keyof GetAiAccountingOverviewResponses];
1693
+ export type ListAiModelCallsData = {
1694
+ body?: never;
1695
+ path?: never;
1696
+ query: {
1697
+ from: string;
1698
+ to: string;
1699
+ providerId?: string;
1700
+ modelId?: string;
1701
+ executionId?: string;
1702
+ valuationStatus?: "rated" | "unpriceable" | "unvalued";
1703
+ limit?: string;
1704
+ offset?: string;
1705
+ };
1706
+ url: "/api/ai/model-calls";
1707
+ };
1708
+ export type ListAiModelCallsErrors = {
1709
+ /**
1710
+ * Response for status 400
1711
+ */
1712
+ 400: {
1713
+ error: string;
1714
+ };
1715
+ /**
1716
+ * Response for status 403
1717
+ */
1718
+ 403: {
1719
+ error: string;
1720
+ };
1721
+ /**
1722
+ * Response for status 501
1723
+ */
1724
+ 501: {
1725
+ error: string;
1726
+ };
1727
+ };
1728
+ export type ListAiModelCallsError = ListAiModelCallsErrors[keyof ListAiModelCallsErrors];
1729
+ export type ListAiModelCallsResponses = {
1730
+ /**
1731
+ * Response for status 200
1732
+ */
1733
+ 200: {
1734
+ items: Array<{
1735
+ usage: {
1736
+ id: string;
1737
+ executionId: string;
1738
+ attempt: number;
1739
+ callId: string;
1740
+ providerId: string;
1741
+ requestedModelId: string;
1742
+ requestedReasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
1743
+ budgetTokens: number;
1744
+ };
1745
+ responseModelId?: string;
1746
+ responseId: string;
1747
+ providerIds: {
1748
+ requestId?: string;
1749
+ responseId?: string;
1750
+ generationId?: string;
1751
+ } | null;
1752
+ usage: {
1753
+ inputTokens?: number;
1754
+ outputTokens?: number;
1755
+ totalTokens?: number;
1756
+ uncachedInputTokens?: number;
1757
+ cacheReadInputTokens?: number;
1758
+ cacheWriteInputTokens?: number;
1759
+ textOutputTokens?: number;
1760
+ reasoningOutputTokens?: number;
1761
+ reportingStatus: "complete" | "partial" | "unavailable";
1762
+ };
1763
+ occurredAt: string;
1764
+ recordedAt: string;
1765
+ };
1766
+ attribution?: {
1767
+ kind: "agent";
1768
+ agentRunId: string;
1769
+ threadId: string;
1770
+ } | {
1771
+ kind: "workflowAgent";
1772
+ agentStepId: string;
1773
+ nodeRunId: string;
1774
+ workflowId: string;
1775
+ workflowRunId: string;
1776
+ } | {
1777
+ kind: "subagent";
1778
+ subagentRunId: string;
1779
+ parentRunId: string;
1780
+ };
1781
+ cost?: {
1782
+ status: "rated";
1783
+ source: "estimate" | "provider" | "unknown";
1784
+ estimate?: {
1785
+ status: "rated";
1786
+ money: {
1787
+ currency: string;
1788
+ amountNanos: string;
1789
+ };
1790
+ components: Array<{
1791
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1792
+ quantity: string;
1793
+ rateAmountNanosPerMillion: string;
1794
+ chargeAmountNanos: string;
1795
+ }>;
1796
+ } | {
1797
+ status: "unpriceable";
1798
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1799
+ missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1800
+ };
1801
+ billingIdentity: {
1802
+ providerId: string;
1803
+ modelId: string;
1804
+ };
1805
+ pricingContext: {
1806
+ serviceTier?: string;
1807
+ batch?: boolean;
1808
+ region?: string;
1809
+ inferenceGeo?: string;
1810
+ routedProviderId?: string;
1811
+ routedModelId?: string;
1812
+ deploymentId?: string;
1813
+ inferenceProfileId?: string;
1814
+ cacheWriteTtlSeconds?: number;
1815
+ mode?: string;
1816
+ };
1817
+ priceSource: {
1818
+ sourceId: string;
1819
+ sourceEntryId: string;
1820
+ sourceVersion: string;
1821
+ sourceUrl?: string;
1822
+ observedAt: string;
1823
+ };
1824
+ money: {
1825
+ currency: string;
1826
+ amountNanos: string;
1827
+ };
1828
+ components: Array<{
1829
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1830
+ quantity: string;
1831
+ rateAmountNanosPerMillion: string;
1832
+ chargeAmountNanos: string;
1833
+ }>;
1834
+ ratedAt: string;
1835
+ } | {
1836
+ status: "unpriceable";
1837
+ source: "estimate" | "provider" | "unknown";
1838
+ estimate?: {
1839
+ status: "rated";
1840
+ money: {
1841
+ currency: string;
1842
+ amountNanos: string;
1843
+ };
1844
+ components: Array<{
1845
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1846
+ quantity: string;
1847
+ rateAmountNanosPerMillion: string;
1848
+ chargeAmountNanos: string;
1849
+ }>;
1850
+ } | {
1851
+ status: "unpriceable";
1852
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1853
+ missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1854
+ };
1855
+ billingIdentity?: {
1856
+ providerId: string;
1857
+ modelId: string;
1858
+ };
1859
+ pricingContext: {
1860
+ serviceTier?: string;
1861
+ batch?: boolean;
1862
+ region?: string;
1863
+ inferenceGeo?: string;
1864
+ routedProviderId?: string;
1865
+ routedModelId?: string;
1866
+ deploymentId?: string;
1867
+ inferenceProfileId?: string;
1868
+ cacheWriteTtlSeconds?: number;
1869
+ mode?: string;
1870
+ };
1871
+ priceSource?: {
1872
+ sourceId: string;
1873
+ sourceEntryId: string;
1874
+ sourceVersion: string;
1875
+ sourceUrl?: string;
1876
+ observedAt: string;
1877
+ };
1878
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1879
+ missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1880
+ ratedAt: string;
1881
+ };
1882
+ valuationStatus: "rated" | "unpriceable" | "unvalued";
1883
+ }>;
1884
+ hasMore: boolean;
1885
+ total: number;
1886
+ };
1887
+ };
1888
+ export type ListAiModelCallsResponse = ListAiModelCallsResponses[keyof ListAiModelCallsResponses];
1889
+ export type ListAiLimitPoliciesData = {
1890
+ body?: never;
1891
+ path?: never;
1892
+ query?: {
1893
+ includeDisabled?: "true" | "false";
1894
+ };
1895
+ url: "/api/ai/limits";
1896
+ };
1897
+ export type ListAiLimitPoliciesErrors = {
1898
+ /**
1899
+ * Response for status 400
1900
+ */
1901
+ 400: {
1902
+ error: string;
1903
+ };
1904
+ /**
1905
+ * Response for status 403
1906
+ */
1907
+ 403: {
1908
+ error: string;
1909
+ };
1910
+ /**
1911
+ * Response for status 501
1912
+ */
1913
+ 501: {
1914
+ error: string;
1915
+ };
1916
+ };
1917
+ export type ListAiLimitPoliciesError = ListAiLimitPoliciesErrors[keyof ListAiLimitPoliciesErrors];
1918
+ export type ListAiLimitPoliciesResponses = {
1919
+ /**
1920
+ * Response for status 200
1921
+ */
1922
+ 200: {
1923
+ items: Array<{
1924
+ id: string;
1925
+ subject: {
1926
+ type: "project";
1927
+ } | {
1928
+ type: "group";
1929
+ id: string;
1930
+ } | {
1931
+ type: "user";
1932
+ id: string;
1933
+ } | {
1934
+ type: "serviceAccount";
1935
+ id: string;
1936
+ };
1937
+ limit: {
1938
+ meter: "tokens.total";
1939
+ amount: number;
1940
+ } | {
1941
+ meter: "cost.catalogEstimated";
1942
+ amount: {
1943
+ currency: "USD";
1944
+ amountNanos: string;
1945
+ };
1946
+ };
1947
+ period: "calendarMonth";
1948
+ enabled: boolean;
1949
+ createdAt: string;
1950
+ updatedAt: string;
1951
+ }>;
1952
+ capabilities: {
1953
+ manage: boolean;
1954
+ };
1955
+ };
1956
+ };
1957
+ export type ListAiLimitPoliciesResponse = ListAiLimitPoliciesResponses[keyof ListAiLimitPoliciesResponses];
1958
+ export type CreateAiLimitPolicyData = {
1959
+ body: {
1960
+ subject: {
1961
+ type: "project";
1962
+ } | {
1963
+ type: "group";
1964
+ id: string;
1965
+ } | {
1966
+ type: "user";
1967
+ id: string;
1968
+ } | {
1969
+ type: "serviceAccount";
1970
+ id: string;
1971
+ };
1972
+ limit: {
1973
+ meter: "tokens.total";
1974
+ amount: number;
1975
+ } | {
1976
+ meter: "cost.catalogEstimated";
1977
+ amount: {
1978
+ currency: "USD";
1979
+ amountNanos: string;
1980
+ };
1981
+ };
1982
+ enabled?: boolean;
1983
+ };
1984
+ path?: never;
1985
+ query?: never;
1986
+ url: "/api/ai/limits";
1987
+ };
1988
+ export type CreateAiLimitPolicyErrors = {
1989
+ /**
1990
+ * Response for status 400
1991
+ */
1992
+ 400: {
1993
+ error: string;
1994
+ };
1995
+ /**
1996
+ * Response for status 403
1997
+ */
1998
+ 403: {
1999
+ error: string;
2000
+ };
2001
+ /**
2002
+ * Response for status 409
2003
+ */
2004
+ 409: {
2005
+ error: string;
2006
+ };
2007
+ /**
2008
+ * Response for status 501
2009
+ */
2010
+ 501: {
2011
+ error: string;
2012
+ };
2013
+ };
2014
+ export type CreateAiLimitPolicyError = CreateAiLimitPolicyErrors[keyof CreateAiLimitPolicyErrors];
2015
+ export type CreateAiLimitPolicyResponses = {
2016
+ /**
2017
+ * Response for status 200
2018
+ */
2019
+ 200: {
2020
+ id: string;
2021
+ subject: {
2022
+ type: "project";
2023
+ } | {
2024
+ type: "group";
2025
+ id: string;
2026
+ } | {
2027
+ type: "user";
2028
+ id: string;
2029
+ } | {
2030
+ type: "serviceAccount";
2031
+ id: string;
2032
+ };
2033
+ limit: {
2034
+ meter: "tokens.total";
2035
+ amount: number;
2036
+ } | {
2037
+ meter: "cost.catalogEstimated";
2038
+ amount: {
2039
+ currency: "USD";
2040
+ amountNanos: string;
2041
+ };
2042
+ };
2043
+ period: "calendarMonth";
2044
+ enabled: boolean;
2045
+ createdAt: string;
2046
+ updatedAt: string;
2047
+ };
2048
+ };
2049
+ export type CreateAiLimitPolicyResponse = CreateAiLimitPolicyResponses[keyof CreateAiLimitPolicyResponses];
2050
+ export type GetAiLimitStatusData = {
2051
+ body?: never;
2052
+ path?: never;
2053
+ query?: {
2054
+ includeDisabled?: "true" | "false";
2055
+ };
2056
+ url: "/api/ai/limits/status";
2057
+ };
2058
+ export type GetAiLimitStatusErrors = {
2059
+ /**
2060
+ * Response for status 400
2061
+ */
2062
+ 400: {
2063
+ error: string;
2064
+ };
2065
+ /**
2066
+ * Response for status 403
2067
+ */
2068
+ 403: {
2069
+ error: string;
2070
+ };
2071
+ /**
2072
+ * Response for status 501
2073
+ */
2074
+ 501: {
2075
+ error: string;
2076
+ };
2077
+ };
2078
+ export type GetAiLimitStatusError = GetAiLimitStatusErrors[keyof GetAiLimitStatusErrors];
2079
+ export type GetAiLimitStatusResponses = {
2080
+ /**
2081
+ * Response for status 200
2082
+ */
2083
+ 200: {
2084
+ items: Array<{
2085
+ policy: {
2086
+ id: string;
2087
+ subject: {
2088
+ type: "project";
2089
+ } | {
2090
+ type: "group";
2091
+ id: string;
2092
+ } | {
2093
+ type: "user";
2094
+ id: string;
2095
+ } | {
2096
+ type: "serviceAccount";
2097
+ id: string;
2098
+ };
2099
+ limit: {
2100
+ meter: "tokens.total";
2101
+ amount: number;
2102
+ } | {
2103
+ meter: "cost.catalogEstimated";
2104
+ amount: {
2105
+ currency: "USD";
2106
+ amountNanos: string;
2107
+ };
2108
+ };
2109
+ period: "calendarMonth";
2110
+ enabled: boolean;
2111
+ createdAt: string;
2112
+ updatedAt: string;
2113
+ };
2114
+ period: {
2115
+ kind: "calendarMonth";
2116
+ start: string;
2117
+ end: string;
2118
+ resetAt: string;
2119
+ };
2120
+ consumption: {
2121
+ actual: {
2122
+ meter: "tokens.total";
2123
+ amount: number;
2124
+ } | {
2125
+ meter: "cost.catalogEstimated";
2126
+ amount: {
2127
+ currency: "USD";
2128
+ amountNanos: string;
2129
+ };
2130
+ };
2131
+ reserved: {
2132
+ meter: "tokens.total";
2133
+ amount: number;
2134
+ } | {
2135
+ meter: "cost.catalogEstimated";
2136
+ amount: {
2137
+ currency: "USD";
2138
+ amountNanos: string;
2139
+ };
2140
+ };
2141
+ unknown: {
2142
+ meter: "tokens.total";
2143
+ amount: number;
2144
+ } | {
2145
+ meter: "cost.catalogEstimated";
2146
+ amount: {
2147
+ currency: "USD";
2148
+ amountNanos: string;
2149
+ };
2150
+ };
2151
+ remaining: {
2152
+ meter: "tokens.total";
2153
+ amount: number;
2154
+ } | {
2155
+ meter: "cost.catalogEstimated";
2156
+ amount: {
2157
+ currency: "USD";
2158
+ amountNanos: string;
2159
+ };
2160
+ };
2161
+ };
2162
+ accountingStatus: "complete" | "unavailable";
2163
+ exhausted: boolean;
2164
+ orphaned: boolean;
2165
+ }>;
2166
+ capabilities: {
2167
+ manage: boolean;
2168
+ };
2169
+ };
2170
+ };
2171
+ export type GetAiLimitStatusResponse = GetAiLimitStatusResponses[keyof GetAiLimitStatusResponses];
2172
+ export type GetAiLimitSubjectOptionsData = {
2173
+ body?: never;
2174
+ path?: never;
2175
+ query?: never;
2176
+ url: "/api/ai/limits/subjects";
2177
+ };
2178
+ export type GetAiLimitSubjectOptionsErrors = {
2179
+ /**
2180
+ * Response for status 400
2181
+ */
2182
+ 400: {
2183
+ error: string;
2184
+ };
2185
+ /**
2186
+ * Response for status 403
2187
+ */
2188
+ 403: {
2189
+ error: string;
2190
+ };
2191
+ };
2192
+ export type GetAiLimitSubjectOptionsError = GetAiLimitSubjectOptionsErrors[keyof GetAiLimitSubjectOptionsErrors];
2193
+ export type GetAiLimitSubjectOptionsResponses = {
2194
+ /**
2195
+ * Response for status 200
2196
+ */
2197
+ 200: {
2198
+ groups: Array<{
2199
+ id: string;
2200
+ label?: string;
2201
+ description?: string;
2202
+ }>;
2203
+ users: Array<{
2204
+ id: string;
2205
+ email: string;
2206
+ displayName?: string;
2207
+ status: "active" | "suspended";
2208
+ }>;
2209
+ serviceAccounts: Array<{
2210
+ id: string;
2211
+ name: string;
2212
+ description?: string;
2213
+ status: "active" | "suspended";
2214
+ }>;
2215
+ };
2216
+ };
2217
+ export type GetAiLimitSubjectOptionsResponse = GetAiLimitSubjectOptionsResponses[keyof GetAiLimitSubjectOptionsResponses];
2218
+ export type DeleteAiLimitPolicyData = {
2219
+ body?: never;
2220
+ path: {
2221
+ limitId: string;
2222
+ };
2223
+ query?: never;
2224
+ url: "/api/ai/limits/{limitId}";
2225
+ };
2226
+ export type DeleteAiLimitPolicyErrors = {
2227
+ /**
2228
+ * Response for status 400
2229
+ */
2230
+ 400: {
2231
+ error: string;
2232
+ };
2233
+ /**
2234
+ * Response for status 403
2235
+ */
2236
+ 403: {
2237
+ error: string;
2238
+ };
2239
+ /**
2240
+ * Response for status 404
2241
+ */
2242
+ 404: {
2243
+ error: string;
2244
+ };
2245
+ /**
2246
+ * Response for status 501
2247
+ */
2248
+ 501: {
2249
+ error: string;
2250
+ };
2251
+ };
2252
+ export type DeleteAiLimitPolicyError = DeleteAiLimitPolicyErrors[keyof DeleteAiLimitPolicyErrors];
2253
+ export type DeleteAiLimitPolicyResponses = {
2254
+ /**
2255
+ * Response for status 200
2256
+ */
2257
+ 200: {
2258
+ success: boolean;
2259
+ };
2260
+ };
2261
+ export type DeleteAiLimitPolicyResponse = DeleteAiLimitPolicyResponses[keyof DeleteAiLimitPolicyResponses];
2262
+ export type UpdateAiLimitPolicyData = {
2263
+ body: {
2264
+ limit?: {
2265
+ meter: "tokens.total";
2266
+ amount: number;
2267
+ } | {
2268
+ meter: "cost.catalogEstimated";
2269
+ amount: {
2270
+ currency: "USD";
2271
+ amountNanos: string;
2272
+ };
2273
+ };
2274
+ enabled?: boolean;
2275
+ };
2276
+ path: {
2277
+ limitId: string;
2278
+ };
2279
+ query?: never;
2280
+ url: "/api/ai/limits/{limitId}";
2281
+ };
2282
+ export type UpdateAiLimitPolicyErrors = {
2283
+ /**
2284
+ * Response for status 400
2285
+ */
2286
+ 400: {
2287
+ error: string;
2288
+ };
2289
+ /**
2290
+ * Response for status 403
2291
+ */
2292
+ 403: {
2293
+ error: string;
2294
+ };
2295
+ /**
2296
+ * Response for status 404
2297
+ */
2298
+ 404: {
2299
+ error: string;
2300
+ };
2301
+ /**
2302
+ * Response for status 501
2303
+ */
2304
+ 501: {
2305
+ error: string;
2306
+ };
2307
+ };
2308
+ export type UpdateAiLimitPolicyError = UpdateAiLimitPolicyErrors[keyof UpdateAiLimitPolicyErrors];
2309
+ export type UpdateAiLimitPolicyResponses = {
2310
+ /**
2311
+ * Response for status 200
2312
+ */
2313
+ 200: {
2314
+ id: string;
2315
+ subject: {
2316
+ type: "project";
2317
+ } | {
2318
+ type: "group";
2319
+ id: string;
2320
+ } | {
2321
+ type: "user";
2322
+ id: string;
2323
+ } | {
2324
+ type: "serviceAccount";
2325
+ id: string;
2326
+ };
2327
+ limit: {
2328
+ meter: "tokens.total";
2329
+ amount: number;
2330
+ } | {
2331
+ meter: "cost.catalogEstimated";
2332
+ amount: {
2333
+ currency: "USD";
2334
+ amountNanos: string;
2335
+ };
2336
+ };
2337
+ period: "calendarMonth";
2338
+ enabled: boolean;
2339
+ createdAt: string;
2340
+ updatedAt: string;
1602
2341
  };
1603
2342
  };
1604
- export type GetAiAccountingOverviewResponse = GetAiAccountingOverviewResponses[keyof GetAiAccountingOverviewResponses];
1605
- export type ListAiModelCallsData = {
2343
+ export type UpdateAiLimitPolicyResponse = UpdateAiLimitPolicyResponses[keyof UpdateAiLimitPolicyResponses];
2344
+ export type ListAiModelCallGroupsData = {
1606
2345
  body?: never;
1607
2346
  path?: never;
1608
2347
  query: {
@@ -1610,20 +2349,25 @@ export type ListAiModelCallsData = {
1610
2349
  to: string;
1611
2350
  providerId?: string;
1612
2351
  modelId?: string;
1613
- executionId?: string;
1614
2352
  valuationStatus?: "rated" | "unpriceable" | "unvalued";
1615
2353
  limit?: string;
1616
2354
  offset?: string;
1617
2355
  };
1618
- url: "/api/ai/model-calls";
2356
+ url: "/api/ai/model-call-groups";
1619
2357
  };
1620
- export type ListAiModelCallsErrors = {
2358
+ export type ListAiModelCallGroupsErrors = {
1621
2359
  /**
1622
2360
  * Response for status 400
1623
2361
  */
1624
2362
  400: {
1625
2363
  error: string;
1626
2364
  };
2365
+ /**
2366
+ * Response for status 403
2367
+ */
2368
+ 403: {
2369
+ error: string;
2370
+ };
1627
2371
  /**
1628
2372
  * Response for status 501
1629
2373
  */
@@ -1631,118 +2375,86 @@ export type ListAiModelCallsErrors = {
1631
2375
  error: string;
1632
2376
  };
1633
2377
  };
1634
- export type ListAiModelCallsError = ListAiModelCallsErrors[keyof ListAiModelCallsErrors];
1635
- export type ListAiModelCallsResponses = {
2378
+ export type ListAiModelCallGroupsError = ListAiModelCallGroupsErrors[keyof ListAiModelCallGroupsErrors];
2379
+ export type ListAiModelCallGroupsResponses = {
1636
2380
  /**
1637
2381
  * Response for status 200
1638
2382
  */
1639
2383
  200: {
1640
2384
  items: Array<{
1641
- usage: {
1642
- id: string;
1643
- executionId: string;
1644
- attempt: number;
1645
- callId: string;
1646
- providerId: string;
1647
- requestedModelId: string;
1648
- responseModelId?: string;
1649
- responseId: string;
1650
- usage: {
1651
- inputTokens?: number;
1652
- outputTokens?: number;
1653
- totalTokens?: number;
1654
- uncachedInputTokens?: number;
1655
- cacheReadInputTokens?: number;
1656
- cacheWriteInputTokens?: number;
1657
- textOutputTokens?: number;
1658
- reasoningOutputTokens?: number;
1659
- reportingStatus: "complete" | "partial" | "unavailable";
1660
- };
1661
- occurredAt: string;
1662
- recordedAt: string;
1663
- };
2385
+ executionId: string;
1664
2386
  attribution?: {
1665
2387
  kind: "agent";
1666
- agentId: string;
1667
2388
  agentRunId: string;
1668
2389
  threadId: string;
1669
2390
  } | {
1670
2391
  kind: "workflowAgent";
1671
- agentId: string;
2392
+ agentStepId: string;
1672
2393
  nodeRunId: string;
1673
2394
  workflowId: string;
1674
2395
  workflowRunId: string;
2396
+ } | {
2397
+ kind: "subagent";
2398
+ subagentRunId: string;
2399
+ parentRunId: string;
1675
2400
  };
1676
- cost?: {
1677
- status: "rated";
1678
- billingIdentity: {
1679
- providerId: string;
1680
- modelId: string;
1681
- };
1682
- pricingContext: {
1683
- serviceTier?: string;
1684
- batch?: boolean;
1685
- region?: string;
1686
- inferenceGeo?: string;
1687
- routedProviderId?: string;
1688
- deploymentId?: string;
1689
- inferenceProfileId?: string;
1690
- cacheWriteTtlSeconds?: number;
1691
- mode?: string;
1692
- };
1693
- priceSource: {
1694
- sourceId: string;
1695
- sourceEntryId: string;
1696
- sourceVersion: string;
1697
- sourceUrl: string;
1698
- observedAt: string;
1699
- };
1700
- money: {
2401
+ modelCallCount: number;
2402
+ totalTokens?: number;
2403
+ costs: {
2404
+ amounts: Array<{
1701
2405
  currency: string;
1702
2406
  amountNanos: string;
1703
- };
1704
- components: Array<{
1705
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1706
- quantity: string;
1707
- rateAmountNanosPerMillion: string;
1708
- chargeAmountNanos: string;
1709
2407
  }>;
1710
- ratedAt: string;
1711
- } | {
1712
- status: "unpriceable";
1713
- billingIdentity?: {
1714
- providerId: string;
1715
- modelId: string;
1716
- };
1717
- pricingContext: {
1718
- serviceTier?: string;
1719
- batch?: boolean;
1720
- region?: string;
1721
- inferenceGeo?: string;
1722
- routedProviderId?: string;
1723
- deploymentId?: string;
1724
- inferenceProfileId?: string;
1725
- cacheWriteTtlSeconds?: number;
1726
- mode?: string;
2408
+ ratedCallCount: number;
2409
+ unpriceableCallCount: number;
2410
+ unvaluedCallCount: number;
2411
+ };
2412
+ firstCallAt: string;
2413
+ lastCallAt: string;
2414
+ label?: string;
2415
+ executions: Array<{
2416
+ executionId: string;
2417
+ attribution?: {
2418
+ kind: "agent";
2419
+ agentRunId: string;
2420
+ threadId: string;
2421
+ } | {
2422
+ kind: "workflowAgent";
2423
+ agentStepId: string;
2424
+ nodeRunId: string;
2425
+ workflowId: string;
2426
+ workflowRunId: string;
2427
+ } | {
2428
+ kind: "subagent";
2429
+ subagentRunId: string;
2430
+ parentRunId: string;
1727
2431
  };
1728
- priceSource: {
1729
- sourceId: string;
1730
- sourceEntryId: string;
1731
- sourceVersion: string;
1732
- sourceUrl: string;
1733
- observedAt: string;
2432
+ modelCallCount: number;
2433
+ totalTokens?: number;
2434
+ costs: {
2435
+ amounts: Array<{
2436
+ currency: string;
2437
+ amountNanos: string;
2438
+ }>;
2439
+ ratedCallCount: number;
2440
+ unpriceableCallCount: number;
2441
+ unvaluedCallCount: number;
1734
2442
  };
1735
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1736
- missingMeters?: Array<"tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning">;
1737
- ratedAt: string;
1738
- };
1739
- valuationStatus: "rated" | "unpriceable" | "unvalued";
2443
+ firstCallAt: string;
2444
+ lastCallAt: string;
2445
+ models: Array<{
2446
+ providerId: string;
2447
+ modelId: string;
2448
+ }>;
2449
+ label?: string;
2450
+ }>;
2451
+ canOpenThread: boolean;
1740
2452
  }>;
1741
- hasMore: boolean;
1742
2453
  total: number;
2454
+ hasMore: boolean;
1743
2455
  };
1744
2456
  };
1745
- export type ListAiModelCallsResponse = ListAiModelCallsResponses[keyof ListAiModelCallsResponses];
2457
+ export type ListAiModelCallGroupsResponse = ListAiModelCallGroupsResponses[keyof ListAiModelCallGroupsResponses];
1746
2458
  export type GetProjectInfoData = {
1747
2459
  body?: never;
1748
2460
  path?: never;
@@ -3852,7 +4564,6 @@ export type ListWorkflowsResponses = {
3852
4564
  type: "agent";
3853
4565
  id: string;
3854
4566
  key: string;
3855
- agentId: string;
3856
4567
  input: {
3857
4568
  [key: string]: string | number | boolean | Array<unknown> | {
3858
4569
  [key: string]: unknown;
@@ -3873,7 +4584,7 @@ export type ListWorkflowsResponses = {
3873
4584
  startedAt: string;
3874
4585
  finishedAt?: string;
3875
4586
  error?: {
3876
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4587
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
3877
4588
  message: string;
3878
4589
  retryable: boolean;
3879
4590
  at: string;
@@ -3968,7 +4679,6 @@ export type GetWorkflowResponses = {
3968
4679
  type: "agent";
3969
4680
  id: string;
3970
4681
  key: string;
3971
- agentId: string;
3972
4682
  input: {
3973
4683
  [key: string]: string | number | boolean | Array<unknown> | {
3974
4684
  [key: string]: unknown;
@@ -3989,7 +4699,7 @@ export type GetWorkflowResponses = {
3989
4699
  startedAt: string;
3990
4700
  finishedAt?: string;
3991
4701
  error?: {
3992
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4702
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
3993
4703
  message: string;
3994
4704
  retryable: boolean;
3995
4705
  at: string;
@@ -4374,7 +5084,7 @@ export type ListWorkflowRunsResponses = {
4374
5084
  startedAt: string;
4375
5085
  finishedAt?: string;
4376
5086
  error?: {
4377
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5087
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4378
5088
  message: string;
4379
5089
  retryable: boolean;
4380
5090
  at: string;
@@ -4439,7 +5149,7 @@ export type GetWorkflowRunResponses = {
4439
5149
  startedAt: string;
4440
5150
  finishedAt?: string;
4441
5151
  error?: {
4442
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5152
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4443
5153
  message: string;
4444
5154
  retryable: boolean;
4445
5155
  at: string;
@@ -4489,7 +5199,7 @@ export type GetWorkflowRunResponses = {
4489
5199
  } | null;
4490
5200
  };
4491
5201
  error?: {
4492
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5202
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4493
5203
  message: string;
4494
5204
  retryable: boolean;
4495
5205
  at: string;
@@ -4502,7 +5212,6 @@ export type GetWorkflowRunResponses = {
4502
5212
  truncated?: true;
4503
5213
  };
4504
5214
  agentExecution?: {
4505
- agentId: string;
4506
5215
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
4507
5216
  attempt: number;
4508
5217
  modelId?: string;
@@ -4569,7 +5278,6 @@ export type GetWorkflowAgentNodeExecutionResponses = {
4569
5278
  * Response for status 200
4570
5279
  */
4571
5280
  200: {
4572
- agentId: string;
4573
5281
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
4574
5282
  attempt: number;
4575
5283
  modelId?: string;
@@ -4634,6 +5342,15 @@ export type GetWorkflowAgentNodeExecutionResponses = {
4634
5342
  providerMetadata?: string | number | boolean | Array<unknown> | {
4635
5343
  [key: string]: unknown;
4636
5344
  } | null;
5345
+ } | {
5346
+ type: "provider-state";
5347
+ providerId: string;
5348
+ /**
5349
+ * Any JSON-compatible value.
5350
+ */
5351
+ data: string | number | boolean | Array<unknown> | {
5352
+ [key: string]: unknown;
5353
+ } | null;
4637
5354
  } | {
4638
5355
  context: {
4639
5356
  kind: "object";
@@ -4706,7 +5423,7 @@ export type GetWorkflowAgentNodeExecutionResponses = {
4706
5423
  } | null>;
4707
5424
  failurePhase?: "agent-loop" | "structured-finalizer";
4708
5425
  error?: {
4709
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
5426
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4710
5427
  message: string;
4711
5428
  retryable: boolean;
4712
5429
  at: string;
@@ -4767,7 +5484,7 @@ export type CancelWorkflowRunResponses = {
4767
5484
  startedAt: string;
4768
5485
  finishedAt?: string;
4769
5486
  error?: {
4770
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5487
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4771
5488
  message: string;
4772
5489
  retryable: boolean;
4773
5490
  at: string;
@@ -4817,7 +5534,7 @@ export type CancelWorkflowRunResponses = {
4817
5534
  } | null;
4818
5535
  };
4819
5536
  error?: {
4820
- code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
5537
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
4821
5538
  message: string;
4822
5539
  retryable: boolean;
4823
5540
  at: string;
@@ -4830,7 +5547,6 @@ export type CancelWorkflowRunResponses = {
4830
5547
  truncated?: true;
4831
5548
  };
4832
5549
  agentExecution?: {
4833
- agentId: string;
4834
5550
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
4835
5551
  attempt: number;
4836
5552
  modelId?: string;
@@ -4870,6 +5586,10 @@ export type GetWorkflowRunFileContentData = {
4870
5586
  query: {
4871
5587
  path: string;
4872
5588
  disposition?: "inline" | "attachment";
5589
+ /**
5590
+ * Client cache key; the route still resolves the current file
5591
+ */
5592
+ v?: string;
4873
5593
  };
4874
5594
  url: "/api/workflow-runs/{runId}/files/content";
4875
5595
  };
@@ -4911,6 +5631,10 @@ export type HeadWorkflowRunFileContentData = {
4911
5631
  query: {
4912
5632
  path: string;
4913
5633
  disposition?: "inline" | "attachment";
5634
+ /**
5635
+ * Client cache key; the route still resolves the current file
5636
+ */
5637
+ v?: string;
4914
5638
  };
4915
5639
  url: "/api/workflow-runs/{runId}/files/content";
4916
5640
  };
@@ -4952,6 +5676,10 @@ export type GetWorkflowNodeRunFileContentData = {
4952
5676
  query: {
4953
5677
  path: string;
4954
5678
  disposition?: "inline" | "attachment";
5679
+ /**
5680
+ * Client cache key; the route still resolves the current file
5681
+ */
5682
+ v?: string;
4955
5683
  };
4956
5684
  url: "/api/workflow-runs/{runId}/nodes/{nodeKey}/files/content";
4957
5685
  };
@@ -4994,6 +5722,10 @@ export type HeadWorkflowNodeRunFileContentData = {
4994
5722
  query: {
4995
5723
  path: string;
4996
5724
  disposition?: "inline" | "attachment";
5725
+ /**
5726
+ * Client cache key; the route still resolves the current file
5727
+ */
5728
+ v?: string;
4997
5729
  };
4998
5730
  url: "/api/workflow-runs/{runId}/nodes/{nodeKey}/files/content";
4999
5731
  };
@@ -5773,6 +6505,10 @@ export type GetObjectFileContentData = {
5773
6505
  query: {
5774
6506
  path: string;
5775
6507
  disposition?: "inline" | "attachment";
6508
+ /**
6509
+ * Client cache key; the route still resolves the current file
6510
+ */
6511
+ v?: string;
5776
6512
  };
5777
6513
  url: "/api/objects/{objectTypeId}/{objectId}/files/content";
5778
6514
  };
@@ -5811,6 +6547,10 @@ export type HeadObjectFileContentData = {
5811
6547
  query: {
5812
6548
  path: string;
5813
6549
  disposition?: "inline" | "attachment";
6550
+ /**
6551
+ * Client cache key; the route still resolves the current file
6552
+ */
6553
+ v?: string;
5814
6554
  };
5815
6555
  url: "/api/objects/{objectTypeId}/{objectId}/files/content";
5816
6556
  };
@@ -6524,6 +7264,10 @@ export type GetActionRunFileContentData = {
6524
7264
  query: {
6525
7265
  path: string;
6526
7266
  disposition?: "inline" | "attachment";
7267
+ /**
7268
+ * Client cache key; the route still resolves the current file
7269
+ */
7270
+ v?: string;
6527
7271
  };
6528
7272
  url: "/api/action-runs/{runId}/files/content";
6529
7273
  };
@@ -6565,6 +7309,10 @@ export type HeadActionRunFileContentData = {
6565
7309
  query: {
6566
7310
  path: string;
6567
7311
  disposition?: "inline" | "attachment";
7312
+ /**
7313
+ * Client cache key; the route still resolves the current file
7314
+ */
7315
+ v?: string;
6568
7316
  };
6569
7317
  url: "/api/action-runs/{runId}/files/content";
6570
7318
  };
@@ -6597,43 +7345,11 @@ export type HeadActionRunFileContentResponses = {
6597
7345
  */
6598
7346
  206: unknown;
6599
7347
  };
6600
- export type ListAgentsData = {
6601
- body?: never;
6602
- path?: never;
6603
- query?: never;
6604
- url: "/api/agents";
6605
- };
6606
- export type ListAgentsResponses = {
6607
- /**
6608
- * Response for status 200
6609
- */
6610
- 200: Array<{
6611
- id: string;
6612
- name: string;
6613
- description?: string;
6614
- modelId?: string;
6615
- reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
6616
- groupIds: Array<string>;
6617
- loop?: {
6618
- stopWhen?: {
6619
- maxSteps?: number;
6620
- };
6621
- context?: {
6622
- windowTokens?: number;
6623
- reserveTokens?: number;
6624
- keepRecentTokens?: number;
6625
- };
6626
- };
6627
- }>;
6628
- };
6629
- export type ListAgentsResponse = ListAgentsResponses[keyof ListAgentsResponses];
6630
7348
  export type GetAgentData = {
6631
7349
  body?: never;
6632
- path: {
6633
- agentId: string;
6634
- };
7350
+ path?: never;
6635
7351
  query?: never;
6636
- url: "/api/agents/{agentId}";
7352
+ url: "/api/agent";
6637
7353
  };
6638
7354
  export type GetAgentErrors = {
6639
7355
  /**
@@ -6649,21 +7365,10 @@ export type GetAgentResponses = {
6649
7365
  * Response for status 200
6650
7366
  */
6651
7367
  200: {
6652
- id: string;
6653
7368
  name: string;
6654
- description?: string;
6655
- modelId?: string;
6656
- reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
6657
- groupIds: Array<string>;
6658
- loop?: {
6659
- stopWhen?: {
6660
- maxSteps?: number;
6661
- };
6662
- context?: {
6663
- windowTokens?: number;
6664
- reserveTokens?: number;
6665
- keepRecentTokens?: number;
6666
- };
7369
+ model: {
7370
+ provider: string;
7371
+ modelId: string;
6667
7372
  };
6668
7373
  };
6669
7374
  };
@@ -6672,7 +7377,6 @@ export type ListAgentThreadsData = {
6672
7377
  body?: never;
6673
7378
  path?: never;
6674
7379
  query?: {
6675
- agentId?: string;
6676
7380
  status?: "active" | "archived";
6677
7381
  limit?: string;
6678
7382
  offset?: string;
@@ -6703,7 +7407,6 @@ export type ListAgentThreadsResponses = {
6703
7407
  threads: Array<{
6704
7408
  id: string;
6705
7409
  projectId: string;
6706
- agentId: string;
6707
7410
  ownerPrincipal: {
6708
7411
  type: "user" | "serviceAccount" | "system";
6709
7412
  id: string;
@@ -6723,7 +7426,6 @@ export type ListAgentThreadsResponses = {
6723
7426
  export type ListAgentThreadsResponse = ListAgentThreadsResponses[keyof ListAgentThreadsResponses];
6724
7427
  export type CreateAgentThreadData = {
6725
7428
  body: {
6726
- agentId: string;
6727
7429
  title?: string;
6728
7430
  threadId?: string;
6729
7431
  };
@@ -6766,7 +7468,6 @@ export type CreateAgentThreadResponses = {
6766
7468
  thread: {
6767
7469
  id: string;
6768
7470
  projectId: string;
6769
- agentId: string;
6770
7471
  ownerPrincipal: {
6771
7472
  type: "user" | "serviceAccount" | "system";
6772
7473
  id: string;
@@ -6818,7 +7519,6 @@ export type GetAgentThreadResponses = {
6818
7519
  200: {
6819
7520
  id: string;
6820
7521
  projectId: string;
6821
- agentId: string;
6822
7522
  ownerPrincipal: {
6823
7523
  type: "user" | "serviceAccount" | "system";
6824
7524
  id: string;
@@ -6919,6 +7619,15 @@ export type ListAgentThreadMessagesResponses = {
6919
7619
  providerMetadata?: string | number | boolean | Array<unknown> | {
6920
7620
  [key: string]: unknown;
6921
7621
  } | null;
7622
+ } | {
7623
+ type: "provider-state";
7624
+ providerId: string;
7625
+ /**
7626
+ * Any JSON-compatible value.
7627
+ */
7628
+ data: string | number | boolean | Array<unknown> | {
7629
+ [key: string]: unknown;
7630
+ } | null;
6922
7631
  } | {
6923
7632
  context: {
6924
7633
  kind: "object";
@@ -7016,6 +7725,13 @@ export type ListAgentThreadMessagesResponse = ListAgentThreadMessagesResponses[k
7016
7725
  export type PostAgentThreadMessageData = {
7017
7726
  body: {
7018
7727
  text: string;
7728
+ model?: {
7729
+ provider: string;
7730
+ modelId: string;
7731
+ };
7732
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
7733
+ budgetTokens: number;
7734
+ };
7019
7735
  attachments?: Array<{
7020
7736
  blobId: string;
7021
7737
  digest: string;
@@ -7078,6 +7794,22 @@ export type PostAgentThreadMessageErrors = {
7078
7794
  409: {
7079
7795
  error: string;
7080
7796
  };
7797
+ /**
7798
+ * Response for status 429
7799
+ */
7800
+ 429: {
7801
+ error: string;
7802
+ /**
7803
+ * Stable machine-readable failure code for programmatic handling.
7804
+ */
7805
+ code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7806
+ /**
7807
+ * Any JSON-compatible value.
7808
+ */
7809
+ details?: string | number | boolean | Array<unknown> | {
7810
+ [key: string]: unknown;
7811
+ } | null;
7812
+ };
7081
7813
  /**
7082
7814
  * Response for status 501
7083
7815
  */
@@ -7095,13 +7827,19 @@ export type PostAgentThreadMessageResponses = {
7095
7827
  id: string;
7096
7828
  projectId: string;
7097
7829
  threadId: string;
7098
- agentId: string;
7099
7830
  triggerMessageId: string;
7100
7831
  requestedBy?: {
7101
7832
  type: "user" | "serviceAccount";
7102
7833
  id: string;
7103
7834
  };
7104
7835
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7836
+ model?: {
7837
+ provider: string;
7838
+ modelId: string;
7839
+ };
7840
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
7841
+ budgetTokens: number;
7842
+ };
7105
7843
  modelId?: string;
7106
7844
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7107
7845
  usage?: {
@@ -7132,7 +7870,7 @@ export type PostAgentThreadMessageResponses = {
7132
7870
  message: string;
7133
7871
  }>;
7134
7872
  error?: {
7135
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
7873
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7136
7874
  message: string;
7137
7875
  retryable: boolean;
7138
7876
  at: string;
@@ -7162,6 +7900,10 @@ export type GetAgentMessageFileContentData = {
7162
7900
  query: {
7163
7901
  path: string;
7164
7902
  disposition?: "inline" | "attachment";
7903
+ /**
7904
+ * Client cache key; the route still resolves the current file
7905
+ */
7906
+ v?: string;
7165
7907
  };
7166
7908
  url: "/api/agent-threads/{threadId}/messages/{messageId}/files/content";
7167
7909
  };
@@ -7204,6 +7946,10 @@ export type HeadAgentMessageFileContentData = {
7204
7946
  query: {
7205
7947
  path: string;
7206
7948
  disposition?: "inline" | "attachment";
7949
+ /**
7950
+ * Client cache key; the route still resolves the current file
7951
+ */
7952
+ v?: string;
7207
7953
  };
7208
7954
  url: "/api/agent-threads/{threadId}/messages/{messageId}/files/content";
7209
7955
  };
@@ -7282,13 +8028,19 @@ export type CancelAgentRunResponses = {
7282
8028
  id: string;
7283
8029
  projectId: string;
7284
8030
  threadId: string;
7285
- agentId: string;
7286
8031
  triggerMessageId: string;
7287
8032
  requestedBy?: {
7288
8033
  type: "user" | "serviceAccount";
7289
8034
  id: string;
7290
8035
  };
7291
8036
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8037
+ model?: {
8038
+ provider: string;
8039
+ modelId: string;
8040
+ };
8041
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8042
+ budgetTokens: number;
8043
+ };
7292
8044
  modelId?: string;
7293
8045
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7294
8046
  usage?: {
@@ -7319,7 +8071,7 @@ export type CancelAgentRunResponses = {
7319
8071
  message: string;
7320
8072
  }>;
7321
8073
  error?: {
7322
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8074
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7323
8075
  message: string;
7324
8076
  retryable: boolean;
7325
8077
  at: string;
@@ -7368,6 +8120,22 @@ export type RetryAgentRunErrors = {
7368
8120
  409: {
7369
8121
  error: string;
7370
8122
  };
8123
+ /**
8124
+ * Response for status 429
8125
+ */
8126
+ 429: {
8127
+ error: string;
8128
+ /**
8129
+ * Stable machine-readable failure code for programmatic handling.
8130
+ */
8131
+ code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
8132
+ /**
8133
+ * Any JSON-compatible value.
8134
+ */
8135
+ details?: string | number | boolean | Array<unknown> | {
8136
+ [key: string]: unknown;
8137
+ } | null;
8138
+ };
7371
8139
  /**
7372
8140
  * Response for status 501
7373
8141
  */
@@ -7385,13 +8153,19 @@ export type RetryAgentRunResponses = {
7385
8153
  id: string;
7386
8154
  projectId: string;
7387
8155
  threadId: string;
7388
- agentId: string;
7389
8156
  triggerMessageId: string;
7390
8157
  requestedBy?: {
7391
8158
  type: "user" | "serviceAccount";
7392
8159
  id: string;
7393
8160
  };
7394
8161
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8162
+ model?: {
8163
+ provider: string;
8164
+ modelId: string;
8165
+ };
8166
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8167
+ budgetTokens: number;
8168
+ };
7395
8169
  modelId?: string;
7396
8170
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7397
8171
  usage?: {
@@ -7422,7 +8196,7 @@ export type RetryAgentRunResponses = {
7422
8196
  message: string;
7423
8197
  }>;
7424
8198
  error?: {
7425
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8199
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7426
8200
  message: string;
7427
8201
  retryable: boolean;
7428
8202
  at: string;
@@ -7486,13 +8260,19 @@ export type ListAgentThreadRunsResponses = {
7486
8260
  id: string;
7487
8261
  projectId: string;
7488
8262
  threadId: string;
7489
- agentId: string;
7490
8263
  triggerMessageId: string;
7491
8264
  requestedBy?: {
7492
8265
  type: "user" | "serviceAccount";
7493
8266
  id: string;
7494
8267
  };
7495
8268
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8269
+ model?: {
8270
+ provider: string;
8271
+ modelId: string;
8272
+ };
8273
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8274
+ budgetTokens: number;
8275
+ };
7496
8276
  modelId?: string;
7497
8277
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7498
8278
  usage?: {
@@ -7523,7 +8303,7 @@ export type ListAgentThreadRunsResponses = {
7523
8303
  message: string;
7524
8304
  }>;
7525
8305
  error?: {
7526
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8306
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7527
8307
  message: string;
7528
8308
  retryable: boolean;
7529
8309
  at: string;
@@ -7583,13 +8363,19 @@ export type GetAgentRunResponses = {
7583
8363
  id: string;
7584
8364
  projectId: string;
7585
8365
  threadId: string;
7586
- agentId: string;
7587
8366
  triggerMessageId: string;
7588
8367
  requestedBy?: {
7589
8368
  type: "user" | "serviceAccount";
7590
8369
  id: string;
7591
8370
  };
7592
8371
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
8372
+ model?: {
8373
+ provider: string;
8374
+ modelId: string;
8375
+ };
8376
+ reasoning?: "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
8377
+ budgetTokens: number;
8378
+ };
7593
8379
  modelId?: string;
7594
8380
  finishReason?: "stop" | "length" | "content-filter" | "tool-calls" | "timeout" | "error" | "other" | "unknown";
7595
8381
  usage?: {
@@ -7620,7 +8406,7 @@ export type GetAgentRunResponses = {
7620
8406
  message: string;
7621
8407
  }>;
7622
8408
  error?: {
7623
- code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
8409
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
7624
8410
  message: string;
7625
8411
  retryable: boolean;
7626
8412
  at: string;
@@ -7655,6 +8441,23 @@ export type ListModelsResponses = {
7655
8441
  provider: string;
7656
8442
  modelId: string;
7657
8443
  isDefault: boolean;
8444
+ name: string;
8445
+ description?: string;
8446
+ publisher: {
8447
+ id: string;
8448
+ name: string;
8449
+ };
8450
+ via?: string;
8451
+ capabilities: {
8452
+ input: Array<"text" | "image" | "audio" | "video" | "pdf">;
8453
+ output: Array<"text" | "image" | "audio" | "video" | "pdf">;
8454
+ attachments?: boolean;
8455
+ reasoning?: boolean;
8456
+ tools?: boolean;
8457
+ structuredOutput?: boolean;
8458
+ contextWindowTokens?: number;
8459
+ };
8460
+ reasoningLevels: Array<"provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max">;
7658
8461
  }>;
7659
8462
  };
7660
8463
  };