@dbx-tools/dbx-model-catalog 0.1.9 → 0.3.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.
Files changed (66) hide show
  1. package/README.md +296 -55
  2. package/dist/_generated/channels.d.ts +4 -3
  3. package/dist/_generated/json-schema.d.ts +6527 -175
  4. package/dist/_generated/schemas.d.ts +154 -0
  5. package/dist/_generated/workspace-rules.d.ts +133 -0
  6. package/dist/browser.d.ts +34 -15
  7. package/dist/browser.js +1152 -9042
  8. package/dist/catalog-index.d.ts +15 -2
  9. package/dist/chunk-engbh7tj.js +39 -0
  10. package/dist/chunk-gzjer0mc.js +1797 -0
  11. package/dist/chunk-pp7fw379.js +51 -0
  12. package/dist/chunk-pwssxaq0.js +39 -0
  13. package/dist/cli.js +41 -9619
  14. package/dist/effective.d.ts +31 -0
  15. package/dist/index.d.ts +33 -16
  16. package/dist/index.js +60 -9630
  17. package/dist/local-client.d.ts +16 -3
  18. package/dist/pynect.d.ts +6 -3
  19. package/dist/search.d.ts +7 -1
  20. package/dist/serving-endpoints.d.ts +15 -0
  21. package/dist/sources.d.ts +30 -0
  22. package/dist/types.d.ts +31 -3
  23. package/dist/validation.d.ts +15 -1
  24. package/dist/workspace-cache.d.ts +68 -0
  25. package/dist/workspace-client.d.ts +49 -0
  26. package/dist/workspace-connection.d.ts +67 -0
  27. package/dist/workspace-file-cache.d.ts +11 -0
  28. package/dist/workspace-identity.d.ts +27 -0
  29. package/dist/workspace-overlay.d.ts +71 -0
  30. package/package.json +8 -12
  31. package/src/_generated/channels.ts +41 -0
  32. package/src/_generated/index.ts +6 -0
  33. package/src/_generated/json-schema.ts +5 -0
  34. package/src/_generated/published.ts +7 -0
  35. package/src/_generated/schemas.ts +585 -0
  36. package/src/_generated/workspace-rules.ts +285 -0
  37. package/src/browser.ts +115 -0
  38. package/src/catalog-index.ts +121 -0
  39. package/src/cli.ts +99 -0
  40. package/src/effective.ts +200 -0
  41. package/src/filter.ts +47 -0
  42. package/src/identity.ts +56 -0
  43. package/src/index.ts +187 -0
  44. package/src/local-client.ts +127 -0
  45. package/src/pynect.ts +31 -0
  46. package/src/search.ts +582 -0
  47. package/src/serving-endpoints.ts +157 -0
  48. package/src/sources.ts +107 -0
  49. package/src/types.ts +49 -0
  50. package/src/validation.ts +127 -0
  51. package/src/workspace-cache.ts +234 -0
  52. package/src/workspace-client.ts +134 -0
  53. package/src/workspace-connection.ts +160 -0
  54. package/src/workspace-file-cache.ts +45 -0
  55. package/src/workspace-identity.ts +77 -0
  56. package/src/workspace-overlay.ts +200 -0
  57. package/dist/browser.js.map +0 -38
  58. package/dist/catalog.json +0 -1
  59. package/dist/cli.js.map +0 -40
  60. package/dist/index.js.map +0 -39
  61. package/dist/pynect.js +0 -553
  62. package/dist/pynect.js.map +0 -15
  63. package/dist/search-index.json +0 -1
  64. package/dist/snapshot.d.ts +0 -7
  65. package/dist/snapshot.js +0 -9515
  66. package/dist/snapshot.js.map +0 -36
@@ -0,0 +1,7 @@
1
+ export const PUBLISHED_CATALOG_SCHEMA_VERSION = 16 as const;
2
+ export const PUBLISHED_CATALOG_ROOT_URL = "https://raw.githubusercontent.com/reggie-db/dbx-model-catalog/main/packages/js/web";
3
+ export const PUBLISHED_CATALOG_INDEX_URL = `${PUBLISHED_CATALOG_ROOT_URL}/catalog/index.json`;
4
+ export const PUBLISHED_CATALOG_SCHEMA_URL = `${PUBLISHED_CATALOG_ROOT_URL}/catalog/v${PUBLISHED_CATALOG_SCHEMA_VERSION}`;
5
+ export const PUBLISHED_CATALOG_URL = `${PUBLISHED_CATALOG_SCHEMA_URL}/catalog.json`;
6
+ export const PUBLISHED_CATALOG_SEARCH_INDEX_URL = `${PUBLISHED_CATALOG_SCHEMA_URL}/search-index.json`;
7
+ export const PUBLISHED_CATALOG_DATABASE_URL = `${PUBLISHED_CATALOG_SCHEMA_URL}/catalog.sqlite`;
@@ -0,0 +1,585 @@
1
+ // Generated by @chanx-js/codegen. Do not edit.
2
+ // Regenerate with: npx @chanx-js/codegen
3
+
4
+ /** AI Gateway relative quality, speed, and cost profile. */
5
+ export interface AiGatewayModelProfile {
6
+ quality?: number | null;
7
+ speed?: number | null;
8
+ cost?: number | null;
9
+ }
10
+
11
+ /** Model availability on one Databricks cloud provider. */
12
+ export interface Availability {
13
+ status: Status1;
14
+ serving_modes: Array<ServingMode>;
15
+ details?: string | null;
16
+ }
17
+
18
+ /** Normalized Databricks price in one currency. */
19
+ export interface AveragePrice {
20
+ unit: Unit;
21
+ rates: Record<string, number>;
22
+ }
23
+
24
+ /** Task-suite benchmark result. */
25
+ export interface Benchmark {
26
+ name: string;
27
+ rank: number;
28
+ score: number;
29
+ task_count: number;
30
+ published_at?: string | null;
31
+ variant?: Variant2 | null;
32
+ sources: Array<SourceLink>;
33
+ }
34
+
35
+ /** Supported reasoning-token budget range. */
36
+ export interface Budget {
37
+ min?: number | null;
38
+ max?: number | null;
39
+ }
40
+
41
+ /** Capabilities used to select the model for a workload. */
42
+ export interface Capabilities {
43
+ attachments?: boolean | null;
44
+ tools?: boolean | null;
45
+ structured_output?: boolean | null;
46
+ temperature?: boolean | null;
47
+ interleaved_reasoning?: boolean | null;
48
+ responses: boolean;
49
+ apply_patch: boolean;
50
+ web_search: boolean;
51
+ reasoning?: Reasoning | Reasoning1 | null;
52
+ }
53
+
54
+ export interface CatalogFilters {
55
+ query?: string | null;
56
+ status?: Array<Status>;
57
+ type?: Array<Type>;
58
+ publisher?: Array<string>;
59
+ task?: Array<string>;
60
+ capability?: Array<"apply-patch" | "attachments" | "reasoning" | "responses" | "structured-output" | "tools" | "web-search">;
61
+ limit?: number | null;
62
+ }
63
+
64
+ /** Published statistics for one Databricks model. */
65
+ export interface CatalogModel {
66
+ name: string;
67
+ description: string;
68
+ aliases: Array<string>;
69
+ type: Type;
70
+ family?: string | null;
71
+ publisher?: string | null;
72
+ license?: string | null;
73
+ open_weights?: boolean | null;
74
+ status: Status;
75
+ release_date?: string | null;
76
+ last_updated?: string | null;
77
+ knowledge_cutoff?: string | null;
78
+ retirement?: Retirement | null;
79
+ modalities: Modalities;
80
+ capabilities: Capabilities;
81
+ limits?: Limits | null;
82
+ rate_limits?: RateLimits | null;
83
+ latency?: Latency | null;
84
+ tasks: Array<string>;
85
+ use_cases: Array<string>;
86
+ availability: Record<string, Availability>;
87
+ price: Record<string, Record<string, Price>>;
88
+ average_price: Record<string, AveragePrice>;
89
+ sources: Record<string, Array<SourceLink>>;
90
+ notices: Array<Notice>;
91
+ rankings: Array<Rankings | Rankings1>;
92
+ benchmarks: Array<Benchmark>;
93
+ }
94
+
95
+ export interface CatalogModelRecord {
96
+ name: string;
97
+ description: string;
98
+ aliases: Array<string>;
99
+ type: Type;
100
+ family?: string | null;
101
+ publisher?: string | null;
102
+ license?: string | null;
103
+ open_weights?: boolean | null;
104
+ status: Status;
105
+ release_date?: string | null;
106
+ last_updated?: string | null;
107
+ knowledge_cutoff?: string | null;
108
+ retirement?: Retirement | null;
109
+ modalities: Modalities;
110
+ capabilities: Capabilities;
111
+ limits?: Limits | null;
112
+ rate_limits?: RateLimits | null;
113
+ latency?: Latency | null;
114
+ tasks: Array<string>;
115
+ use_cases: Array<string>;
116
+ availability: Record<string, Availability>;
117
+ price: Record<string, Record<string, Price>>;
118
+ average_price: Record<string, AveragePrice>;
119
+ sources: Record<string, Array<SourceLink>>;
120
+ notices: Array<Notice>;
121
+ rankings: Array<Rankings | Rankings1>;
122
+ benchmarks: Array<Benchmark>;
123
+ id: string;
124
+ }
125
+
126
+ export interface CatalogSearchIndexDocument {
127
+ id: string;
128
+ exact_identities: Array<string>;
129
+ identities: Array<string>;
130
+ keywords: string;
131
+ description: string;
132
+ tokens: Array<string>;
133
+ family?: string | null;
134
+ version: Array<number>;
135
+ quality_score: number;
136
+ scores: CatalogSearchQualityScores;
137
+ }
138
+
139
+ export interface CatalogSearchIndexPayload {
140
+ schema_version: number;
141
+ catalog_schema_version: number;
142
+ updated_at: string;
143
+ weights: CatalogSearchWeights;
144
+ documents: Array<CatalogSearchIndexDocument>;
145
+ }
146
+
147
+ export interface CatalogSearchQualityScores {
148
+ leaderboard: number;
149
+ benchmark: number;
150
+ version: number;
151
+ freshness: number;
152
+ lifecycle: number;
153
+ }
154
+
155
+ export interface CatalogSearchWeights {
156
+ relevance: number;
157
+ leaderboard: number;
158
+ benchmark: number;
159
+ version: number;
160
+ freshness: number;
161
+ lifecycle: number;
162
+ }
163
+
164
+ /** Default reasoning effort when no level is specified. */
165
+ export type DefaultEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "default";
166
+
167
+ /** Accessible endpoint: normalized live metadata, public match, and field provenance. */
168
+ export interface EffectiveEndpoint {
169
+ /** Invocable serving endpoint name. */
170
+ name: string;
171
+ display_name?: string | null;
172
+ description?: string | null;
173
+ /** Databricks serving task, such as llm/v1/chat. */
174
+ task?: string | null;
175
+ /** Catalog type mapped from a known task. */
176
+ type?: Type | null;
177
+ /** Modalities mapped from a known task. */
178
+ modalities?: Modalities | null;
179
+ /** Endpoint readiness, such as READY. */
180
+ state?: string | null;
181
+ source: WorkspaceEndpointSource;
182
+ family?: string | null;
183
+ capabilities: WorkspaceEndpointCapabilities;
184
+ profile?: WorkspaceModelProfile | null;
185
+ identities: Array<IdentityCandidate>;
186
+ match?: MatchedPublicIdentity | null;
187
+ /** Origin of each overlay or placeholder field (dotted path). Matched records inherit every unlisted field from the public record, attributed by the record's sources; placeholder values are schema-required, not facts. */
188
+ fields: Record<string, FieldOrigin>;
189
+ }
190
+
191
+ /** Public catalog merged with one workspace's accessible endpoints. */
192
+ export interface EffectiveModelCatalog {
193
+ contract_version: number;
194
+ catalog: ModelCatalog;
195
+ workspace: WorkspaceRefresh;
196
+ /** Accessible endpoints keyed by invocable endpoint name, which is also the record id in catalog.models when the endpoint has a record. An unmatched endpoint whose task maps to no catalog type is listed here only. Records without an entry are public references not confirmed accessible in the workspace. */
197
+ endpoints: Record<string, EffectiveEndpoint>;
198
+ }
199
+
200
+ /** Normalized reasoning effort level. */
201
+ export type EffortEnum = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "default";
202
+
203
+ /** External model provider and name reported for a served entity. */
204
+ export interface ExternalModel {
205
+ name?: string | null;
206
+ provider?: string | null;
207
+ task?: string | null;
208
+ }
209
+
210
+ /** Where an effective record field value came from. */
211
+ export type FieldOrigin = "workspace" | "public" | "placeholder";
212
+
213
+ /** Foundation model metadata reported for a served entity. */
214
+ export interface FoundationModel {
215
+ name?: string | null;
216
+ display_name?: string | null;
217
+ description?: string | null;
218
+ docs?: string | null;
219
+ model_class?: string | null;
220
+ ai_gateway_model_profile?: AiGatewayModelProfile | null;
221
+ }
222
+
223
+ export interface GetCatalogRequest {
224
+ action: "get_catalog";
225
+ payload: CatalogFilters;
226
+ }
227
+
228
+ export interface GetCatalogResponse {
229
+ action: "catalog";
230
+ payload: ModelCatalog;
231
+ }
232
+
233
+ export interface GetSearchIndexRequest {
234
+ action: "get_search_index";
235
+ payload: CatalogFilters;
236
+ }
237
+
238
+ export interface GetSearchIndexResponse {
239
+ action: "search_index";
240
+ payload: CatalogSearchIndexPayload;
241
+ }
242
+
243
+ /** One exact identity reported for an endpoint. */
244
+ export interface IdentityCandidate {
245
+ kind: "endpoint_name" | "served_entity" | "foundation_model" | "external_model" | "model_service";
246
+ value: string;
247
+ }
248
+
249
+ /** Known model input and output modalities. */
250
+ export type Input = "text" | "image" | "audio" | "video" | "application/pdf" | "embedding" | "reranking" | "decision";
251
+
252
+ /** Known Databricks documentation notice kinds. */
253
+ export type Kind = "note" | "important" | "warning" | "tip" | "caution" | "info";
254
+
255
+ /** Normalized response-time score and public benchmark measurements. */
256
+ export interface Latency {
257
+ score: number;
258
+ measurements: LatencyMeasurements;
259
+ }
260
+
261
+ /** Public benchmark measurements underlying one latency score. */
262
+ export interface LatencyMeasurements {
263
+ time_to_first_token_ms: number;
264
+ output_tokens_per_second: number;
265
+ successful_run_count: number;
266
+ completion_token_count: number;
267
+ measured_at: string;
268
+ }
269
+
270
+ /** Documented token limits. */
271
+ export interface Limits {
272
+ context?: number | null;
273
+ input?: number | null;
274
+ output?: number | null;
275
+ }
276
+
277
+ export interface ListModelsRequest {
278
+ action: "list_models";
279
+ payload: CatalogFilters;
280
+ }
281
+
282
+ export interface ListModelsResponse {
283
+ action: "models";
284
+ payload: Array<CatalogModelRecord>;
285
+ }
286
+
287
+ /** Public catalog record an endpoint matched, and the endpoint identity that matched it. */
288
+ export interface MatchedPublicIdentity {
289
+ /** Public catalog record id. */
290
+ id: string;
291
+ kind: "endpoint_name" | "served_entity" | "foundation_model" | "external_model" | "model_service";
292
+ /** Endpoint identity that matched exactly. */
293
+ value: string;
294
+ }
295
+
296
+ /** Model input and output modalities. */
297
+ export interface Modalities {
298
+ input: Array<Input | string>;
299
+ output: Array<Output | string>;
300
+ }
301
+
302
+ /** Published Databricks model catalog with identity, capabilities, availability, pricing, lifecycle, rankings, and benchmarks. */
303
+ export interface ModelCatalog {
304
+ schema_version: 16;
305
+ updated_at: string;
306
+ models: Record<string, CatalogModel>;
307
+ }
308
+
309
+ /** Important Databricks documentation notice. */
310
+ export interface Notice {
311
+ kind: Kind | string;
312
+ title?: string | null;
313
+ text: string;
314
+ sources: Array<SourceLink>;
315
+ }
316
+
317
+ /** Known model input and output modalities. */
318
+ export type Output = "text" | "image" | "audio" | "video" | "application/pdf" | "embedding" | "reranking" | "decision";
319
+
320
+ export interface OverlayServingEndpointsRequest {
321
+ action: "overlay_serving_endpoints";
322
+ payload: ServingEndpointsResponse;
323
+ }
324
+
325
+ export interface OverlayServingEndpointsResponse {
326
+ action: "effective_catalog";
327
+ payload: EffectiveModelCatalog;
328
+ }
329
+
330
+ /** Normalized Databricks price in one currency. */
331
+ export interface Price {
332
+ unit: Unit;
333
+ rates: Record<string, number>;
334
+ }
335
+
336
+ /** An RFC 9457 problem details object, the payload of an error frame. See https://python.chanx.dev/en/latest/protocol.html#protocol-errors */
337
+ export interface ProblemDetails {
338
+ /** A URI reference that identifies the problem type. */
339
+ type: string;
340
+ /** A short, human-readable summary of the problem type. */
341
+ title: string;
342
+ /** The HTTP status code generated by the origin server for this occurrence of the problem. */
343
+ status?: number;
344
+ /** A human-readable explanation specific to this occurrence of the problem. */
345
+ detail: string;
346
+ /** A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. */
347
+ instance?: string;
348
+ /** The validation failures, when type is validation-failed. */
349
+ errors?: Array<ValidationFailure>;
350
+ }
351
+
352
+ /** Competitive ranking based on human preference ratings. */
353
+ export interface Rankings {
354
+ domain: string;
355
+ category: string;
356
+ rank: number;
357
+ published_at?: string | null;
358
+ variant?: Variant | null;
359
+ sources: Array<SourceLink>;
360
+ metric: "rating";
361
+ rating: number;
362
+ lower: number;
363
+ upper: number;
364
+ variance: number;
365
+ votes: number;
366
+ }
367
+
368
+ /** Competitive ranking based on a scored evaluation. */
369
+ export interface Rankings1 {
370
+ domain: string;
371
+ category: string;
372
+ rank: number;
373
+ published_at?: string | null;
374
+ variant?: Variant1 | null;
375
+ sources: Array<SourceLink>;
376
+ metric: "score";
377
+ score: number;
378
+ lower: number;
379
+ upper: number;
380
+ observations: number;
381
+ sessions: number | null;
382
+ }
383
+
384
+ /** Published pay-per-token limits for one model. */
385
+ export interface RateLimits {
386
+ input_tokens_per_minute: number | null;
387
+ output_tokens_per_minute: number | null;
388
+ queries_per_hour: number | null;
389
+ }
390
+
391
+ /** Reasoning support and controls when known. */
392
+ export interface Reasoning {
393
+ supported: false;
394
+ }
395
+
396
+ /** Reasoning support and controls when known. */
397
+ export interface Reasoning1 {
398
+ supported: true;
399
+ effort?: Array<EffortEnum> | null;
400
+ default_effort?: DefaultEffort | null;
401
+ toggle?: boolean | null;
402
+ budget?: Budget | null;
403
+ description?: string | null;
404
+ }
405
+
406
+ /** Reasoning effort used by the evaluated variant. */
407
+ export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "default";
408
+
409
+ /** Reasoning execution mode used by the evaluated variant. */
410
+ export type ReasoningMode = "auto" | "thinking";
411
+
412
+ /** Databricks retirement and replacement information. */
413
+ export interface Retirement {
414
+ schedules: Array<Schedule>;
415
+ replacement?: string | null;
416
+ replacement_name?: string | null;
417
+ }
418
+
419
+ /** Retirement dates for one serving offering. */
420
+ export interface Schedule {
421
+ offering: string;
422
+ dates: Array<string>;
423
+ }
424
+
425
+ /** One served entity in a Serving Endpoints configuration. */
426
+ export interface ServedEntity {
427
+ name?: string | null;
428
+ entity_name?: string | null;
429
+ entity_version?: string | null;
430
+ foundation_model?: FoundationModel | null;
431
+ external_model?: ExternalModel | null;
432
+ }
433
+
434
+ /** Legacy served model in a Serving Endpoints configuration. */
435
+ export interface ServedModel {
436
+ name?: string | null;
437
+ model_name?: string | null;
438
+ model_version?: string | null;
439
+ }
440
+
441
+ /** One serving endpoint from ``GET /api/2.0/serving-endpoints``. */
442
+ export interface ServingEndpoint {
443
+ name?: string | null;
444
+ id?: string | null;
445
+ description?: string | null;
446
+ task?: string | null;
447
+ state?: ServingEndpointState | null;
448
+ config?: ServingEndpointConfig | null;
449
+ tags?: Array<ServingEndpointTag>;
450
+ capabilities?: ServingEndpointCapabilities | null;
451
+ }
452
+
453
+ /** Explicit endpoint capabilities reported by the workspace. */
454
+ export interface ServingEndpointCapabilities {
455
+ function_calling?: boolean | null;
456
+ }
457
+
458
+ /** Served entities and legacy served models for one endpoint. */
459
+ export interface ServingEndpointConfig {
460
+ served_entities?: Array<ServedEntity>;
461
+ served_models?: Array<ServedModel>;
462
+ }
463
+
464
+ /** Serving endpoint readiness and configuration update state. */
465
+ export interface ServingEndpointState {
466
+ ready?: string | null;
467
+ config_update?: string | null;
468
+ }
469
+
470
+ /** User-defined serving endpoint tag. */
471
+ export interface ServingEndpointTag {
472
+ key: string;
473
+ value?: string | null;
474
+ }
475
+
476
+ /** Raw ``GET /api/2.0/serving-endpoints`` response body. */
477
+ export interface ServingEndpointsResponse {
478
+ endpoints?: Array<ServingEndpoint>;
479
+ }
480
+
481
+ /** Databricks serving mode available for the model. */
482
+ export type ServingMode = "pay_per_token" | "priority_pay_per_token" | "provisioned_throughput" | "batch";
483
+
484
+ /** Openable attribution for published catalog data. */
485
+ export interface SourceLink {
486
+ label: string;
487
+ url: string;
488
+ }
489
+
490
+ /** Current normalized lifecycle state. */
491
+ export type Status = "active" | "preview" | "alpha" | "beta" | "legacy" | "deprecated" | "retired";
492
+
493
+ /** Lifecycle state for this cloud-provider deployment. */
494
+ export type Status1 = "active" | "preview" | "alpha" | "beta" | "legacy" | "deprecated" | "retired";
495
+
496
+ export interface StreamModelsRequest {
497
+ action: "stream_models";
498
+ payload: CatalogFilters;
499
+ }
500
+
501
+ export interface StreamModelsResponse {
502
+ action: "model";
503
+ payload: CatalogModelRecord;
504
+ }
505
+
506
+ /** Normalized model type. */
507
+ export type Type = "chat" | "image" | "video" | "embedding" | "reranking" | "decision" | "transcription" | "speech" | "realtime" | "extraction" | "audio";
508
+
509
+ /** Quantity to which the rates apply. */
510
+ export type Unit = "per_million_tokens" | "per_hour" | "per_hour_per_50_model_units";
511
+
512
+ /** One validation failure, shaped like RFC 9457's validation example. */
513
+ export interface ValidationFailure {
514
+ /** The JSON Schema keyword that failed, or custom. */
515
+ keyword: string;
516
+ /** A JSON Pointer to the failing value in the frame; for required, the object lacking the member. */
517
+ pointer: string;
518
+ /** A human-readable message. */
519
+ detail: string;
520
+ /** For required only: the missing member. */
521
+ property?: string | number;
522
+ }
523
+
524
+ /** Evaluated model variant when it differs from the base model. */
525
+ export interface Variant {
526
+ reasoning?: boolean | null;
527
+ reasoning_effort?: ReasoningEffort | null;
528
+ reasoning_mode?: ReasoningMode | null;
529
+ harness?: string | null;
530
+ context?: number | null;
531
+ }
532
+
533
+ /** Evaluated model variant when it differs from the base model. */
534
+ export interface Variant1 {
535
+ reasoning?: boolean | null;
536
+ reasoning_effort?: ReasoningEffort | null;
537
+ reasoning_mode?: ReasoningMode | null;
538
+ harness?: string | null;
539
+ context?: number | null;
540
+ }
541
+
542
+ /** Evaluated model variant when it differs from the base model. */
543
+ export interface Variant2 {
544
+ reasoning?: boolean | null;
545
+ reasoning_effort?: ReasoningEffort | null;
546
+ reasoning_mode?: ReasoningMode | null;
547
+ harness?: string | null;
548
+ context?: number | null;
549
+ }
550
+
551
+ /** Capabilities the workspace states explicitly; ``None`` means unknown. */
552
+ export interface WorkspaceEndpointCapabilities {
553
+ function_calling?: boolean | null;
554
+ }
555
+
556
+ /** How the workspace serves the endpoint's model. */
557
+ export type WorkspaceEndpointSource = "foundation" | "external" | "custom";
558
+
559
+ /** AI Gateway relative quality, speed, and cost scores. */
560
+ export interface WorkspaceModelProfile {
561
+ quality?: number | null;
562
+ speed?: number | null;
563
+ cost?: number | null;
564
+ }
565
+
566
+ /** Workspace overlay refresh state for one effective catalog. */
567
+ export interface WorkspaceRefresh {
568
+ /** disabled: no workspace connection. current: overlay refreshed within the refresh interval. stale: a cached overlay served after a failed refresh. unavailable: discovery failed with no eligible cached overlay, so no workspace access is claimed. */
569
+ status: WorkspaceRefreshStatus;
570
+ /** Normalized workspace identity: id:<workspace id> or host:<host[/path]>. */
571
+ workspace?: string | null;
572
+ /** True when the overlay is stored in the shared persistent cache. */
573
+ persistent?: boolean;
574
+ /** When the served endpoint inventory was fetched. */
575
+ refreshed_at?: string | null;
576
+ /** When the most recent refresh was attempted. */
577
+ attempted_at?: string | null;
578
+ /** Age of the served inventory when this catalog was built. */
579
+ age_seconds?: number | null;
580
+ /** Most recent refresh error. */
581
+ error?: string | null;
582
+ }
583
+
584
+ /** Whether, and how currently, workspace enrichment applies. */
585
+ export type WorkspaceRefreshStatus = "disabled" | "current" | "stale" | "unavailable";