@abliteration/sdk 0.1.4 → 0.1.5

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 (38) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +3 -0
  3. package/dist/apis/ModelsApi.d.ts +91 -8
  4. package/dist/apis/ModelsApi.js +80 -5
  5. package/dist/esm/apis/ModelsApi.d.ts +91 -8
  6. package/dist/esm/apis/ModelsApi.js +79 -4
  7. package/dist/esm/models/DelistedModel.d.ts +54 -0
  8. package/dist/esm/models/DelistedModel.js +53 -0
  9. package/dist/esm/models/ListDelistedModels200Response.d.ts +67 -0
  10. package/dist/esm/models/ListDelistedModels200Response.js +79 -0
  11. package/dist/esm/models/ModelDetail.d.ts +8 -0
  12. package/dist/esm/models/ModelDetail.js +2 -2
  13. package/dist/esm/models/ModelSummary.d.ts +8 -0
  14. package/dist/esm/models/ModelSummary.js +4 -0
  15. package/dist/esm/models/index.d.ts +2 -0
  16. package/dist/esm/models/index.js +2 -0
  17. package/dist/models/DelistedModel.d.ts +54 -0
  18. package/dist/models/DelistedModel.js +60 -0
  19. package/dist/models/ListDelistedModels200Response.d.ts +67 -0
  20. package/dist/models/ListDelistedModels200Response.js +87 -0
  21. package/dist/models/ModelDetail.d.ts +8 -0
  22. package/dist/models/ModelDetail.js +2 -2
  23. package/dist/models/ModelSummary.d.ts +8 -0
  24. package/dist/models/ModelSummary.js +4 -0
  25. package/dist/models/index.d.ts +2 -0
  26. package/dist/models/index.js +2 -0
  27. package/docs/DelistedModel.md +46 -0
  28. package/docs/ListDelistedModels200Response.md +48 -0
  29. package/docs/ModelDetail.md +4 -0
  30. package/docs/ModelSummary.md +4 -0
  31. package/docs/ModelsApi.md +91 -3
  32. package/package.json +1 -1
  33. package/src/apis/ModelsApi.ts +152 -8
  34. package/src/models/DelistedModel.ts +99 -0
  35. package/src/models/ListDelistedModels200Response.ts +132 -0
  36. package/src/models/ModelDetail.ts +12 -0
  37. package/src/models/ModelSummary.ts +12 -0
  38. package/src/models/index.ts +2 -0
@@ -18,6 +18,11 @@ import {
18
18
  GetModel200ResponseFromJSON,
19
19
  GetModel200ResponseToJSON,
20
20
  } from '../models/GetModel200Response';
21
+ import {
22
+ type ListDelistedModels200Response,
23
+ ListDelistedModels200ResponseFromJSON,
24
+ ListDelistedModels200ResponseToJSON,
25
+ } from '../models/ListDelistedModels200Response';
21
26
  import {
22
27
  type ListModels200Response,
23
28
  ListModels200ResponseFromJSON,
@@ -31,6 +36,25 @@ export interface GetModelRequest {
31
36
  id: string;
32
37
  }
33
38
 
39
+ export interface ListDelistedModelsRequest {
40
+ /**
41
+ * ISO-8601 date or timestamp. Rows with last_seen_at >= since only. Use your previous poll's newest last_seen_at to build an incremental feed.
42
+ */
43
+ since?: string;
44
+ /**
45
+ * `recent` (default, newest disappearance first) or `downloads` (biggest casualties first — best for post-mortem coverage).
46
+ */
47
+ sort?: ListDelistedModelsSortEnum;
48
+ /**
49
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
50
+ */
51
+ limit?: number;
52
+ /**
53
+ * Rows to skip. Negative and non-numeric values are treated as 0.
54
+ */
55
+ offset?: number;
56
+ }
57
+
34
58
  export interface ListModelsRequest {
35
59
  /**
36
60
  * M-code, case-insensitive. See GET /api/v1/methods.
@@ -64,6 +88,10 @@ export interface ListModelsRequest {
64
88
  * ISO-8601 date or timestamp, inclusive.
65
89
  */
66
90
  createdBefore?: string;
91
+ /**
92
+ * Tombstone filter. `live` (default): HF-visible models only. `dead`: delisted-only (same shape as this endpoint plus is_delisted=1 and last_seen_at). `all`: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
93
+ */
94
+ delisted?: ListModelsDelistedEnum;
67
95
  /**
68
96
  * Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names.
69
97
  */
@@ -94,7 +122,7 @@ export interface ModelsApiInterface {
94
122
  getModelRequestOpts(requestParameters: GetModelRequest): Promise<runtime.RequestOpts>;
95
123
 
96
124
  /**
97
- * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
125
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
98
126
  * @summary Get one model
99
127
  * @param {string} id
100
128
  * @param {*} [options] Override http request option.
@@ -104,11 +132,41 @@ export interface ModelsApiInterface {
104
132
  getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>>;
105
133
 
106
134
  /**
107
- * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
135
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
108
136
  * Get one model
109
137
  */
110
138
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
111
139
 
140
+ /**
141
+ * Creates request options for listDelistedModels without sending the request
142
+ * @param {string} [since] ISO-8601 date or timestamp. Rows with last_seen_at &gt;&#x3D; since only. Use your previous poll\&#39;s newest last_seen_at to build an incremental feed.
143
+ * @param {'recent' | 'downloads'} [sort] &#x60;recent&#x60; (default, newest disappearance first) or &#x60;downloads&#x60; (biggest casualties first — best for post-mortem coverage).
144
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
145
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
146
+ * @throws {RequiredError}
147
+ * @memberof ModelsApiInterface
148
+ */
149
+ listDelistedModelsRequestOpts(requestParameters: ListDelistedModelsRequest): Promise<runtime.RequestOpts>;
150
+
151
+ /**
152
+ * Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
153
+ * @summary List delisted models (change stream)
154
+ * @param {string} [since] ISO-8601 date or timestamp. Rows with last_seen_at &gt;&#x3D; since only. Use your previous poll\&#39;s newest last_seen_at to build an incremental feed.
155
+ * @param {'recent' | 'downloads'} [sort] &#x60;recent&#x60; (default, newest disappearance first) or &#x60;downloads&#x60; (biggest casualties first — best for post-mortem coverage).
156
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
157
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ * @memberof ModelsApiInterface
161
+ */
162
+ listDelistedModelsRaw(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDelistedModels200Response>>;
163
+
164
+ /**
165
+ * Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
166
+ * List delisted models (change stream)
167
+ */
168
+ listDelistedModels(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response>;
169
+
112
170
  /**
113
171
  * Creates request options for listModels without sending the request
114
172
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
@@ -119,6 +177,7 @@ export interface ModelsApiInterface {
119
177
  * @param {number} [downloadsLte]
120
178
  * @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
121
179
  * @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
180
+ * @param {'live' | 'dead' | 'all'} [delisted] Tombstone filter. &#x60;live&#x60; (default): HF-visible models only. &#x60;dead&#x60;: delisted-only (same shape as this endpoint plus is_delisted&#x3D;1 and last_seen_at). &#x60;all&#x60;: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
122
181
  * @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names.
123
182
  * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
124
183
  * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
@@ -128,7 +187,7 @@ export interface ModelsApiInterface {
128
187
  listModelsRequestOpts(requestParameters: ListModelsRequest): Promise<runtime.RequestOpts>;
129
188
 
130
189
  /**
131
- * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
190
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
132
191
  * @summary List models
133
192
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
134
193
  * @param {string} [family] Base family, for example qwen or llama.
@@ -138,6 +197,7 @@ export interface ModelsApiInterface {
138
197
  * @param {number} [downloadsLte]
139
198
  * @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
140
199
  * @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
200
+ * @param {'live' | 'dead' | 'all'} [delisted] Tombstone filter. &#x60;live&#x60; (default): HF-visible models only. &#x60;dead&#x60;: delisted-only (same shape as this endpoint plus is_delisted&#x3D;1 and last_seen_at). &#x60;all&#x60;: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
141
201
  * @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names.
142
202
  * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
143
203
  * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
@@ -148,7 +208,7 @@ export interface ModelsApiInterface {
148
208
  listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>>;
149
209
 
150
210
  /**
151
- * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
211
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
152
212
  * List models
153
213
  */
154
214
  listModels(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response>;
@@ -196,7 +256,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
196
256
  }
197
257
 
198
258
  /**
199
- * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
259
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
200
260
  * Get one model
201
261
  */
202
262
  async getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>> {
@@ -207,7 +267,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
207
267
  }
208
268
 
209
269
  /**
210
- * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
270
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
211
271
  * Get one model
212
272
  */
213
273
  async getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response> {
@@ -215,6 +275,69 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
215
275
  return await response.value();
216
276
  }
217
277
 
278
+ /**
279
+ * Creates request options for listDelistedModels without sending the request
280
+ */
281
+ async listDelistedModelsRequestOpts(requestParameters: ListDelistedModelsRequest): Promise<runtime.RequestOpts> {
282
+ const queryParameters: any = {};
283
+
284
+ if (requestParameters['since'] != null) {
285
+ queryParameters['since'] = requestParameters['since'];
286
+ }
287
+
288
+ if (requestParameters['sort'] != null) {
289
+ queryParameters['sort'] = requestParameters['sort'];
290
+ }
291
+
292
+ if (requestParameters['limit'] != null) {
293
+ queryParameters['limit'] = requestParameters['limit'];
294
+ }
295
+
296
+ if (requestParameters['offset'] != null) {
297
+ queryParameters['offset'] = requestParameters['offset'];
298
+ }
299
+
300
+ const headerParameters: runtime.HTTPHeaders = {};
301
+
302
+ if (this.configuration && this.configuration.accessToken) {
303
+ const token = this.configuration.accessToken;
304
+ const tokenString = await token("bearerAuth", []);
305
+
306
+ if (tokenString) {
307
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
308
+ }
309
+ }
310
+
311
+ let urlPath = `/api/v1/models/delisted`;
312
+
313
+ return {
314
+ path: urlPath,
315
+ method: 'GET',
316
+ headers: headerParameters,
317
+ query: queryParameters,
318
+ };
319
+ }
320
+
321
+ /**
322
+ * Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
323
+ * List delisted models (change stream)
324
+ */
325
+ async listDelistedModelsRaw(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDelistedModels200Response>> {
326
+ const requestOptions = await this.listDelistedModelsRequestOpts(requestParameters);
327
+ const response = await this.request(requestOptions, initOverrides);
328
+
329
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListDelistedModels200ResponseFromJSON(jsonValue));
330
+ }
331
+
332
+ /**
333
+ * Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
334
+ * List delisted models (change stream)
335
+ */
336
+ async listDelistedModels(requestParameters: ListDelistedModelsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response> {
337
+ const response = await this.listDelistedModelsRaw(requestParameters, initOverrides);
338
+ return await response.value();
339
+ }
340
+
218
341
  /**
219
342
  * Creates request options for listModels without sending the request
220
343
  */
@@ -253,6 +376,10 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
253
376
  queryParameters['created_before'] = requestParameters['createdBefore'];
254
377
  }
255
378
 
379
+ if (requestParameters['delisted'] != null) {
380
+ queryParameters['delisted'] = requestParameters['delisted'];
381
+ }
382
+
256
383
  if (requestParameters['sort'] != null) {
257
384
  queryParameters['sort'] = requestParameters['sort'];
258
385
  }
@@ -287,7 +414,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
287
414
  }
288
415
 
289
416
  /**
290
- * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
417
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
291
418
  * List models
292
419
  */
293
420
  async listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>> {
@@ -298,7 +425,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
298
425
  }
299
426
 
300
427
  /**
301
- * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
428
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
302
429
  * List models
303
430
  */
304
431
  async listModels(requestParameters: ListModelsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response> {
@@ -308,6 +435,23 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
308
435
 
309
436
  }
310
437
 
438
+ /**
439
+ * @export
440
+ */
441
+ export const ListDelistedModelsSortEnum = {
442
+ Recent: 'recent',
443
+ Downloads: 'downloads',
444
+ } as const;
445
+ export type ListDelistedModelsSortEnum = typeof ListDelistedModelsSortEnum[keyof typeof ListDelistedModelsSortEnum];
446
+ /**
447
+ * @export
448
+ */
449
+ export const ListModelsDelistedEnum = {
450
+ Live: 'live',
451
+ Dead: 'dead',
452
+ All: 'all',
453
+ } as const;
454
+ export type ListModelsDelistedEnum = typeof ListModelsDelistedEnum[keyof typeof ListModelsDelistedEnum];
311
455
  /**
312
456
  * @export
313
457
  */
@@ -0,0 +1,99 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * abliteration.org Public API
5
+ * Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface DelistedModel
20
+ */
21
+ export interface DelistedModel {
22
+ /**
23
+ *
24
+ */
25
+ id?: string;
26
+ /**
27
+ *
28
+ */
29
+ author?: string;
30
+ /**
31
+ *
32
+ */
33
+ family?: string | null;
34
+ /**
35
+ *
36
+ */
37
+ params_b?: number | null;
38
+ /**
39
+ * Downloads at the moment the model was last visible on HF. Not a live counter.
40
+ */
41
+ downloads?: number;
42
+ /**
43
+ * ISO-8601 timestamp of the last successful Hub observation. Approximately when the model died.
44
+ */
45
+ last_seen_at?: string;
46
+ /**
47
+ * Whole days between last_seen_at and now, computed server-side for convenience.
48
+ */
49
+ days_since_gone?: number;
50
+ }
51
+
52
+ /**
53
+ * Check if a given object implements the DelistedModel interface.
54
+ */
55
+ export function instanceOfDelistedModel(value: object): value is DelistedModel {
56
+ return true;
57
+ }
58
+
59
+ export function DelistedModelFromJSON(json: any): DelistedModel {
60
+ return DelistedModelFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function DelistedModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): DelistedModel {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'id': json['id'] == null ? undefined : json['id'],
70
+ 'author': json['author'] == null ? undefined : json['author'],
71
+ 'family': json['family'] === undefined ? undefined : json['family'] === null ? null : json['family'],
72
+ 'params_b': json['params_b'] === undefined ? undefined : json['params_b'] === null ? null : json['params_b'],
73
+ 'downloads': json['downloads'] == null ? undefined : json['downloads'],
74
+ 'last_seen_at': json['last_seen_at'] == null ? undefined : json['last_seen_at'],
75
+ 'days_since_gone': json['days_since_gone'] == null ? undefined : json['days_since_gone'],
76
+ };
77
+ }
78
+
79
+ export function DelistedModelToJSON(json: any): DelistedModel {
80
+ return DelistedModelToJSONTyped(json, false);
81
+ }
82
+
83
+ export function DelistedModelToJSONTyped(value?: DelistedModel | null, ignoreDiscriminator: boolean = false): any {
84
+ if (value == null) {
85
+ return value;
86
+ }
87
+
88
+ return {
89
+
90
+ 'id': value['id'],
91
+ 'author': value['author'],
92
+ 'family': value['family'],
93
+ 'params_b': value['params_b'],
94
+ 'downloads': value['downloads'],
95
+ 'last_seen_at': value['last_seen_at'],
96
+ 'days_since_gone': value['days_since_gone'],
97
+ };
98
+ }
99
+
@@ -0,0 +1,132 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * abliteration.org Public API
5
+ * Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { DelistedModel } from './DelistedModel';
17
+ import {
18
+ DelistedModelFromJSON,
19
+ DelistedModelFromJSONTyped,
20
+ DelistedModelToJSON,
21
+ DelistedModelToJSONTyped,
22
+ } from './DelistedModel';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ListDelistedModels200Response
28
+ */
29
+ export interface ListDelistedModels200Response {
30
+ /**
31
+ *
32
+ */
33
+ data: Array<DelistedModel>;
34
+ /**
35
+ * Credits this call costs.
36
+ */
37
+ cost: number;
38
+ /**
39
+ * Wallet balance after the call. Unchanged while metering is preview.
40
+ */
41
+ credits_remaining: number;
42
+ /**
43
+ * Ceiling for the current window. Also returned as X-RateLimit-Limit.
44
+ */
45
+ rate_limit_limit: number;
46
+ /**
47
+ * Calls left in the current window for this key. Also returned as X-RateLimit-Remaining.
48
+ */
49
+ rate_limit_remaining: number;
50
+ /**
51
+ * Unix seconds at which the window resets to full ceiling. Also returned as X-RateLimit-Reset.
52
+ */
53
+ rate_limit_reset: number;
54
+ /**
55
+ * Whether cost was actually deducted.
56
+ */
57
+ metering: ListDelistedModels200ResponseMeteringEnum;
58
+ /**
59
+ * Also returned in the x-request-id header.
60
+ */
61
+ request_id: string;
62
+ }
63
+
64
+
65
+ /**
66
+ * @export
67
+ */
68
+ export const ListDelistedModels200ResponseMeteringEnum = {
69
+ Preview: 'preview',
70
+ Billed: 'billed',
71
+ } as const;
72
+ export type ListDelistedModels200ResponseMeteringEnum = typeof ListDelistedModels200ResponseMeteringEnum[keyof typeof ListDelistedModels200ResponseMeteringEnum];
73
+
74
+
75
+ /**
76
+ * Check if a given object implements the ListDelistedModels200Response interface.
77
+ */
78
+ export function instanceOfListDelistedModels200Response(value: object): value is ListDelistedModels200Response {
79
+ if (!('data' in value) || value['data'] === undefined) return false;
80
+ if (!('cost' in value) || value['cost'] === undefined) return false;
81
+ if (!('credits_remaining' in value) || value['credits_remaining'] === undefined) return false;
82
+ if (!('rate_limit_limit' in value) || value['rate_limit_limit'] === undefined) return false;
83
+ if (!('rate_limit_remaining' in value) || value['rate_limit_remaining'] === undefined) return false;
84
+ if (!('rate_limit_reset' in value) || value['rate_limit_reset'] === undefined) return false;
85
+ if (!('metering' in value) || value['metering'] === undefined) return false;
86
+ if (!('request_id' in value) || value['request_id'] === undefined) return false;
87
+ return true;
88
+ }
89
+
90
+ export function ListDelistedModels200ResponseFromJSON(json: any): ListDelistedModels200Response {
91
+ return ListDelistedModels200ResponseFromJSONTyped(json, false);
92
+ }
93
+
94
+ export function ListDelistedModels200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListDelistedModels200Response {
95
+ if (json == null) {
96
+ return json;
97
+ }
98
+ return {
99
+
100
+ 'data': ((json['data'] as Array<any>).map(DelistedModelFromJSON)),
101
+ 'cost': json['cost'],
102
+ 'credits_remaining': json['credits_remaining'],
103
+ 'rate_limit_limit': json['rate_limit_limit'],
104
+ 'rate_limit_remaining': json['rate_limit_remaining'],
105
+ 'rate_limit_reset': json['rate_limit_reset'],
106
+ 'metering': json['metering'],
107
+ 'request_id': json['request_id'],
108
+ };
109
+ }
110
+
111
+ export function ListDelistedModels200ResponseToJSON(json: any): ListDelistedModels200Response {
112
+ return ListDelistedModels200ResponseToJSONTyped(json, false);
113
+ }
114
+
115
+ export function ListDelistedModels200ResponseToJSONTyped(value?: ListDelistedModels200Response | null, ignoreDiscriminator: boolean = false): any {
116
+ if (value == null) {
117
+ return value;
118
+ }
119
+
120
+ return {
121
+
122
+ 'data': ((value['data'] as Array<any>).map(DelistedModelToJSON)),
123
+ 'cost': value['cost'],
124
+ 'credits_remaining': value['credits_remaining'],
125
+ 'rate_limit_limit': value['rate_limit_limit'],
126
+ 'rate_limit_remaining': value['rate_limit_remaining'],
127
+ 'rate_limit_reset': value['rate_limit_reset'],
128
+ 'metering': value['metering'],
129
+ 'request_id': value['request_id'],
130
+ };
131
+ }
132
+
@@ -116,6 +116,14 @@ export interface ModelDetail {
116
116
  *
117
117
  */
118
118
  last_seen_at?: string | null;
119
+ /**
120
+ * 0/1 flag. `1` means HF no longer serves this model — the response is the last state we recorded.
121
+ */
122
+ is_delisted?: number | null;
123
+ /**
124
+ * Whole days between last_seen_at and now. `null` unless is_delisted=1.
125
+ */
126
+ days_since_gone?: number | null;
119
127
  /**
120
128
  *
121
129
  */
@@ -266,6 +274,8 @@ export function ModelDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean
266
274
  'last_modified': json['last_modified'] === undefined ? undefined : json['last_modified'] === null ? null : json['last_modified'],
267
275
  'first_seen_at': json['first_seen_at'] === undefined ? undefined : json['first_seen_at'] === null ? null : json['first_seen_at'],
268
276
  'last_seen_at': json['last_seen_at'] === undefined ? undefined : json['last_seen_at'] === null ? null : json['last_seen_at'],
277
+ 'is_delisted': json['is_delisted'] === undefined ? undefined : json['is_delisted'] === null ? null : json['is_delisted'],
278
+ 'days_since_gone': json['days_since_gone'] === undefined ? undefined : json['days_since_gone'] === null ? null : json['days_since_gone'],
269
279
  'readme_text': json['readme_text'] === undefined ? undefined : json['readme_text'] === null ? null : json['readme_text'],
270
280
  'readme_status': json['readme_status'] === undefined ? undefined : json['readme_status'] === null ? null : json['readme_status'],
271
281
  'tags': json['tags'] === undefined ? undefined : json['tags'] === null ? null : json['tags'],
@@ -330,6 +340,8 @@ export function ModelDetailToJSONTyped(value?: ModelDetail | null, ignoreDiscrim
330
340
  'last_modified': value['last_modified'],
331
341
  'first_seen_at': value['first_seen_at'],
332
342
  'last_seen_at': value['last_seen_at'],
343
+ 'is_delisted': value['is_delisted'],
344
+ 'days_since_gone': value['days_since_gone'],
333
345
  'readme_text': value['readme_text'],
334
346
  'readme_status': value['readme_status'],
335
347
  'tags': value['tags'],
@@ -71,6 +71,14 @@ export interface ModelSummary {
71
71
  *
72
72
  */
73
73
  first_seen_at?: string | null;
74
+ /**
75
+ * 0/1 flag, present in every response row. `1` means the model is no longer on the Hub.
76
+ */
77
+ is_delisted?: number | null;
78
+ /**
79
+ * ISO-8601 timestamp of the last successful Hub observation. Non-null on delisted rows.
80
+ */
81
+ last_seen_at?: string | null;
74
82
  }
75
83
 
76
84
  /**
@@ -103,6 +111,8 @@ export function ModelSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolea
103
111
  'is_gguf': json['is_gguf'] === undefined ? undefined : json['is_gguf'] === null ? null : json['is_gguf'],
104
112
  'created_at': json['created_at'] === undefined ? undefined : json['created_at'] === null ? null : json['created_at'],
105
113
  'first_seen_at': json['first_seen_at'] === undefined ? undefined : json['first_seen_at'] === null ? null : json['first_seen_at'],
114
+ 'is_delisted': json['is_delisted'] === undefined ? undefined : json['is_delisted'] === null ? null : json['is_delisted'],
115
+ 'last_seen_at': json['last_seen_at'] === undefined ? undefined : json['last_seen_at'] === null ? null : json['last_seen_at'],
106
116
  };
107
117
  }
108
118
 
@@ -130,6 +140,8 @@ export function ModelSummaryToJSONTyped(value?: ModelSummary | null, ignoreDiscr
130
140
  'is_gguf': value['is_gguf'],
131
141
  'created_at': value['created_at'],
132
142
  'first_seen_at': value['first_seen_at'],
143
+ 'is_delisted': value['is_delisted'],
144
+ 'last_seen_at': value['last_seen_at'],
133
145
  };
134
146
  }
135
147
 
@@ -5,6 +5,7 @@ export * from './AuthorDetail';
5
5
  export * from './DaiPoint';
6
6
  export * from './Dataset';
7
7
  export * from './DatasetDetail';
8
+ export * from './DelistedModel';
8
9
  export * from './Envelope';
9
10
  export * from './Event';
10
11
  export * from './GetAuthor200Response';
@@ -15,6 +16,7 @@ export * from './GetModel200Response';
15
16
  export * from './IndexDetail';
16
17
  export * from './ListAuthors200Response';
17
18
  export * from './ListDatasets200Response';
19
+ export * from './ListDelistedModels200Response';
18
20
  export * from './ListIndices200Response';
19
21
  export * from './ListMethods200Response';
20
22
  export * from './ListModels200Response';