@hasna/switcher 0.1.0 → 0.1.2
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/README.md +210 -13
- package/dist/aider-args.d.ts +7 -0
- package/dist/aider-config.d.ts +6 -0
- package/dist/auth.d.ts +3 -0
- package/dist/catalog.d.ts +3 -2
- package/dist/cli/index.js +8558 -337
- package/dist/cline-backend.d.ts +7 -0
- package/dist/credentials.d.ts +178 -0
- package/dist/direct-launch.d.ts +6 -0
- package/dist/domain.d.ts +142 -19
- package/dist/dsh-args.d.ts +5 -0
- package/dist/gemini-bridge.d.ts +6 -0
- package/dist/gemini-config.d.ts +12 -0
- package/dist/generated/api.d.ts +163 -11
- package/dist/grok-args.d.ts +1 -0
- package/dist/harness-arguments.d.ts +6 -0
- package/dist/harness-environment.d.ts +1 -0
- package/dist/harness-installation.d.ts +19 -0
- package/dist/harness-process.d.ts +11 -0
- package/dist/harness-types.d.ts +2 -0
- package/dist/harnesses.d.ts +36 -2
- package/dist/hermes-backend.d.ts +19 -0
- package/dist/index.js +209 -6
- package/dist/kilo-config.d.ts +13 -0
- package/dist/kilo.d.ts +5 -0
- package/dist/launcher.d.ts +39 -3
- package/dist/mcp/index.js +159 -7
- package/dist/omp-backend.d.ts +7 -0
- package/dist/opencode2-config.d.ts +60 -0
- package/dist/ori-backend.d.ts +89 -0
- package/dist/presets.d.ts +64 -0
- package/dist/runtime.d.ts +20 -0
- package/dist/sdk.d.ts +95 -19
- package/dist/sdk.js +209 -6
- package/dist/serve/index.js +909 -98
- package/dist/server.d.ts +16 -0
- package/dist/service.d.ts +2 -1
- package/dist/terminal-descriptors.d.ts +5 -0
- package/hasna.contract.json +1 -1
- package/openapi.json +450 -12
- package/package.json +19 -4
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CatalogCredentialResolver } from "./catalog";
|
|
2
|
+
export type ServerOptions = {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
databaseUrl?: string;
|
|
5
|
+
sqlitePath?: string;
|
|
6
|
+
hostname?: string;
|
|
7
|
+
port?: number;
|
|
8
|
+
providerEnv?: Record<string, string | undefined>;
|
|
9
|
+
resolveCredential?: CatalogCredentialResolver;
|
|
10
|
+
};
|
|
11
|
+
/** Owns only this listener and database connection; no global signal handlers. */
|
|
12
|
+
export declare function startServer(options: ServerOptions): Promise<{
|
|
13
|
+
url: string;
|
|
14
|
+
storage: "sqlite" | "postgresql";
|
|
15
|
+
close(): Promise<void>;
|
|
16
|
+
}>;
|
package/dist/service.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { Store } from "./store";
|
|
2
|
-
|
|
2
|
+
import { type CatalogCredentialResolver } from "./catalog";
|
|
3
|
+
export declare function createHandler(store: Store, apiKey: string, providerEnv?: Record<string, string | undefined>, resolveCredential?: CatalogCredentialResolver): (request: Request) => Promise<Response>;
|
package/hasna.contract.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "switcher",
|
|
5
5
|
"class": "cli-with-store",
|
|
6
6
|
"contractVersion": "v1",
|
|
7
|
-
"kitVersion": "1.0.
|
|
7
|
+
"kitVersion": "1.0.2",
|
|
8
8
|
"description": "Universal provider and model switcher for coding harnesses with an API, SDK and self-hosted storage",
|
|
9
9
|
"bins": [
|
|
10
10
|
"switcher",
|
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Switcher API",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.2",
|
|
6
6
|
"description": "Authenticated provider/profile/catalog control plane. Launches run locally; the API never returns provider credentials."
|
|
7
7
|
},
|
|
8
8
|
"security": [
|
|
@@ -587,6 +587,82 @@
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
},
|
|
590
|
+
"/v1/provider-presets": {
|
|
591
|
+
"get": {
|
|
592
|
+
"operationId": "listProviderPresets",
|
|
593
|
+
"parameters": [],
|
|
594
|
+
"responses": {
|
|
595
|
+
"200": {
|
|
596
|
+
"description": "Success",
|
|
597
|
+
"content": {
|
|
598
|
+
"application/json": {
|
|
599
|
+
"schema": {
|
|
600
|
+
"type": "object",
|
|
601
|
+
"required": [
|
|
602
|
+
"data"
|
|
603
|
+
],
|
|
604
|
+
"properties": {
|
|
605
|
+
"data": {
|
|
606
|
+
"type": "array",
|
|
607
|
+
"items": {
|
|
608
|
+
"$ref": "#/components/schemas/ProviderPreset"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"default": {
|
|
617
|
+
"description": "Structured error",
|
|
618
|
+
"content": {
|
|
619
|
+
"application/json": {
|
|
620
|
+
"schema": {
|
|
621
|
+
"$ref": "#/components/schemas/Error"
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"/v1/provider-presets/{id}": {
|
|
630
|
+
"get": {
|
|
631
|
+
"operationId": "getProviderPreset",
|
|
632
|
+
"parameters": [
|
|
633
|
+
{
|
|
634
|
+
"name": "id",
|
|
635
|
+
"in": "path",
|
|
636
|
+
"required": true,
|
|
637
|
+
"schema": {
|
|
638
|
+
"type": "string"
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
"responses": {
|
|
643
|
+
"200": {
|
|
644
|
+
"description": "Success",
|
|
645
|
+
"content": {
|
|
646
|
+
"application/json": {
|
|
647
|
+
"schema": {
|
|
648
|
+
"$ref": "#/components/schemas/ProviderPreset"
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
"default": {
|
|
654
|
+
"description": "Structured error",
|
|
655
|
+
"content": {
|
|
656
|
+
"application/json": {
|
|
657
|
+
"schema": {
|
|
658
|
+
"$ref": "#/components/schemas/Error"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
},
|
|
590
666
|
"/v1/providers/{id}/models": {
|
|
591
667
|
"get": {
|
|
592
668
|
"operationId": "listModels",
|
|
@@ -1107,6 +1183,126 @@
|
|
|
1107
1183
|
}
|
|
1108
1184
|
},
|
|
1109
1185
|
"schemas": {
|
|
1186
|
+
"ProviderPreset": {
|
|
1187
|
+
"type": "object",
|
|
1188
|
+
"properties": {
|
|
1189
|
+
"id": {
|
|
1190
|
+
"type": "string",
|
|
1191
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"
|
|
1192
|
+
},
|
|
1193
|
+
"name": {
|
|
1194
|
+
"type": "string",
|
|
1195
|
+
"minLength": 1,
|
|
1196
|
+
"maxLength": 200
|
|
1197
|
+
},
|
|
1198
|
+
"credentialEnv": {
|
|
1199
|
+
"type": "string",
|
|
1200
|
+
"pattern": "^SWITCHER_PROVIDER_[A-Z0-9_]+$"
|
|
1201
|
+
},
|
|
1202
|
+
"credentialAliases": {
|
|
1203
|
+
"type": "array",
|
|
1204
|
+
"items": {
|
|
1205
|
+
"type": "string",
|
|
1206
|
+
"pattern": "^[A-Z][A-Z0-9_]+$"
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
"protocols": {
|
|
1210
|
+
"type": "array",
|
|
1211
|
+
"items": {
|
|
1212
|
+
"type": "object",
|
|
1213
|
+
"properties": {
|
|
1214
|
+
"protocol": {
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"enum": [
|
|
1217
|
+
"anthropic-messages",
|
|
1218
|
+
"openai-responses",
|
|
1219
|
+
"openai-chat",
|
|
1220
|
+
"gemini-generate-content"
|
|
1221
|
+
]
|
|
1222
|
+
},
|
|
1223
|
+
"baseUrl": {
|
|
1224
|
+
"type": "string",
|
|
1225
|
+
"maxLength": 2000
|
|
1226
|
+
},
|
|
1227
|
+
"authStyle": {
|
|
1228
|
+
"type": "string",
|
|
1229
|
+
"enum": [
|
|
1230
|
+
"bearer",
|
|
1231
|
+
"x-api-key",
|
|
1232
|
+
"api-key"
|
|
1233
|
+
]
|
|
1234
|
+
},
|
|
1235
|
+
"catalogBaseUrl": {
|
|
1236
|
+
"type": "string",
|
|
1237
|
+
"maxLength": 2000
|
|
1238
|
+
},
|
|
1239
|
+
"catalogFormat": {
|
|
1240
|
+
"type": "string",
|
|
1241
|
+
"enum": [
|
|
1242
|
+
"openai",
|
|
1243
|
+
"ollama",
|
|
1244
|
+
"mistral",
|
|
1245
|
+
"together",
|
|
1246
|
+
"fireworks",
|
|
1247
|
+
"dashscope",
|
|
1248
|
+
"gemini",
|
|
1249
|
+
"none"
|
|
1250
|
+
]
|
|
1251
|
+
},
|
|
1252
|
+
"catalogAuthStyle": {
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"enum": [
|
|
1255
|
+
"bearer",
|
|
1256
|
+
"x-api-key",
|
|
1257
|
+
"api-key",
|
|
1258
|
+
"none"
|
|
1259
|
+
]
|
|
1260
|
+
},
|
|
1261
|
+
"modelsPath": {
|
|
1262
|
+
"type": "string"
|
|
1263
|
+
},
|
|
1264
|
+
"notes": {
|
|
1265
|
+
"type": "array",
|
|
1266
|
+
"items": {
|
|
1267
|
+
"type": "string"
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
"required": [
|
|
1272
|
+
"protocol",
|
|
1273
|
+
"authStyle",
|
|
1274
|
+
"catalogFormat",
|
|
1275
|
+
"modelsPath",
|
|
1276
|
+
"notes"
|
|
1277
|
+
],
|
|
1278
|
+
"additionalProperties": false
|
|
1279
|
+
},
|
|
1280
|
+
"minItems": 1
|
|
1281
|
+
},
|
|
1282
|
+
"sources": {
|
|
1283
|
+
"type": "array",
|
|
1284
|
+
"items": {
|
|
1285
|
+
"type": "string",
|
|
1286
|
+
"format": "uri"
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
"verification": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"enum": [
|
|
1292
|
+
"documented"
|
|
1293
|
+
]
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"required": [
|
|
1297
|
+
"id",
|
|
1298
|
+
"name",
|
|
1299
|
+
"credentialAliases",
|
|
1300
|
+
"protocols",
|
|
1301
|
+
"sources",
|
|
1302
|
+
"verification"
|
|
1303
|
+
],
|
|
1304
|
+
"additionalProperties": false
|
|
1305
|
+
},
|
|
1110
1306
|
"ProviderInput": {
|
|
1111
1307
|
"type": "object",
|
|
1112
1308
|
"properties": {
|
|
@@ -1128,7 +1324,8 @@
|
|
|
1128
1324
|
"enum": [
|
|
1129
1325
|
"anthropic-messages",
|
|
1130
1326
|
"openai-responses",
|
|
1131
|
-
"openai-chat"
|
|
1327
|
+
"openai-chat",
|
|
1328
|
+
"gemini-generate-content"
|
|
1132
1329
|
]
|
|
1133
1330
|
},
|
|
1134
1331
|
"credentialEnv": {
|
|
@@ -1139,10 +1336,45 @@
|
|
|
1139
1336
|
"type": "string",
|
|
1140
1337
|
"enum": [
|
|
1141
1338
|
"bearer",
|
|
1142
|
-
"x-api-key"
|
|
1339
|
+
"x-api-key",
|
|
1340
|
+
"api-key"
|
|
1143
1341
|
],
|
|
1144
1342
|
"default": "bearer"
|
|
1145
1343
|
},
|
|
1344
|
+
"catalogBaseUrl": {
|
|
1345
|
+
"type": "string",
|
|
1346
|
+
"maxLength": 2000
|
|
1347
|
+
},
|
|
1348
|
+
"catalogFormat": {
|
|
1349
|
+
"type": "string",
|
|
1350
|
+
"enum": [
|
|
1351
|
+
"openai",
|
|
1352
|
+
"ollama",
|
|
1353
|
+
"mistral",
|
|
1354
|
+
"together",
|
|
1355
|
+
"fireworks",
|
|
1356
|
+
"dashscope",
|
|
1357
|
+
"gemini",
|
|
1358
|
+
"none"
|
|
1359
|
+
]
|
|
1360
|
+
},
|
|
1361
|
+
"catalogAuthStyle": {
|
|
1362
|
+
"type": "string",
|
|
1363
|
+
"enum": [
|
|
1364
|
+
"bearer",
|
|
1365
|
+
"x-api-key",
|
|
1366
|
+
"api-key",
|
|
1367
|
+
"none"
|
|
1368
|
+
]
|
|
1369
|
+
},
|
|
1370
|
+
"catalogCredentialEnv": {
|
|
1371
|
+
"type": "string",
|
|
1372
|
+
"pattern": "^SWITCHER_PROVIDER_[A-Z0-9_]+$"
|
|
1373
|
+
},
|
|
1374
|
+
"catalogAccountId": {
|
|
1375
|
+
"type": "string",
|
|
1376
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
|
|
1377
|
+
},
|
|
1146
1378
|
"modelsPath": {
|
|
1147
1379
|
"type": "string",
|
|
1148
1380
|
"pattern": "^[a-zA-Z0-9_/-]+$",
|
|
@@ -1168,6 +1400,9 @@
|
|
|
1168
1400
|
"type": "string",
|
|
1169
1401
|
"maxLength": 8000
|
|
1170
1402
|
},
|
|
1403
|
+
"available": {
|
|
1404
|
+
"type": "boolean"
|
|
1405
|
+
},
|
|
1171
1406
|
"contextWindow": {
|
|
1172
1407
|
"type": "integer",
|
|
1173
1408
|
"exclusiveMinimum": true,
|
|
@@ -1201,6 +1436,15 @@
|
|
|
1201
1436
|
"maxLength": 100
|
|
1202
1437
|
},
|
|
1203
1438
|
"maxItems": 100
|
|
1439
|
+
},
|
|
1440
|
+
"supportedGenerationMethods": {
|
|
1441
|
+
"type": "array",
|
|
1442
|
+
"items": {
|
|
1443
|
+
"type": "string",
|
|
1444
|
+
"minLength": 1,
|
|
1445
|
+
"maxLength": 100
|
|
1446
|
+
},
|
|
1447
|
+
"maxItems": 100
|
|
1204
1448
|
}
|
|
1205
1449
|
},
|
|
1206
1450
|
"required": [
|
|
@@ -1242,7 +1486,8 @@
|
|
|
1242
1486
|
"enum": [
|
|
1243
1487
|
"anthropic-messages",
|
|
1244
1488
|
"openai-responses",
|
|
1245
|
-
"openai-chat"
|
|
1489
|
+
"openai-chat",
|
|
1490
|
+
"gemini-generate-content"
|
|
1246
1491
|
]
|
|
1247
1492
|
},
|
|
1248
1493
|
"credentialEnv": {
|
|
@@ -1253,10 +1498,45 @@
|
|
|
1253
1498
|
"type": "string",
|
|
1254
1499
|
"enum": [
|
|
1255
1500
|
"bearer",
|
|
1256
|
-
"x-api-key"
|
|
1501
|
+
"x-api-key",
|
|
1502
|
+
"api-key"
|
|
1257
1503
|
],
|
|
1258
1504
|
"default": "bearer"
|
|
1259
1505
|
},
|
|
1506
|
+
"catalogBaseUrl": {
|
|
1507
|
+
"type": "string",
|
|
1508
|
+
"maxLength": 2000
|
|
1509
|
+
},
|
|
1510
|
+
"catalogFormat": {
|
|
1511
|
+
"type": "string",
|
|
1512
|
+
"enum": [
|
|
1513
|
+
"openai",
|
|
1514
|
+
"ollama",
|
|
1515
|
+
"mistral",
|
|
1516
|
+
"together",
|
|
1517
|
+
"fireworks",
|
|
1518
|
+
"dashscope",
|
|
1519
|
+
"gemini",
|
|
1520
|
+
"none"
|
|
1521
|
+
]
|
|
1522
|
+
},
|
|
1523
|
+
"catalogAuthStyle": {
|
|
1524
|
+
"type": "string",
|
|
1525
|
+
"enum": [
|
|
1526
|
+
"bearer",
|
|
1527
|
+
"x-api-key",
|
|
1528
|
+
"api-key",
|
|
1529
|
+
"none"
|
|
1530
|
+
]
|
|
1531
|
+
},
|
|
1532
|
+
"catalogCredentialEnv": {
|
|
1533
|
+
"type": "string",
|
|
1534
|
+
"pattern": "^SWITCHER_PROVIDER_[A-Z0-9_]+$"
|
|
1535
|
+
},
|
|
1536
|
+
"catalogAccountId": {
|
|
1537
|
+
"type": "string",
|
|
1538
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
|
|
1539
|
+
},
|
|
1260
1540
|
"modelsPath": {
|
|
1261
1541
|
"type": "string",
|
|
1262
1542
|
"pattern": "^[a-zA-Z0-9_/-]+$",
|
|
@@ -1282,6 +1562,9 @@
|
|
|
1282
1562
|
"type": "string",
|
|
1283
1563
|
"maxLength": 8000
|
|
1284
1564
|
},
|
|
1565
|
+
"available": {
|
|
1566
|
+
"type": "boolean"
|
|
1567
|
+
},
|
|
1285
1568
|
"contextWindow": {
|
|
1286
1569
|
"type": "integer",
|
|
1287
1570
|
"exclusiveMinimum": true,
|
|
@@ -1315,6 +1598,15 @@
|
|
|
1315
1598
|
"maxLength": 100
|
|
1316
1599
|
},
|
|
1317
1600
|
"maxItems": 100
|
|
1601
|
+
},
|
|
1602
|
+
"supportedGenerationMethods": {
|
|
1603
|
+
"type": "array",
|
|
1604
|
+
"items": {
|
|
1605
|
+
"type": "string",
|
|
1606
|
+
"minLength": 1,
|
|
1607
|
+
"maxLength": 100
|
|
1608
|
+
},
|
|
1609
|
+
"maxItems": 100
|
|
1318
1610
|
}
|
|
1319
1611
|
},
|
|
1320
1612
|
"required": [
|
|
@@ -1367,7 +1659,17 @@
|
|
|
1367
1659
|
"claude",
|
|
1368
1660
|
"codex",
|
|
1369
1661
|
"grok",
|
|
1370
|
-
"
|
|
1662
|
+
"opencode",
|
|
1663
|
+
"opencode2",
|
|
1664
|
+
"pi",
|
|
1665
|
+
"omp",
|
|
1666
|
+
"dsh",
|
|
1667
|
+
"cline",
|
|
1668
|
+
"hermes",
|
|
1669
|
+
"prime-agent",
|
|
1670
|
+
"gemini",
|
|
1671
|
+
"aider",
|
|
1672
|
+
"kilo"
|
|
1371
1673
|
]
|
|
1372
1674
|
},
|
|
1373
1675
|
"model": {
|
|
@@ -1407,7 +1709,17 @@
|
|
|
1407
1709
|
"claude",
|
|
1408
1710
|
"codex",
|
|
1409
1711
|
"grok",
|
|
1410
|
-
"
|
|
1712
|
+
"opencode",
|
|
1713
|
+
"opencode2",
|
|
1714
|
+
"pi",
|
|
1715
|
+
"omp",
|
|
1716
|
+
"dsh",
|
|
1717
|
+
"cline",
|
|
1718
|
+
"hermes",
|
|
1719
|
+
"prime-agent",
|
|
1720
|
+
"gemini",
|
|
1721
|
+
"aider",
|
|
1722
|
+
"kilo"
|
|
1411
1723
|
]
|
|
1412
1724
|
},
|
|
1413
1725
|
"model": {
|
|
@@ -1452,6 +1764,9 @@
|
|
|
1452
1764
|
"type": "string",
|
|
1453
1765
|
"maxLength": 8000
|
|
1454
1766
|
},
|
|
1767
|
+
"available": {
|
|
1768
|
+
"type": "boolean"
|
|
1769
|
+
},
|
|
1455
1770
|
"contextWindow": {
|
|
1456
1771
|
"type": "integer",
|
|
1457
1772
|
"exclusiveMinimum": true,
|
|
@@ -1485,6 +1800,15 @@
|
|
|
1485
1800
|
"maxLength": 100
|
|
1486
1801
|
},
|
|
1487
1802
|
"maxItems": 100
|
|
1803
|
+
},
|
|
1804
|
+
"supportedGenerationMethods": {
|
|
1805
|
+
"type": "array",
|
|
1806
|
+
"items": {
|
|
1807
|
+
"type": "string",
|
|
1808
|
+
"minLength": 1,
|
|
1809
|
+
"maxLength": 100
|
|
1810
|
+
},
|
|
1811
|
+
"maxItems": 100
|
|
1488
1812
|
}
|
|
1489
1813
|
},
|
|
1490
1814
|
"required": [
|
|
@@ -1515,6 +1839,9 @@
|
|
|
1515
1839
|
"type": "string",
|
|
1516
1840
|
"maxLength": 8000
|
|
1517
1841
|
},
|
|
1842
|
+
"available": {
|
|
1843
|
+
"type": "boolean"
|
|
1844
|
+
},
|
|
1518
1845
|
"contextWindow": {
|
|
1519
1846
|
"type": "integer",
|
|
1520
1847
|
"exclusiveMinimum": true,
|
|
@@ -1549,6 +1876,15 @@
|
|
|
1549
1876
|
},
|
|
1550
1877
|
"maxItems": 100
|
|
1551
1878
|
},
|
|
1879
|
+
"supportedGenerationMethods": {
|
|
1880
|
+
"type": "array",
|
|
1881
|
+
"items": {
|
|
1882
|
+
"type": "string",
|
|
1883
|
+
"minLength": 1,
|
|
1884
|
+
"maxLength": 100
|
|
1885
|
+
},
|
|
1886
|
+
"maxItems": 100
|
|
1887
|
+
},
|
|
1552
1888
|
"codingEligible": {
|
|
1553
1889
|
"type": "boolean"
|
|
1554
1890
|
}
|
|
@@ -1613,6 +1949,9 @@
|
|
|
1613
1949
|
"type": "string",
|
|
1614
1950
|
"maxLength": 8000
|
|
1615
1951
|
},
|
|
1952
|
+
"available": {
|
|
1953
|
+
"type": "boolean"
|
|
1954
|
+
},
|
|
1616
1955
|
"contextWindow": {
|
|
1617
1956
|
"type": "integer",
|
|
1618
1957
|
"exclusiveMinimum": true,
|
|
@@ -1646,6 +1985,15 @@
|
|
|
1646
1985
|
"maxLength": 100
|
|
1647
1986
|
},
|
|
1648
1987
|
"maxItems": 100
|
|
1988
|
+
},
|
|
1989
|
+
"supportedGenerationMethods": {
|
|
1990
|
+
"type": "array",
|
|
1991
|
+
"items": {
|
|
1992
|
+
"type": "string",
|
|
1993
|
+
"minLength": 1,
|
|
1994
|
+
"maxLength": 100
|
|
1995
|
+
},
|
|
1996
|
+
"maxItems": 100
|
|
1649
1997
|
}
|
|
1650
1998
|
},
|
|
1651
1999
|
"required": [
|
|
@@ -1697,7 +2045,8 @@
|
|
|
1697
2045
|
"enum": [
|
|
1698
2046
|
"anthropic-messages",
|
|
1699
2047
|
"openai-responses",
|
|
1700
|
-
"openai-chat"
|
|
2048
|
+
"openai-chat",
|
|
2049
|
+
"gemini-generate-content"
|
|
1701
2050
|
]
|
|
1702
2051
|
},
|
|
1703
2052
|
"credentialEnv": {
|
|
@@ -1708,10 +2057,45 @@
|
|
|
1708
2057
|
"type": "string",
|
|
1709
2058
|
"enum": [
|
|
1710
2059
|
"bearer",
|
|
1711
|
-
"x-api-key"
|
|
2060
|
+
"x-api-key",
|
|
2061
|
+
"api-key"
|
|
1712
2062
|
],
|
|
1713
2063
|
"default": "bearer"
|
|
1714
2064
|
},
|
|
2065
|
+
"catalogBaseUrl": {
|
|
2066
|
+
"type": "string",
|
|
2067
|
+
"maxLength": 2000
|
|
2068
|
+
},
|
|
2069
|
+
"catalogFormat": {
|
|
2070
|
+
"type": "string",
|
|
2071
|
+
"enum": [
|
|
2072
|
+
"openai",
|
|
2073
|
+
"ollama",
|
|
2074
|
+
"mistral",
|
|
2075
|
+
"together",
|
|
2076
|
+
"fireworks",
|
|
2077
|
+
"dashscope",
|
|
2078
|
+
"gemini",
|
|
2079
|
+
"none"
|
|
2080
|
+
]
|
|
2081
|
+
},
|
|
2082
|
+
"catalogAuthStyle": {
|
|
2083
|
+
"type": "string",
|
|
2084
|
+
"enum": [
|
|
2085
|
+
"bearer",
|
|
2086
|
+
"x-api-key",
|
|
2087
|
+
"api-key",
|
|
2088
|
+
"none"
|
|
2089
|
+
]
|
|
2090
|
+
},
|
|
2091
|
+
"catalogCredentialEnv": {
|
|
2092
|
+
"type": "string",
|
|
2093
|
+
"pattern": "^SWITCHER_PROVIDER_[A-Z0-9_]+$"
|
|
2094
|
+
},
|
|
2095
|
+
"catalogAccountId": {
|
|
2096
|
+
"type": "string",
|
|
2097
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
|
|
2098
|
+
},
|
|
1715
2099
|
"modelsPath": {
|
|
1716
2100
|
"type": "string",
|
|
1717
2101
|
"pattern": "^[a-zA-Z0-9_/-]+$",
|
|
@@ -1737,6 +2121,9 @@
|
|
|
1737
2121
|
"type": "string",
|
|
1738
2122
|
"maxLength": 8000
|
|
1739
2123
|
},
|
|
2124
|
+
"available": {
|
|
2125
|
+
"type": "boolean"
|
|
2126
|
+
},
|
|
1740
2127
|
"contextWindow": {
|
|
1741
2128
|
"type": "integer",
|
|
1742
2129
|
"exclusiveMinimum": true,
|
|
@@ -1770,6 +2157,15 @@
|
|
|
1770
2157
|
"maxLength": 100
|
|
1771
2158
|
},
|
|
1772
2159
|
"maxItems": 100
|
|
2160
|
+
},
|
|
2161
|
+
"supportedGenerationMethods": {
|
|
2162
|
+
"type": "array",
|
|
2163
|
+
"items": {
|
|
2164
|
+
"type": "string",
|
|
2165
|
+
"minLength": 1,
|
|
2166
|
+
"maxLength": 100
|
|
2167
|
+
},
|
|
2168
|
+
"maxItems": 100
|
|
1773
2169
|
}
|
|
1774
2170
|
},
|
|
1775
2171
|
"required": [
|
|
@@ -1822,7 +2218,17 @@
|
|
|
1822
2218
|
"claude",
|
|
1823
2219
|
"codex",
|
|
1824
2220
|
"grok",
|
|
1825
|
-
"
|
|
2221
|
+
"opencode",
|
|
2222
|
+
"opencode2",
|
|
2223
|
+
"pi",
|
|
2224
|
+
"omp",
|
|
2225
|
+
"dsh",
|
|
2226
|
+
"cline",
|
|
2227
|
+
"hermes",
|
|
2228
|
+
"prime-agent",
|
|
2229
|
+
"gemini",
|
|
2230
|
+
"aider",
|
|
2231
|
+
"kilo"
|
|
1826
2232
|
]
|
|
1827
2233
|
},
|
|
1828
2234
|
"model": {
|
|
@@ -1872,6 +2278,9 @@
|
|
|
1872
2278
|
"type": "string",
|
|
1873
2279
|
"maxLength": 8000
|
|
1874
2280
|
},
|
|
2281
|
+
"available": {
|
|
2282
|
+
"type": "boolean"
|
|
2283
|
+
},
|
|
1875
2284
|
"contextWindow": {
|
|
1876
2285
|
"type": "integer",
|
|
1877
2286
|
"exclusiveMinimum": true,
|
|
@@ -1905,6 +2314,15 @@
|
|
|
1905
2314
|
"maxLength": 100
|
|
1906
2315
|
},
|
|
1907
2316
|
"maxItems": 100
|
|
2317
|
+
},
|
|
2318
|
+
"supportedGenerationMethods": {
|
|
2319
|
+
"type": "array",
|
|
2320
|
+
"items": {
|
|
2321
|
+
"type": "string",
|
|
2322
|
+
"minLength": 1,
|
|
2323
|
+
"maxLength": 100
|
|
2324
|
+
},
|
|
2325
|
+
"maxItems": 100
|
|
1908
2326
|
}
|
|
1909
2327
|
},
|
|
1910
2328
|
"required": [
|
|
@@ -1964,7 +2382,17 @@
|
|
|
1964
2382
|
"claude",
|
|
1965
2383
|
"codex",
|
|
1966
2384
|
"grok",
|
|
1967
|
-
"
|
|
2385
|
+
"opencode",
|
|
2386
|
+
"opencode2",
|
|
2387
|
+
"pi",
|
|
2388
|
+
"omp",
|
|
2389
|
+
"dsh",
|
|
2390
|
+
"cline",
|
|
2391
|
+
"hermes",
|
|
2392
|
+
"prime-agent",
|
|
2393
|
+
"gemini",
|
|
2394
|
+
"aider",
|
|
2395
|
+
"kilo"
|
|
1968
2396
|
]
|
|
1969
2397
|
},
|
|
1970
2398
|
"model": {
|
|
@@ -2021,7 +2449,17 @@
|
|
|
2021
2449
|
"claude",
|
|
2022
2450
|
"codex",
|
|
2023
2451
|
"grok",
|
|
2024
|
-
"
|
|
2452
|
+
"opencode",
|
|
2453
|
+
"opencode2",
|
|
2454
|
+
"pi",
|
|
2455
|
+
"omp",
|
|
2456
|
+
"dsh",
|
|
2457
|
+
"cline",
|
|
2458
|
+
"hermes",
|
|
2459
|
+
"prime-agent",
|
|
2460
|
+
"gemini",
|
|
2461
|
+
"aider",
|
|
2462
|
+
"kilo"
|
|
2025
2463
|
]
|
|
2026
2464
|
},
|
|
2027
2465
|
"model": {
|