@hasna/switcher 0.1.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.
package/openapi.json ADDED
@@ -0,0 +1,2202 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Switcher API",
5
+ "version": "0.1.0",
6
+ "description": "Authenticated provider/profile/catalog control plane. Launches run locally; the API never returns provider credentials."
7
+ },
8
+ "security": [
9
+ {
10
+ "bearerAuth": []
11
+ }
12
+ ],
13
+ "paths": {
14
+ "/v1/providers": {
15
+ "get": {
16
+ "operationId": "listProviders",
17
+ "parameters": [
18
+ {
19
+ "name": "limit",
20
+ "in": "query",
21
+ "schema": {
22
+ "type": "integer",
23
+ "minimum": 1,
24
+ "maximum": 1000,
25
+ "default": 100
26
+ }
27
+ },
28
+ {
29
+ "name": "offset",
30
+ "in": "query",
31
+ "schema": {
32
+ "type": "integer",
33
+ "minimum": 0,
34
+ "default": 0
35
+ }
36
+ },
37
+ {
38
+ "name": "search",
39
+ "in": "query",
40
+ "schema": {
41
+ "type": "string"
42
+ }
43
+ }
44
+ ],
45
+ "responses": {
46
+ "200": {
47
+ "description": "Success",
48
+ "content": {
49
+ "application/json": {
50
+ "schema": {
51
+ "type": "object",
52
+ "required": [
53
+ "data",
54
+ "total",
55
+ "limit",
56
+ "offset"
57
+ ],
58
+ "properties": {
59
+ "data": {
60
+ "type": "array",
61
+ "items": {
62
+ "$ref": "#/components/schemas/Provider"
63
+ }
64
+ },
65
+ "total": {
66
+ "type": "integer"
67
+ },
68
+ "limit": {
69
+ "type": "integer"
70
+ },
71
+ "offset": {
72
+ "type": "integer"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "default": {
80
+ "description": "Structured error",
81
+ "content": {
82
+ "application/json": {
83
+ "schema": {
84
+ "$ref": "#/components/schemas/Error"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "post": {
92
+ "operationId": "createProvider",
93
+ "parameters": [
94
+ {
95
+ "name": "Idempotency-Key",
96
+ "in": "header",
97
+ "required": true,
98
+ "schema": {
99
+ "type": "string",
100
+ "minLength": 8,
101
+ "maxLength": 128
102
+ }
103
+ }
104
+ ],
105
+ "requestBody": {
106
+ "required": true,
107
+ "content": {
108
+ "application/json": {
109
+ "schema": {
110
+ "$ref": "#/components/schemas/ProviderInput"
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "responses": {
116
+ "201": {
117
+ "description": "Success",
118
+ "content": {
119
+ "application/json": {
120
+ "schema": {
121
+ "$ref": "#/components/schemas/Provider"
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "default": {
127
+ "description": "Structured error",
128
+ "content": {
129
+ "application/json": {
130
+ "schema": {
131
+ "$ref": "#/components/schemas/Error"
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ },
139
+ "/v1/providers/{id}": {
140
+ "get": {
141
+ "operationId": "getProvider",
142
+ "parameters": [
143
+ {
144
+ "name": "id",
145
+ "in": "path",
146
+ "required": true,
147
+ "schema": {
148
+ "type": "string"
149
+ }
150
+ }
151
+ ],
152
+ "responses": {
153
+ "200": {
154
+ "description": "Success",
155
+ "content": {
156
+ "application/json": {
157
+ "schema": {
158
+ "$ref": "#/components/schemas/Provider"
159
+ }
160
+ }
161
+ }
162
+ },
163
+ "default": {
164
+ "description": "Structured error",
165
+ "content": {
166
+ "application/json": {
167
+ "schema": {
168
+ "$ref": "#/components/schemas/Error"
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+ },
175
+ "put": {
176
+ "operationId": "updateProvider",
177
+ "parameters": [
178
+ {
179
+ "name": "id",
180
+ "in": "path",
181
+ "required": true,
182
+ "schema": {
183
+ "type": "string"
184
+ }
185
+ },
186
+ {
187
+ "name": "Idempotency-Key",
188
+ "in": "header",
189
+ "required": true,
190
+ "schema": {
191
+ "type": "string",
192
+ "minLength": 8,
193
+ "maxLength": 128
194
+ }
195
+ },
196
+ {
197
+ "name": "If-Match",
198
+ "in": "header",
199
+ "required": true,
200
+ "schema": {
201
+ "type": "integer",
202
+ "minimum": 1
203
+ }
204
+ }
205
+ ],
206
+ "requestBody": {
207
+ "required": true,
208
+ "content": {
209
+ "application/json": {
210
+ "schema": {
211
+ "$ref": "#/components/schemas/ProviderInput"
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "responses": {
217
+ "200": {
218
+ "description": "Success",
219
+ "content": {
220
+ "application/json": {
221
+ "schema": {
222
+ "$ref": "#/components/schemas/Provider"
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "default": {
228
+ "description": "Structured error",
229
+ "content": {
230
+ "application/json": {
231
+ "schema": {
232
+ "$ref": "#/components/schemas/Error"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
238
+ },
239
+ "delete": {
240
+ "operationId": "deleteProvider",
241
+ "parameters": [
242
+ {
243
+ "name": "id",
244
+ "in": "path",
245
+ "required": true,
246
+ "schema": {
247
+ "type": "string"
248
+ }
249
+ },
250
+ {
251
+ "name": "Idempotency-Key",
252
+ "in": "header",
253
+ "required": true,
254
+ "schema": {
255
+ "type": "string",
256
+ "minLength": 8,
257
+ "maxLength": 128
258
+ }
259
+ },
260
+ {
261
+ "name": "If-Match",
262
+ "in": "header",
263
+ "required": true,
264
+ "schema": {
265
+ "type": "integer",
266
+ "minimum": 1
267
+ }
268
+ }
269
+ ],
270
+ "responses": {
271
+ "200": {
272
+ "description": "Success",
273
+ "content": {
274
+ "application/json": {
275
+ "schema": {
276
+ "type": "object",
277
+ "properties": {
278
+ "deleted": {
279
+ "type": "string"
280
+ }
281
+ },
282
+ "required": [
283
+ "deleted"
284
+ ]
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "default": {
290
+ "description": "Structured error",
291
+ "content": {
292
+ "application/json": {
293
+ "schema": {
294
+ "$ref": "#/components/schemas/Error"
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+ }
301
+ },
302
+ "/v1/profiles": {
303
+ "get": {
304
+ "operationId": "listProfiles",
305
+ "parameters": [
306
+ {
307
+ "name": "limit",
308
+ "in": "query",
309
+ "schema": {
310
+ "type": "integer",
311
+ "minimum": 1,
312
+ "maximum": 1000,
313
+ "default": 100
314
+ }
315
+ },
316
+ {
317
+ "name": "offset",
318
+ "in": "query",
319
+ "schema": {
320
+ "type": "integer",
321
+ "minimum": 0,
322
+ "default": 0
323
+ }
324
+ },
325
+ {
326
+ "name": "search",
327
+ "in": "query",
328
+ "schema": {
329
+ "type": "string"
330
+ }
331
+ }
332
+ ],
333
+ "responses": {
334
+ "200": {
335
+ "description": "Success",
336
+ "content": {
337
+ "application/json": {
338
+ "schema": {
339
+ "type": "object",
340
+ "required": [
341
+ "data",
342
+ "total",
343
+ "limit",
344
+ "offset"
345
+ ],
346
+ "properties": {
347
+ "data": {
348
+ "type": "array",
349
+ "items": {
350
+ "$ref": "#/components/schemas/Profile"
351
+ }
352
+ },
353
+ "total": {
354
+ "type": "integer"
355
+ },
356
+ "limit": {
357
+ "type": "integer"
358
+ },
359
+ "offset": {
360
+ "type": "integer"
361
+ }
362
+ }
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "default": {
368
+ "description": "Structured error",
369
+ "content": {
370
+ "application/json": {
371
+ "schema": {
372
+ "$ref": "#/components/schemas/Error"
373
+ }
374
+ }
375
+ }
376
+ }
377
+ }
378
+ },
379
+ "post": {
380
+ "operationId": "createProfile",
381
+ "parameters": [
382
+ {
383
+ "name": "Idempotency-Key",
384
+ "in": "header",
385
+ "required": true,
386
+ "schema": {
387
+ "type": "string",
388
+ "minLength": 8,
389
+ "maxLength": 128
390
+ }
391
+ }
392
+ ],
393
+ "requestBody": {
394
+ "required": true,
395
+ "content": {
396
+ "application/json": {
397
+ "schema": {
398
+ "$ref": "#/components/schemas/ProfileInput"
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "responses": {
404
+ "201": {
405
+ "description": "Success",
406
+ "content": {
407
+ "application/json": {
408
+ "schema": {
409
+ "$ref": "#/components/schemas/Profile"
410
+ }
411
+ }
412
+ }
413
+ },
414
+ "default": {
415
+ "description": "Structured error",
416
+ "content": {
417
+ "application/json": {
418
+ "schema": {
419
+ "$ref": "#/components/schemas/Error"
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ }
426
+ },
427
+ "/v1/profiles/{id}": {
428
+ "get": {
429
+ "operationId": "getProfile",
430
+ "parameters": [
431
+ {
432
+ "name": "id",
433
+ "in": "path",
434
+ "required": true,
435
+ "schema": {
436
+ "type": "string"
437
+ }
438
+ }
439
+ ],
440
+ "responses": {
441
+ "200": {
442
+ "description": "Success",
443
+ "content": {
444
+ "application/json": {
445
+ "schema": {
446
+ "$ref": "#/components/schemas/Profile"
447
+ }
448
+ }
449
+ }
450
+ },
451
+ "default": {
452
+ "description": "Structured error",
453
+ "content": {
454
+ "application/json": {
455
+ "schema": {
456
+ "$ref": "#/components/schemas/Error"
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
462
+ },
463
+ "put": {
464
+ "operationId": "updateProfile",
465
+ "parameters": [
466
+ {
467
+ "name": "id",
468
+ "in": "path",
469
+ "required": true,
470
+ "schema": {
471
+ "type": "string"
472
+ }
473
+ },
474
+ {
475
+ "name": "Idempotency-Key",
476
+ "in": "header",
477
+ "required": true,
478
+ "schema": {
479
+ "type": "string",
480
+ "minLength": 8,
481
+ "maxLength": 128
482
+ }
483
+ },
484
+ {
485
+ "name": "If-Match",
486
+ "in": "header",
487
+ "required": true,
488
+ "schema": {
489
+ "type": "integer",
490
+ "minimum": 1
491
+ }
492
+ }
493
+ ],
494
+ "requestBody": {
495
+ "required": true,
496
+ "content": {
497
+ "application/json": {
498
+ "schema": {
499
+ "$ref": "#/components/schemas/ProfileInput"
500
+ }
501
+ }
502
+ }
503
+ },
504
+ "responses": {
505
+ "200": {
506
+ "description": "Success",
507
+ "content": {
508
+ "application/json": {
509
+ "schema": {
510
+ "$ref": "#/components/schemas/Profile"
511
+ }
512
+ }
513
+ }
514
+ },
515
+ "default": {
516
+ "description": "Structured error",
517
+ "content": {
518
+ "application/json": {
519
+ "schema": {
520
+ "$ref": "#/components/schemas/Error"
521
+ }
522
+ }
523
+ }
524
+ }
525
+ }
526
+ },
527
+ "delete": {
528
+ "operationId": "deleteProfile",
529
+ "parameters": [
530
+ {
531
+ "name": "id",
532
+ "in": "path",
533
+ "required": true,
534
+ "schema": {
535
+ "type": "string"
536
+ }
537
+ },
538
+ {
539
+ "name": "Idempotency-Key",
540
+ "in": "header",
541
+ "required": true,
542
+ "schema": {
543
+ "type": "string",
544
+ "minLength": 8,
545
+ "maxLength": 128
546
+ }
547
+ },
548
+ {
549
+ "name": "If-Match",
550
+ "in": "header",
551
+ "required": true,
552
+ "schema": {
553
+ "type": "integer",
554
+ "minimum": 1
555
+ }
556
+ }
557
+ ],
558
+ "responses": {
559
+ "200": {
560
+ "description": "Success",
561
+ "content": {
562
+ "application/json": {
563
+ "schema": {
564
+ "type": "object",
565
+ "properties": {
566
+ "deleted": {
567
+ "type": "string"
568
+ }
569
+ },
570
+ "required": [
571
+ "deleted"
572
+ ]
573
+ }
574
+ }
575
+ }
576
+ },
577
+ "default": {
578
+ "description": "Structured error",
579
+ "content": {
580
+ "application/json": {
581
+ "schema": {
582
+ "$ref": "#/components/schemas/Error"
583
+ }
584
+ }
585
+ }
586
+ }
587
+ }
588
+ }
589
+ },
590
+ "/v1/providers/{id}/models": {
591
+ "get": {
592
+ "operationId": "listModels",
593
+ "parameters": [
594
+ {
595
+ "name": "id",
596
+ "in": "path",
597
+ "required": true,
598
+ "schema": {
599
+ "type": "string"
600
+ }
601
+ },
602
+ {
603
+ "name": "limit",
604
+ "in": "query",
605
+ "schema": {
606
+ "type": "integer",
607
+ "minimum": 1,
608
+ "maximum": 1000,
609
+ "default": 100
610
+ }
611
+ },
612
+ {
613
+ "name": "offset",
614
+ "in": "query",
615
+ "schema": {
616
+ "type": "integer",
617
+ "minimum": 0,
618
+ "default": 0
619
+ }
620
+ },
621
+ {
622
+ "name": "search",
623
+ "in": "query",
624
+ "schema": {
625
+ "type": "string"
626
+ }
627
+ }
628
+ ],
629
+ "responses": {
630
+ "200": {
631
+ "description": "Success",
632
+ "content": {
633
+ "application/json": {
634
+ "schema": {
635
+ "$ref": "#/components/schemas/ModelPage"
636
+ }
637
+ }
638
+ }
639
+ },
640
+ "default": {
641
+ "description": "Structured error",
642
+ "content": {
643
+ "application/json": {
644
+ "schema": {
645
+ "$ref": "#/components/schemas/Error"
646
+ }
647
+ }
648
+ }
649
+ }
650
+ }
651
+ }
652
+ },
653
+ "/v1/providers/{id}/refresh": {
654
+ "post": {
655
+ "operationId": "refreshModels",
656
+ "parameters": [
657
+ {
658
+ "name": "id",
659
+ "in": "path",
660
+ "required": true,
661
+ "schema": {
662
+ "type": "string"
663
+ }
664
+ },
665
+ {
666
+ "name": "Idempotency-Key",
667
+ "in": "header",
668
+ "required": true,
669
+ "schema": {
670
+ "type": "string",
671
+ "minLength": 8,
672
+ "maxLength": 128
673
+ }
674
+ }
675
+ ],
676
+ "requestBody": {
677
+ "required": true,
678
+ "content": {
679
+ "application/json": {
680
+ "schema": {
681
+ "$ref": "#/components/schemas/Empty"
682
+ }
683
+ }
684
+ }
685
+ },
686
+ "responses": {
687
+ "200": {
688
+ "description": "Success",
689
+ "content": {
690
+ "application/json": {
691
+ "schema": {
692
+ "$ref": "#/components/schemas/Catalog"
693
+ }
694
+ }
695
+ }
696
+ },
697
+ "default": {
698
+ "description": "Structured error",
699
+ "content": {
700
+ "application/json": {
701
+ "schema": {
702
+ "$ref": "#/components/schemas/Error"
703
+ }
704
+ }
705
+ }
706
+ }
707
+ }
708
+ }
709
+ },
710
+ "/v1/launch-plans": {
711
+ "post": {
712
+ "operationId": "launchPlan",
713
+ "parameters": [
714
+ {
715
+ "name": "Idempotency-Key",
716
+ "in": "header",
717
+ "required": true,
718
+ "schema": {
719
+ "type": "string",
720
+ "minLength": 8,
721
+ "maxLength": 128
722
+ }
723
+ }
724
+ ],
725
+ "requestBody": {
726
+ "required": true,
727
+ "content": {
728
+ "application/json": {
729
+ "schema": {
730
+ "$ref": "#/components/schemas/LaunchInput"
731
+ }
732
+ }
733
+ }
734
+ },
735
+ "responses": {
736
+ "200": {
737
+ "description": "Success",
738
+ "content": {
739
+ "application/json": {
740
+ "schema": {
741
+ "$ref": "#/components/schemas/LaunchPlan"
742
+ }
743
+ }
744
+ }
745
+ },
746
+ "default": {
747
+ "description": "Structured error",
748
+ "content": {
749
+ "application/json": {
750
+ "schema": {
751
+ "$ref": "#/components/schemas/Error"
752
+ }
753
+ }
754
+ }
755
+ }
756
+ }
757
+ }
758
+ },
759
+ "/v1/runs": {
760
+ "get": {
761
+ "operationId": "listRuns",
762
+ "parameters": [
763
+ {
764
+ "name": "limit",
765
+ "in": "query",
766
+ "schema": {
767
+ "type": "integer",
768
+ "minimum": 1,
769
+ "maximum": 1000,
770
+ "default": 100
771
+ }
772
+ },
773
+ {
774
+ "name": "offset",
775
+ "in": "query",
776
+ "schema": {
777
+ "type": "integer",
778
+ "minimum": 0,
779
+ "default": 0
780
+ }
781
+ },
782
+ {
783
+ "name": "search",
784
+ "in": "query",
785
+ "schema": {
786
+ "type": "string"
787
+ }
788
+ }
789
+ ],
790
+ "responses": {
791
+ "200": {
792
+ "description": "Success",
793
+ "content": {
794
+ "application/json": {
795
+ "schema": {
796
+ "type": "object",
797
+ "required": [
798
+ "data",
799
+ "total",
800
+ "limit",
801
+ "offset"
802
+ ],
803
+ "properties": {
804
+ "data": {
805
+ "type": "array",
806
+ "items": {
807
+ "$ref": "#/components/schemas/Run"
808
+ }
809
+ },
810
+ "total": {
811
+ "type": "integer"
812
+ },
813
+ "limit": {
814
+ "type": "integer"
815
+ },
816
+ "offset": {
817
+ "type": "integer"
818
+ }
819
+ }
820
+ }
821
+ }
822
+ }
823
+ },
824
+ "default": {
825
+ "description": "Structured error",
826
+ "content": {
827
+ "application/json": {
828
+ "schema": {
829
+ "$ref": "#/components/schemas/Error"
830
+ }
831
+ }
832
+ }
833
+ }
834
+ }
835
+ },
836
+ "post": {
837
+ "operationId": "createRun",
838
+ "parameters": [
839
+ {
840
+ "name": "Idempotency-Key",
841
+ "in": "header",
842
+ "required": true,
843
+ "schema": {
844
+ "type": "string",
845
+ "minLength": 8,
846
+ "maxLength": 128
847
+ }
848
+ }
849
+ ],
850
+ "requestBody": {
851
+ "required": true,
852
+ "content": {
853
+ "application/json": {
854
+ "schema": {
855
+ "$ref": "#/components/schemas/RunInput"
856
+ }
857
+ }
858
+ }
859
+ },
860
+ "responses": {
861
+ "201": {
862
+ "description": "Success",
863
+ "content": {
864
+ "application/json": {
865
+ "schema": {
866
+ "$ref": "#/components/schemas/Run"
867
+ }
868
+ }
869
+ }
870
+ },
871
+ "default": {
872
+ "description": "Structured error",
873
+ "content": {
874
+ "application/json": {
875
+ "schema": {
876
+ "$ref": "#/components/schemas/Error"
877
+ }
878
+ }
879
+ }
880
+ }
881
+ }
882
+ }
883
+ },
884
+ "/v1/runs/{id}": {
885
+ "get": {
886
+ "operationId": "getRun",
887
+ "parameters": [
888
+ {
889
+ "name": "id",
890
+ "in": "path",
891
+ "required": true,
892
+ "schema": {
893
+ "type": "string"
894
+ }
895
+ }
896
+ ],
897
+ "responses": {
898
+ "200": {
899
+ "description": "Success",
900
+ "content": {
901
+ "application/json": {
902
+ "schema": {
903
+ "$ref": "#/components/schemas/Run"
904
+ }
905
+ }
906
+ }
907
+ },
908
+ "default": {
909
+ "description": "Structured error",
910
+ "content": {
911
+ "application/json": {
912
+ "schema": {
913
+ "$ref": "#/components/schemas/Error"
914
+ }
915
+ }
916
+ }
917
+ }
918
+ }
919
+ },
920
+ "patch": {
921
+ "operationId": "finishRun",
922
+ "parameters": [
923
+ {
924
+ "name": "id",
925
+ "in": "path",
926
+ "required": true,
927
+ "schema": {
928
+ "type": "string"
929
+ }
930
+ },
931
+ {
932
+ "name": "Idempotency-Key",
933
+ "in": "header",
934
+ "required": true,
935
+ "schema": {
936
+ "type": "string",
937
+ "minLength": 8,
938
+ "maxLength": 128
939
+ }
940
+ },
941
+ {
942
+ "name": "If-Match",
943
+ "in": "header",
944
+ "required": true,
945
+ "schema": {
946
+ "type": "integer",
947
+ "minimum": 1
948
+ }
949
+ }
950
+ ],
951
+ "requestBody": {
952
+ "required": true,
953
+ "content": {
954
+ "application/json": {
955
+ "schema": {
956
+ "$ref": "#/components/schemas/RunUpdate"
957
+ }
958
+ }
959
+ }
960
+ },
961
+ "responses": {
962
+ "200": {
963
+ "description": "Success",
964
+ "content": {
965
+ "application/json": {
966
+ "schema": {
967
+ "$ref": "#/components/schemas/Run"
968
+ }
969
+ }
970
+ }
971
+ },
972
+ "default": {
973
+ "description": "Structured error",
974
+ "content": {
975
+ "application/json": {
976
+ "schema": {
977
+ "$ref": "#/components/schemas/Error"
978
+ }
979
+ }
980
+ }
981
+ }
982
+ }
983
+ }
984
+ },
985
+ "/health": {
986
+ "get": {
987
+ "operationId": "health",
988
+ "parameters": [],
989
+ "responses": {
990
+ "200": {
991
+ "description": "Success",
992
+ "content": {
993
+ "application/json": {
994
+ "schema": {
995
+ "$ref": "#/components/schemas/Health"
996
+ }
997
+ }
998
+ }
999
+ },
1000
+ "default": {
1001
+ "description": "Structured error",
1002
+ "content": {
1003
+ "application/json": {
1004
+ "schema": {
1005
+ "$ref": "#/components/schemas/Error"
1006
+ }
1007
+ }
1008
+ }
1009
+ }
1010
+ },
1011
+ "security": []
1012
+ }
1013
+ },
1014
+ "/ready": {
1015
+ "get": {
1016
+ "operationId": "ready",
1017
+ "parameters": [],
1018
+ "responses": {
1019
+ "200": {
1020
+ "description": "Success",
1021
+ "content": {
1022
+ "application/json": {
1023
+ "schema": {
1024
+ "$ref": "#/components/schemas/Ready"
1025
+ }
1026
+ }
1027
+ }
1028
+ },
1029
+ "default": {
1030
+ "description": "Structured error",
1031
+ "content": {
1032
+ "application/json": {
1033
+ "schema": {
1034
+ "$ref": "#/components/schemas/Error"
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+ },
1040
+ "security": []
1041
+ }
1042
+ },
1043
+ "/version": {
1044
+ "get": {
1045
+ "operationId": "version",
1046
+ "parameters": [],
1047
+ "responses": {
1048
+ "200": {
1049
+ "description": "Success",
1050
+ "content": {
1051
+ "application/json": {
1052
+ "schema": {
1053
+ "$ref": "#/components/schemas/Version"
1054
+ }
1055
+ }
1056
+ }
1057
+ },
1058
+ "default": {
1059
+ "description": "Structured error",
1060
+ "content": {
1061
+ "application/json": {
1062
+ "schema": {
1063
+ "$ref": "#/components/schemas/Error"
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ },
1069
+ "security": []
1070
+ }
1071
+ },
1072
+ "/v1/openapi.json": {
1073
+ "get": {
1074
+ "operationId": "openApi",
1075
+ "parameters": [],
1076
+ "responses": {
1077
+ "200": {
1078
+ "description": "Success",
1079
+ "content": {
1080
+ "application/json": {
1081
+ "schema": {
1082
+ "type": "object",
1083
+ "additionalProperties": true
1084
+ }
1085
+ }
1086
+ }
1087
+ },
1088
+ "default": {
1089
+ "description": "Structured error",
1090
+ "content": {
1091
+ "application/json": {
1092
+ "schema": {
1093
+ "$ref": "#/components/schemas/Error"
1094
+ }
1095
+ }
1096
+ }
1097
+ }
1098
+ }
1099
+ }
1100
+ }
1101
+ },
1102
+ "components": {
1103
+ "securitySchemes": {
1104
+ "bearerAuth": {
1105
+ "type": "http",
1106
+ "scheme": "bearer"
1107
+ }
1108
+ },
1109
+ "schemas": {
1110
+ "ProviderInput": {
1111
+ "type": "object",
1112
+ "properties": {
1113
+ "id": {
1114
+ "type": "string",
1115
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1116
+ },
1117
+ "name": {
1118
+ "type": "string",
1119
+ "minLength": 1,
1120
+ "maxLength": 200
1121
+ },
1122
+ "baseUrl": {
1123
+ "type": "string",
1124
+ "maxLength": 2000
1125
+ },
1126
+ "protocol": {
1127
+ "type": "string",
1128
+ "enum": [
1129
+ "anthropic-messages",
1130
+ "openai-responses",
1131
+ "openai-chat"
1132
+ ]
1133
+ },
1134
+ "credentialEnv": {
1135
+ "type": "string",
1136
+ "pattern": "^SWITCHER_PROVIDER_[A-Z0-9_]+$"
1137
+ },
1138
+ "authStyle": {
1139
+ "type": "string",
1140
+ "enum": [
1141
+ "bearer",
1142
+ "x-api-key"
1143
+ ],
1144
+ "default": "bearer"
1145
+ },
1146
+ "modelsPath": {
1147
+ "type": "string",
1148
+ "pattern": "^[a-zA-Z0-9_/-]+$",
1149
+ "maxLength": 200,
1150
+ "default": "models"
1151
+ },
1152
+ "manualModels": {
1153
+ "type": "array",
1154
+ "items": {
1155
+ "type": "object",
1156
+ "properties": {
1157
+ "id": {
1158
+ "type": "string",
1159
+ "minLength": 1,
1160
+ "maxLength": 300
1161
+ },
1162
+ "name": {
1163
+ "type": "string",
1164
+ "minLength": 1,
1165
+ "maxLength": 200
1166
+ },
1167
+ "description": {
1168
+ "type": "string",
1169
+ "maxLength": 8000
1170
+ },
1171
+ "contextWindow": {
1172
+ "type": "integer",
1173
+ "exclusiveMinimum": true,
1174
+ "minimum": 0
1175
+ },
1176
+ "maxOutputTokens": {
1177
+ "type": "integer",
1178
+ "exclusiveMinimum": true,
1179
+ "minimum": 0
1180
+ },
1181
+ "inputModalities": {
1182
+ "type": "array",
1183
+ "items": {
1184
+ "type": "string",
1185
+ "maxLength": 50
1186
+ },
1187
+ "maxItems": 20
1188
+ },
1189
+ "outputModalities": {
1190
+ "type": "array",
1191
+ "items": {
1192
+ "type": "string",
1193
+ "maxLength": 50
1194
+ },
1195
+ "maxItems": 20
1196
+ },
1197
+ "supportedParameters": {
1198
+ "type": "array",
1199
+ "items": {
1200
+ "type": "string",
1201
+ "maxLength": 100
1202
+ },
1203
+ "maxItems": 100
1204
+ }
1205
+ },
1206
+ "required": [
1207
+ "id",
1208
+ "name"
1209
+ ],
1210
+ "additionalProperties": false
1211
+ },
1212
+ "maxItems": 10000,
1213
+ "default": []
1214
+ }
1215
+ },
1216
+ "required": [
1217
+ "id",
1218
+ "name",
1219
+ "baseUrl",
1220
+ "protocol"
1221
+ ],
1222
+ "additionalProperties": false
1223
+ },
1224
+ "Provider": {
1225
+ "type": "object",
1226
+ "properties": {
1227
+ "id": {
1228
+ "type": "string",
1229
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1230
+ },
1231
+ "name": {
1232
+ "type": "string",
1233
+ "minLength": 1,
1234
+ "maxLength": 200
1235
+ },
1236
+ "baseUrl": {
1237
+ "type": "string",
1238
+ "maxLength": 2000
1239
+ },
1240
+ "protocol": {
1241
+ "type": "string",
1242
+ "enum": [
1243
+ "anthropic-messages",
1244
+ "openai-responses",
1245
+ "openai-chat"
1246
+ ]
1247
+ },
1248
+ "credentialEnv": {
1249
+ "type": "string",
1250
+ "pattern": "^SWITCHER_PROVIDER_[A-Z0-9_]+$"
1251
+ },
1252
+ "authStyle": {
1253
+ "type": "string",
1254
+ "enum": [
1255
+ "bearer",
1256
+ "x-api-key"
1257
+ ],
1258
+ "default": "bearer"
1259
+ },
1260
+ "modelsPath": {
1261
+ "type": "string",
1262
+ "pattern": "^[a-zA-Z0-9_/-]+$",
1263
+ "maxLength": 200,
1264
+ "default": "models"
1265
+ },
1266
+ "manualModels": {
1267
+ "type": "array",
1268
+ "items": {
1269
+ "type": "object",
1270
+ "properties": {
1271
+ "id": {
1272
+ "type": "string",
1273
+ "minLength": 1,
1274
+ "maxLength": 300
1275
+ },
1276
+ "name": {
1277
+ "type": "string",
1278
+ "minLength": 1,
1279
+ "maxLength": 200
1280
+ },
1281
+ "description": {
1282
+ "type": "string",
1283
+ "maxLength": 8000
1284
+ },
1285
+ "contextWindow": {
1286
+ "type": "integer",
1287
+ "exclusiveMinimum": true,
1288
+ "minimum": 0
1289
+ },
1290
+ "maxOutputTokens": {
1291
+ "type": "integer",
1292
+ "exclusiveMinimum": true,
1293
+ "minimum": 0
1294
+ },
1295
+ "inputModalities": {
1296
+ "type": "array",
1297
+ "items": {
1298
+ "type": "string",
1299
+ "maxLength": 50
1300
+ },
1301
+ "maxItems": 20
1302
+ },
1303
+ "outputModalities": {
1304
+ "type": "array",
1305
+ "items": {
1306
+ "type": "string",
1307
+ "maxLength": 50
1308
+ },
1309
+ "maxItems": 20
1310
+ },
1311
+ "supportedParameters": {
1312
+ "type": "array",
1313
+ "items": {
1314
+ "type": "string",
1315
+ "maxLength": 100
1316
+ },
1317
+ "maxItems": 100
1318
+ }
1319
+ },
1320
+ "required": [
1321
+ "id",
1322
+ "name"
1323
+ ],
1324
+ "additionalProperties": false
1325
+ },
1326
+ "maxItems": 10000,
1327
+ "default": []
1328
+ },
1329
+ "version": {
1330
+ "type": "integer",
1331
+ "exclusiveMinimum": true,
1332
+ "minimum": 0
1333
+ },
1334
+ "updatedAt": {
1335
+ "type": "string"
1336
+ }
1337
+ },
1338
+ "required": [
1339
+ "id",
1340
+ "name",
1341
+ "baseUrl",
1342
+ "protocol",
1343
+ "version",
1344
+ "updatedAt"
1345
+ ],
1346
+ "additionalProperties": false
1347
+ },
1348
+ "ProfileInput": {
1349
+ "type": "object",
1350
+ "properties": {
1351
+ "id": {
1352
+ "type": "string",
1353
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1354
+ },
1355
+ "name": {
1356
+ "type": "string",
1357
+ "minLength": 1,
1358
+ "maxLength": 200
1359
+ },
1360
+ "providerId": {
1361
+ "type": "string",
1362
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1363
+ },
1364
+ "harness": {
1365
+ "type": "string",
1366
+ "enum": [
1367
+ "claude",
1368
+ "codex",
1369
+ "grok",
1370
+ "opencode2"
1371
+ ]
1372
+ },
1373
+ "model": {
1374
+ "type": "string",
1375
+ "minLength": 1,
1376
+ "maxLength": 300
1377
+ }
1378
+ },
1379
+ "required": [
1380
+ "id",
1381
+ "name",
1382
+ "providerId",
1383
+ "harness",
1384
+ "model"
1385
+ ],
1386
+ "additionalProperties": false
1387
+ },
1388
+ "Profile": {
1389
+ "type": "object",
1390
+ "properties": {
1391
+ "id": {
1392
+ "type": "string",
1393
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1394
+ },
1395
+ "name": {
1396
+ "type": "string",
1397
+ "minLength": 1,
1398
+ "maxLength": 200
1399
+ },
1400
+ "providerId": {
1401
+ "type": "string",
1402
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1403
+ },
1404
+ "harness": {
1405
+ "type": "string",
1406
+ "enum": [
1407
+ "claude",
1408
+ "codex",
1409
+ "grok",
1410
+ "opencode2"
1411
+ ]
1412
+ },
1413
+ "model": {
1414
+ "type": "string",
1415
+ "minLength": 1,
1416
+ "maxLength": 300
1417
+ },
1418
+ "version": {
1419
+ "type": "integer",
1420
+ "exclusiveMinimum": true,
1421
+ "minimum": 0
1422
+ },
1423
+ "updatedAt": {
1424
+ "type": "string"
1425
+ }
1426
+ },
1427
+ "required": [
1428
+ "id",
1429
+ "name",
1430
+ "providerId",
1431
+ "harness",
1432
+ "model",
1433
+ "version",
1434
+ "updatedAt"
1435
+ ],
1436
+ "additionalProperties": false
1437
+ },
1438
+ "Model": {
1439
+ "type": "object",
1440
+ "properties": {
1441
+ "id": {
1442
+ "type": "string",
1443
+ "minLength": 1,
1444
+ "maxLength": 300
1445
+ },
1446
+ "name": {
1447
+ "type": "string",
1448
+ "minLength": 1,
1449
+ "maxLength": 200
1450
+ },
1451
+ "description": {
1452
+ "type": "string",
1453
+ "maxLength": 8000
1454
+ },
1455
+ "contextWindow": {
1456
+ "type": "integer",
1457
+ "exclusiveMinimum": true,
1458
+ "minimum": 0
1459
+ },
1460
+ "maxOutputTokens": {
1461
+ "type": "integer",
1462
+ "exclusiveMinimum": true,
1463
+ "minimum": 0
1464
+ },
1465
+ "inputModalities": {
1466
+ "type": "array",
1467
+ "items": {
1468
+ "type": "string",
1469
+ "maxLength": 50
1470
+ },
1471
+ "maxItems": 20
1472
+ },
1473
+ "outputModalities": {
1474
+ "type": "array",
1475
+ "items": {
1476
+ "type": "string",
1477
+ "maxLength": 50
1478
+ },
1479
+ "maxItems": 20
1480
+ },
1481
+ "supportedParameters": {
1482
+ "type": "array",
1483
+ "items": {
1484
+ "type": "string",
1485
+ "maxLength": 100
1486
+ },
1487
+ "maxItems": 100
1488
+ }
1489
+ },
1490
+ "required": [
1491
+ "id",
1492
+ "name"
1493
+ ],
1494
+ "additionalProperties": false
1495
+ },
1496
+ "ModelPage": {
1497
+ "type": "object",
1498
+ "properties": {
1499
+ "data": {
1500
+ "type": "array",
1501
+ "items": {
1502
+ "type": "object",
1503
+ "properties": {
1504
+ "id": {
1505
+ "type": "string",
1506
+ "minLength": 1,
1507
+ "maxLength": 300
1508
+ },
1509
+ "name": {
1510
+ "type": "string",
1511
+ "minLength": 1,
1512
+ "maxLength": 200
1513
+ },
1514
+ "description": {
1515
+ "type": "string",
1516
+ "maxLength": 8000
1517
+ },
1518
+ "contextWindow": {
1519
+ "type": "integer",
1520
+ "exclusiveMinimum": true,
1521
+ "minimum": 0
1522
+ },
1523
+ "maxOutputTokens": {
1524
+ "type": "integer",
1525
+ "exclusiveMinimum": true,
1526
+ "minimum": 0
1527
+ },
1528
+ "inputModalities": {
1529
+ "type": "array",
1530
+ "items": {
1531
+ "type": "string",
1532
+ "maxLength": 50
1533
+ },
1534
+ "maxItems": 20
1535
+ },
1536
+ "outputModalities": {
1537
+ "type": "array",
1538
+ "items": {
1539
+ "type": "string",
1540
+ "maxLength": 50
1541
+ },
1542
+ "maxItems": 20
1543
+ },
1544
+ "supportedParameters": {
1545
+ "type": "array",
1546
+ "items": {
1547
+ "type": "string",
1548
+ "maxLength": 100
1549
+ },
1550
+ "maxItems": 100
1551
+ },
1552
+ "codingEligible": {
1553
+ "type": "boolean"
1554
+ }
1555
+ },
1556
+ "required": [
1557
+ "id",
1558
+ "name",
1559
+ "codingEligible"
1560
+ ],
1561
+ "additionalProperties": false
1562
+ }
1563
+ },
1564
+ "total": {
1565
+ "type": "integer"
1566
+ },
1567
+ "limit": {
1568
+ "type": "integer"
1569
+ },
1570
+ "offset": {
1571
+ "type": "integer"
1572
+ },
1573
+ "refreshedAt": {
1574
+ "type": "string"
1575
+ },
1576
+ "source": {
1577
+ "type": "string",
1578
+ "enum": [
1579
+ "remote",
1580
+ "manual"
1581
+ ]
1582
+ }
1583
+ },
1584
+ "required": [
1585
+ "data",
1586
+ "total",
1587
+ "limit",
1588
+ "offset",
1589
+ "refreshedAt",
1590
+ "source"
1591
+ ],
1592
+ "additionalProperties": false
1593
+ },
1594
+ "Catalog": {
1595
+ "type": "object",
1596
+ "properties": {
1597
+ "models": {
1598
+ "type": "array",
1599
+ "items": {
1600
+ "type": "object",
1601
+ "properties": {
1602
+ "id": {
1603
+ "type": "string",
1604
+ "minLength": 1,
1605
+ "maxLength": 300
1606
+ },
1607
+ "name": {
1608
+ "type": "string",
1609
+ "minLength": 1,
1610
+ "maxLength": 200
1611
+ },
1612
+ "description": {
1613
+ "type": "string",
1614
+ "maxLength": 8000
1615
+ },
1616
+ "contextWindow": {
1617
+ "type": "integer",
1618
+ "exclusiveMinimum": true,
1619
+ "minimum": 0
1620
+ },
1621
+ "maxOutputTokens": {
1622
+ "type": "integer",
1623
+ "exclusiveMinimum": true,
1624
+ "minimum": 0
1625
+ },
1626
+ "inputModalities": {
1627
+ "type": "array",
1628
+ "items": {
1629
+ "type": "string",
1630
+ "maxLength": 50
1631
+ },
1632
+ "maxItems": 20
1633
+ },
1634
+ "outputModalities": {
1635
+ "type": "array",
1636
+ "items": {
1637
+ "type": "string",
1638
+ "maxLength": 50
1639
+ },
1640
+ "maxItems": 20
1641
+ },
1642
+ "supportedParameters": {
1643
+ "type": "array",
1644
+ "items": {
1645
+ "type": "string",
1646
+ "maxLength": 100
1647
+ },
1648
+ "maxItems": 100
1649
+ }
1650
+ },
1651
+ "required": [
1652
+ "id",
1653
+ "name"
1654
+ ],
1655
+ "additionalProperties": false
1656
+ }
1657
+ },
1658
+ "refreshedAt": {
1659
+ "type": "string"
1660
+ },
1661
+ "source": {
1662
+ "type": "string",
1663
+ "enum": [
1664
+ "remote",
1665
+ "manual"
1666
+ ]
1667
+ }
1668
+ },
1669
+ "required": [
1670
+ "models",
1671
+ "refreshedAt",
1672
+ "source"
1673
+ ],
1674
+ "additionalProperties": false
1675
+ },
1676
+ "LaunchPlan": {
1677
+ "type": "object",
1678
+ "properties": {
1679
+ "provider": {
1680
+ "type": "object",
1681
+ "properties": {
1682
+ "id": {
1683
+ "type": "string",
1684
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1685
+ },
1686
+ "name": {
1687
+ "type": "string",
1688
+ "minLength": 1,
1689
+ "maxLength": 200
1690
+ },
1691
+ "baseUrl": {
1692
+ "type": "string",
1693
+ "maxLength": 2000
1694
+ },
1695
+ "protocol": {
1696
+ "type": "string",
1697
+ "enum": [
1698
+ "anthropic-messages",
1699
+ "openai-responses",
1700
+ "openai-chat"
1701
+ ]
1702
+ },
1703
+ "credentialEnv": {
1704
+ "type": "string",
1705
+ "pattern": "^SWITCHER_PROVIDER_[A-Z0-9_]+$"
1706
+ },
1707
+ "authStyle": {
1708
+ "type": "string",
1709
+ "enum": [
1710
+ "bearer",
1711
+ "x-api-key"
1712
+ ],
1713
+ "default": "bearer"
1714
+ },
1715
+ "modelsPath": {
1716
+ "type": "string",
1717
+ "pattern": "^[a-zA-Z0-9_/-]+$",
1718
+ "maxLength": 200,
1719
+ "default": "models"
1720
+ },
1721
+ "manualModels": {
1722
+ "type": "array",
1723
+ "items": {
1724
+ "type": "object",
1725
+ "properties": {
1726
+ "id": {
1727
+ "type": "string",
1728
+ "minLength": 1,
1729
+ "maxLength": 300
1730
+ },
1731
+ "name": {
1732
+ "type": "string",
1733
+ "minLength": 1,
1734
+ "maxLength": 200
1735
+ },
1736
+ "description": {
1737
+ "type": "string",
1738
+ "maxLength": 8000
1739
+ },
1740
+ "contextWindow": {
1741
+ "type": "integer",
1742
+ "exclusiveMinimum": true,
1743
+ "minimum": 0
1744
+ },
1745
+ "maxOutputTokens": {
1746
+ "type": "integer",
1747
+ "exclusiveMinimum": true,
1748
+ "minimum": 0
1749
+ },
1750
+ "inputModalities": {
1751
+ "type": "array",
1752
+ "items": {
1753
+ "type": "string",
1754
+ "maxLength": 50
1755
+ },
1756
+ "maxItems": 20
1757
+ },
1758
+ "outputModalities": {
1759
+ "type": "array",
1760
+ "items": {
1761
+ "type": "string",
1762
+ "maxLength": 50
1763
+ },
1764
+ "maxItems": 20
1765
+ },
1766
+ "supportedParameters": {
1767
+ "type": "array",
1768
+ "items": {
1769
+ "type": "string",
1770
+ "maxLength": 100
1771
+ },
1772
+ "maxItems": 100
1773
+ }
1774
+ },
1775
+ "required": [
1776
+ "id",
1777
+ "name"
1778
+ ],
1779
+ "additionalProperties": false
1780
+ },
1781
+ "maxItems": 10000,
1782
+ "default": []
1783
+ },
1784
+ "version": {
1785
+ "type": "integer",
1786
+ "exclusiveMinimum": true,
1787
+ "minimum": 0
1788
+ },
1789
+ "updatedAt": {
1790
+ "type": "string"
1791
+ }
1792
+ },
1793
+ "required": [
1794
+ "id",
1795
+ "name",
1796
+ "baseUrl",
1797
+ "protocol",
1798
+ "version",
1799
+ "updatedAt"
1800
+ ],
1801
+ "additionalProperties": false
1802
+ },
1803
+ "profile": {
1804
+ "type": "object",
1805
+ "properties": {
1806
+ "id": {
1807
+ "type": "string",
1808
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1809
+ },
1810
+ "name": {
1811
+ "type": "string",
1812
+ "minLength": 1,
1813
+ "maxLength": 200
1814
+ },
1815
+ "providerId": {
1816
+ "type": "string",
1817
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1818
+ },
1819
+ "harness": {
1820
+ "type": "string",
1821
+ "enum": [
1822
+ "claude",
1823
+ "codex",
1824
+ "grok",
1825
+ "opencode2"
1826
+ ]
1827
+ },
1828
+ "model": {
1829
+ "type": "string",
1830
+ "minLength": 1,
1831
+ "maxLength": 300
1832
+ },
1833
+ "version": {
1834
+ "type": "integer",
1835
+ "exclusiveMinimum": true,
1836
+ "minimum": 0
1837
+ },
1838
+ "updatedAt": {
1839
+ "type": "string"
1840
+ }
1841
+ },
1842
+ "required": [
1843
+ "id",
1844
+ "name",
1845
+ "providerId",
1846
+ "harness",
1847
+ "model",
1848
+ "version",
1849
+ "updatedAt"
1850
+ ],
1851
+ "additionalProperties": false
1852
+ },
1853
+ "catalog": {
1854
+ "type": "object",
1855
+ "properties": {
1856
+ "models": {
1857
+ "type": "array",
1858
+ "items": {
1859
+ "type": "object",
1860
+ "properties": {
1861
+ "id": {
1862
+ "type": "string",
1863
+ "minLength": 1,
1864
+ "maxLength": 300
1865
+ },
1866
+ "name": {
1867
+ "type": "string",
1868
+ "minLength": 1,
1869
+ "maxLength": 200
1870
+ },
1871
+ "description": {
1872
+ "type": "string",
1873
+ "maxLength": 8000
1874
+ },
1875
+ "contextWindow": {
1876
+ "type": "integer",
1877
+ "exclusiveMinimum": true,
1878
+ "minimum": 0
1879
+ },
1880
+ "maxOutputTokens": {
1881
+ "type": "integer",
1882
+ "exclusiveMinimum": true,
1883
+ "minimum": 0
1884
+ },
1885
+ "inputModalities": {
1886
+ "type": "array",
1887
+ "items": {
1888
+ "type": "string",
1889
+ "maxLength": 50
1890
+ },
1891
+ "maxItems": 20
1892
+ },
1893
+ "outputModalities": {
1894
+ "type": "array",
1895
+ "items": {
1896
+ "type": "string",
1897
+ "maxLength": 50
1898
+ },
1899
+ "maxItems": 20
1900
+ },
1901
+ "supportedParameters": {
1902
+ "type": "array",
1903
+ "items": {
1904
+ "type": "string",
1905
+ "maxLength": 100
1906
+ },
1907
+ "maxItems": 100
1908
+ }
1909
+ },
1910
+ "required": [
1911
+ "id",
1912
+ "name"
1913
+ ],
1914
+ "additionalProperties": false
1915
+ }
1916
+ },
1917
+ "refreshedAt": {
1918
+ "type": "string"
1919
+ },
1920
+ "source": {
1921
+ "type": "string",
1922
+ "enum": [
1923
+ "remote",
1924
+ "manual"
1925
+ ]
1926
+ }
1927
+ },
1928
+ "required": [
1929
+ "models",
1930
+ "refreshedAt",
1931
+ "source"
1932
+ ],
1933
+ "additionalProperties": false
1934
+ },
1935
+ "planToken": {
1936
+ "type": "string"
1937
+ },
1938
+ "warnings": {
1939
+ "type": "array",
1940
+ "items": {
1941
+ "type": "string"
1942
+ }
1943
+ }
1944
+ },
1945
+ "required": [
1946
+ "provider",
1947
+ "profile",
1948
+ "catalog",
1949
+ "planToken",
1950
+ "warnings"
1951
+ ],
1952
+ "additionalProperties": false
1953
+ },
1954
+ "RunInput": {
1955
+ "type": "object",
1956
+ "properties": {
1957
+ "profileId": {
1958
+ "type": "string",
1959
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
1960
+ },
1961
+ "harness": {
1962
+ "type": "string",
1963
+ "enum": [
1964
+ "claude",
1965
+ "codex",
1966
+ "grok",
1967
+ "opencode2"
1968
+ ]
1969
+ },
1970
+ "model": {
1971
+ "type": "string",
1972
+ "minLength": 1,
1973
+ "maxLength": 300
1974
+ },
1975
+ "planToken": {
1976
+ "type": "string",
1977
+ "pattern": "^[a-f0-9]{64}$"
1978
+ }
1979
+ },
1980
+ "required": [
1981
+ "profileId",
1982
+ "harness",
1983
+ "model",
1984
+ "planToken"
1985
+ ],
1986
+ "additionalProperties": false
1987
+ },
1988
+ "RunUpdate": {
1989
+ "type": "object",
1990
+ "properties": {
1991
+ "status": {
1992
+ "type": "string",
1993
+ "enum": [
1994
+ "exited",
1995
+ "failed",
1996
+ "interrupted"
1997
+ ]
1998
+ },
1999
+ "exitCode": {
2000
+ "type": "integer",
2001
+ "minimum": 0,
2002
+ "maximum": 255
2003
+ }
2004
+ },
2005
+ "required": [
2006
+ "status",
2007
+ "exitCode"
2008
+ ],
2009
+ "additionalProperties": false
2010
+ },
2011
+ "Run": {
2012
+ "type": "object",
2013
+ "properties": {
2014
+ "profileId": {
2015
+ "type": "string",
2016
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
2017
+ },
2018
+ "harness": {
2019
+ "type": "string",
2020
+ "enum": [
2021
+ "claude",
2022
+ "codex",
2023
+ "grok",
2024
+ "opencode2"
2025
+ ]
2026
+ },
2027
+ "model": {
2028
+ "type": "string",
2029
+ "minLength": 1,
2030
+ "maxLength": 300
2031
+ },
2032
+ "planToken": {
2033
+ "type": "string",
2034
+ "pattern": "^[a-f0-9]{64}$"
2035
+ },
2036
+ "version": {
2037
+ "type": "integer",
2038
+ "exclusiveMinimum": true,
2039
+ "minimum": 0
2040
+ },
2041
+ "updatedAt": {
2042
+ "type": "string"
2043
+ },
2044
+ "providerId": {
2045
+ "type": "string",
2046
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
2047
+ },
2048
+ "providerVersion": {
2049
+ "type": "integer",
2050
+ "exclusiveMinimum": true,
2051
+ "minimum": 0
2052
+ },
2053
+ "profileVersion": {
2054
+ "type": "integer",
2055
+ "exclusiveMinimum": true,
2056
+ "minimum": 0
2057
+ },
2058
+ "id": {
2059
+ "type": "string",
2060
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
2061
+ },
2062
+ "status": {
2063
+ "type": "string",
2064
+ "enum": [
2065
+ "running",
2066
+ "exited",
2067
+ "failed",
2068
+ "interrupted"
2069
+ ]
2070
+ },
2071
+ "startedAt": {
2072
+ "type": "string"
2073
+ },
2074
+ "endedAt": {
2075
+ "type": "string"
2076
+ },
2077
+ "exitCode": {
2078
+ "type": "integer"
2079
+ }
2080
+ },
2081
+ "required": [
2082
+ "profileId",
2083
+ "harness",
2084
+ "model",
2085
+ "planToken",
2086
+ "version",
2087
+ "updatedAt",
2088
+ "providerId",
2089
+ "providerVersion",
2090
+ "profileVersion",
2091
+ "id",
2092
+ "status",
2093
+ "startedAt"
2094
+ ],
2095
+ "additionalProperties": false
2096
+ },
2097
+ "Health": {
2098
+ "type": "object",
2099
+ "properties": {
2100
+ "status": {
2101
+ "type": "string",
2102
+ "enum": [
2103
+ "ok",
2104
+ "degraded",
2105
+ "unavailable"
2106
+ ]
2107
+ },
2108
+ "version": {
2109
+ "type": "string"
2110
+ },
2111
+ "backend": {
2112
+ "type": "string",
2113
+ "enum": [
2114
+ "sqlite",
2115
+ "postgresql"
2116
+ ]
2117
+ }
2118
+ },
2119
+ "required": [
2120
+ "status",
2121
+ "version",
2122
+ "backend"
2123
+ ],
2124
+ "additionalProperties": false
2125
+ },
2126
+ "Ready": {
2127
+ "type": "object",
2128
+ "properties": {
2129
+ "ready": {
2130
+ "type": "boolean"
2131
+ },
2132
+ "reason": {
2133
+ "type": "string"
2134
+ }
2135
+ },
2136
+ "required": [
2137
+ "ready"
2138
+ ],
2139
+ "additionalProperties": false
2140
+ },
2141
+ "Version": {
2142
+ "type": "object",
2143
+ "properties": {
2144
+ "version": {
2145
+ "type": "string"
2146
+ }
2147
+ },
2148
+ "required": [
2149
+ "version"
2150
+ ],
2151
+ "additionalProperties": false
2152
+ },
2153
+ "LaunchInput": {
2154
+ "type": "object",
2155
+ "properties": {
2156
+ "profileId": {
2157
+ "type": "string",
2158
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
2159
+ }
2160
+ },
2161
+ "required": [
2162
+ "profileId"
2163
+ ],
2164
+ "additionalProperties": false
2165
+ },
2166
+ "Empty": {
2167
+ "type": "object",
2168
+ "properties": {},
2169
+ "additionalProperties": false
2170
+ },
2171
+ "Error": {
2172
+ "type": "object",
2173
+ "properties": {
2174
+ "error": {
2175
+ "type": "object",
2176
+ "properties": {
2177
+ "code": {
2178
+ "type": "string"
2179
+ },
2180
+ "message": {
2181
+ "type": "string"
2182
+ },
2183
+ "requestId": {
2184
+ "type": "string"
2185
+ }
2186
+ },
2187
+ "required": [
2188
+ "code",
2189
+ "message",
2190
+ "requestId"
2191
+ ],
2192
+ "additionalProperties": false
2193
+ }
2194
+ },
2195
+ "required": [
2196
+ "error"
2197
+ ],
2198
+ "additionalProperties": false
2199
+ }
2200
+ }
2201
+ }
2202
+ }