@jsonstudio/rcc 0.89.1348 → 0.89.1457

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 (102) hide show
  1. package/README.md +51 -1427
  2. package/dist/build-info.js +2 -2
  3. package/dist/cli/commands/config.js +3 -0
  4. package/dist/cli/commands/config.js.map +1 -1
  5. package/dist/cli/commands/init.js +3 -0
  6. package/dist/cli/commands/init.js.map +1 -1
  7. package/dist/cli/config/bundled-docs.js +2 -2
  8. package/dist/cli/config/bundled-docs.js.map +1 -1
  9. package/dist/cli/config/init-config.d.ts +2 -1
  10. package/dist/cli/config/init-config.js +33 -1
  11. package/dist/cli/config/init-config.js.map +1 -1
  12. package/dist/client/gemini/gemini-protocol-client.js +2 -1
  13. package/dist/client/gemini/gemini-protocol-client.js.map +1 -1
  14. package/dist/client/gemini-cli/gemini-cli-protocol-client.js +39 -15
  15. package/dist/client/gemini-cli/gemini-cli-protocol-client.js.map +1 -1
  16. package/dist/client/openai/chat-protocol-client.js +2 -1
  17. package/dist/client/openai/chat-protocol-client.js.map +1 -1
  18. package/dist/client/responses/responses-protocol-client.js +2 -1
  19. package/dist/client/responses/responses-protocol-client.js.map +1 -1
  20. package/dist/error-handling/quiet-error-handling-center.js +46 -8
  21. package/dist/error-handling/quiet-error-handling-center.js.map +1 -1
  22. package/dist/manager/modules/quota/provider-quota-daemon.events.js +4 -2
  23. package/dist/manager/modules/quota/provider-quota-daemon.events.js.map +1 -1
  24. package/dist/manager/modules/quota/provider-quota-daemon.model-backoff.js +9 -6
  25. package/dist/manager/modules/quota/provider-quota-daemon.model-backoff.js.map +1 -1
  26. package/dist/providers/auth/antigravity-userinfo-helper.d.ts +2 -1
  27. package/dist/providers/auth/antigravity-userinfo-helper.js +25 -4
  28. package/dist/providers/auth/antigravity-userinfo-helper.js.map +1 -1
  29. package/dist/providers/auth/tokenfile-auth.d.ts +2 -0
  30. package/dist/providers/auth/tokenfile-auth.js +33 -1
  31. package/dist/providers/auth/tokenfile-auth.js.map +1 -1
  32. package/dist/providers/core/config/camoufox-launcher.d.ts +5 -0
  33. package/dist/providers/core/config/camoufox-launcher.js +5 -0
  34. package/dist/providers/core/config/camoufox-launcher.js.map +1 -1
  35. package/dist/providers/core/config/service-profiles.js +7 -18
  36. package/dist/providers/core/config/service-profiles.js.map +1 -1
  37. package/dist/providers/core/runtime/base-provider.d.ts +0 -5
  38. package/dist/providers/core/runtime/base-provider.js +26 -112
  39. package/dist/providers/core/runtime/base-provider.js.map +1 -1
  40. package/dist/providers/core/runtime/gemini-cli-http-provider.d.ts +7 -0
  41. package/dist/providers/core/runtime/gemini-cli-http-provider.js +362 -93
  42. package/dist/providers/core/runtime/gemini-cli-http-provider.js.map +1 -1
  43. package/dist/providers/core/runtime/http-request-executor.d.ts +3 -0
  44. package/dist/providers/core/runtime/http-request-executor.js +110 -38
  45. package/dist/providers/core/runtime/http-request-executor.js.map +1 -1
  46. package/dist/providers/core/runtime/http-transport-provider.d.ts +3 -0
  47. package/dist/providers/core/runtime/http-transport-provider.js +80 -37
  48. package/dist/providers/core/runtime/http-transport-provider.js.map +1 -1
  49. package/dist/providers/core/runtime/rate-limit-manager.d.ts +1 -12
  50. package/dist/providers/core/runtime/rate-limit-manager.js +4 -77
  51. package/dist/providers/core/runtime/rate-limit-manager.js.map +1 -1
  52. package/dist/providers/core/utils/http-client.js +20 -43
  53. package/dist/providers/core/utils/http-client.js.map +1 -1
  54. package/dist/server/handlers/handler-utils.js +5 -1
  55. package/dist/server/handlers/handler-utils.js.map +1 -1
  56. package/dist/server/handlers/responses-handler.js +1 -1
  57. package/dist/server/handlers/responses-handler.js.map +1 -1
  58. package/dist/server/runtime/http-server/index.js +68 -29
  59. package/dist/server/runtime/http-server/index.js.map +1 -1
  60. package/dist/server/runtime/http-server/request-executor.js +50 -6
  61. package/dist/server/runtime/http-server/request-executor.js.map +1 -1
  62. package/dist/server/runtime/http-server/routes.js +4 -1
  63. package/dist/server/runtime/http-server/routes.js.map +1 -1
  64. package/dist/utils/strip-internal-keys.d.ts +12 -0
  65. package/dist/utils/strip-internal-keys.js +28 -0
  66. package/dist/utils/strip-internal-keys.js.map +1 -0
  67. package/docs/CHAT_PROCESS_PROTOCOL_AND_PIPELINE.md +221 -0
  68. package/docs/antigravity-gemini-format-cleanup.md +102 -0
  69. package/docs/antigravity-routing-contract.md +31 -0
  70. package/docs/chat-semantic-expansion-plan.md +8 -6
  71. package/docs/glm-chat-completions.md +1 -1
  72. package/docs/servertool-framework.md +65 -0
  73. package/docs/v2-architecture/README.md +6 -8
  74. package/docs/verified-configs/README.md +60 -0
  75. package/docs/verified-configs/v0.45.0/README.md +244 -0
  76. package/docs/verified-configs/v0.45.0/lmstudio-5521-gpt-oss-20b-mlx.json +135 -0
  77. package/docs/verified-configs/v0.45.0/merged-config.5521.json +1205 -0
  78. package/docs/verified-configs/v0.45.0/merged-config.qwen-5522.json +1559 -0
  79. package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus-final.json +221 -0
  80. package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus-fixed.json +242 -0
  81. package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus.json +242 -0
  82. package/package.json +17 -11
  83. package/scripts/build-core.mjs +3 -1
  84. package/scripts/ci/repo-sanity.mjs +138 -0
  85. package/scripts/mock-provider/run-regressions.mjs +157 -1
  86. package/scripts/run-bg.sh +0 -14
  87. package/scripts/tests/ci-jest.mjs +119 -0
  88. package/scripts/tools-dev/responses-debug-client/README.md +23 -0
  89. package/scripts/tools-dev/responses-debug-client/payloads/poem.json +13 -0
  90. package/scripts/tools-dev/responses-debug-client/payloads/sample-no-tools.json +98 -0
  91. package/scripts/tools-dev/responses-debug-client/payloads/text.json +13 -0
  92. package/scripts/tools-dev/responses-debug-client/payloads/tool.json +27 -0
  93. package/scripts/tools-dev/responses-debug-client/run.mjs +65 -0
  94. package/scripts/tools-dev/responses-debug-client/src/index.ts +281 -0
  95. package/scripts/tools-dev/run-llmswitch-chat.mjs +53 -0
  96. package/scripts/tools-dev/server-tools-dev/run-web-fetch.mjs +65 -0
  97. package/scripts/vendor-core.mjs +13 -3
  98. package/scripts/test-fc-responses.mjs +0 -66
  99. package/scripts/test-guidance.mjs +0 -100
  100. package/scripts/test-iflow-web-search.mjs +0 -141
  101. package/scripts/test-iflow.mjs +0 -379
  102. package/scripts/test-tool-exec.mjs +0 -26
@@ -0,0 +1,1205 @@
1
+ {
2
+ "modules": {
3
+ "basemodule": {
4
+ "enabled": true,
5
+ "config": {
6
+ "moduleType": "base",
7
+ "debugMode": true,
8
+ "recording": {
9
+ "enabled": false,
10
+ "maxCycles": 1000,
11
+ "maxErrors": 100
12
+ }
13
+ }
14
+ },
15
+ "errorhandling": {
16
+ "enabled": true,
17
+ "config": {
18
+ "moduleType": "error-handling",
19
+ "maxErrors": 1000,
20
+ "errorCategories": {
21
+ "low": "log",
22
+ "medium": "log_and_notify",
23
+ "high": "log_and_alert",
24
+ "critical": "log_and_immediate"
25
+ },
26
+ "autoCleanup": {
27
+ "enabled": true,
28
+ "maxAgeHours": 24
29
+ }
30
+ }
31
+ },
32
+ "debugcenter": {
33
+ "enabled": true,
34
+ "config": {
35
+ "moduleType": "debug-center",
36
+ "eventQueueSize": 1000,
37
+ "logLevels": [
38
+ "info",
39
+ "warn",
40
+ "error"
41
+ ],
42
+ "enableConsole": true,
43
+ "enableFile": true,
44
+ "filePath": "~/.routecodex/logs/debug-center.log",
45
+ "maxFileSize": "10MB",
46
+ "maxFiles": 5,
47
+ "enableRotation": true
48
+ }
49
+ },
50
+ "httpserver": {
51
+ "enabled": true,
52
+ "config": {
53
+ "moduleType": "http-server",
54
+ "host": "localhost",
55
+ "cors": {
56
+ "origin": "*",
57
+ "credentials": true
58
+ },
59
+ "timeout": 30000,
60
+ "bodyLimit": "10mb",
61
+ "enableMetrics": true,
62
+ "enableHealthChecks": true,
63
+ "logging": {
64
+ "level": "info",
65
+ "enableConsole": true,
66
+ "enableFile": true,
67
+ "filePath": "~/.routecodex/logs/server/http-server.log",
68
+ "categories": [
69
+ "server",
70
+ "api",
71
+ "request",
72
+ "config",
73
+ "error",
74
+ "message"
75
+ ]
76
+ }
77
+ }
78
+ },
79
+ "configmanager": {
80
+ "enabled": true,
81
+ "config": {
82
+ "moduleType": "config-manager",
83
+ "configPath": "./routecodex.json",
84
+ "watchMode": true,
85
+ "validation": {
86
+ "strict": true,
87
+ "allowUnknown": false
88
+ }
89
+ }
90
+ },
91
+ "providermanager": {
92
+ "enabled": true,
93
+ "config": {
94
+ "moduleType": "provider-manager",
95
+ "healthCheckInterval": 30000,
96
+ "maxRetries": 3,
97
+ "retryDelay": 1000,
98
+ "loadBalancing": {
99
+ "strategy": "round-robin",
100
+ "stickySessions": false
101
+ }
102
+ }
103
+ },
104
+ "requesthandler": {
105
+ "enabled": true,
106
+ "config": {
107
+ "moduleType": "request-handler",
108
+ "maxRequestSize": 10485760,
109
+ "enableStreaming": true,
110
+ "rateLimitEnabled": false,
111
+ "authEnabled": false,
112
+ "validateRequests": true
113
+ }
114
+ },
115
+ "responsehandler": {
116
+ "enabled": true,
117
+ "config": {
118
+ "moduleType": "response-handler",
119
+ "enableCompression": true,
120
+ "enableCaching": false,
121
+ "cacheTTL": 300
122
+ }
123
+ },
124
+ "openairouter": {
125
+ "enabled": true,
126
+ "config": {
127
+ "moduleType": "openai-router",
128
+ "basePath": "/v1/openai",
129
+ "enableStreaming": true,
130
+ "enablePipeline": true,
131
+ "rateLimit": {
132
+ "enabled": false,
133
+ "requestsPerMinute": 60
134
+ }
135
+ }
136
+ },
137
+ "unimplementedmodule": {
138
+ "enabled": true,
139
+ "config": {
140
+ "moduleType": "unimplemented-module",
141
+ "maxCallerHistory": 100,
142
+ "enableStats": true,
143
+ "notificationThreshold": 10
144
+ }
145
+ },
146
+ "usermanager": {
147
+ "enabled": true,
148
+ "config": {
149
+ "moduleType": "user-manager",
150
+ "configPath": "./config/users.json",
151
+ "authMethod": "jwt",
152
+ "sessionTimeout": 3600000,
153
+ "enableUserRegistration": false,
154
+ "requireEmailVerification": false,
155
+ "defaultUserQuotas": {
156
+ "maxRequestsPerDay": 1000,
157
+ "maxTokensPerRequest": 4096,
158
+ "maxConcurrentRequests": 5,
159
+ "maxProviders": 3,
160
+ "maxFiles": 100,
161
+ "maxStorageMB": 1024
162
+ },
163
+ "maxUsers": 100,
164
+ "enablePasswordPolicy": true,
165
+ "passwordPolicy": {
166
+ "minLength": 8,
167
+ "requireUppercase": true,
168
+ "requireLowercase": true,
169
+ "requireNumbers": true,
170
+ "requireSpecialChars": false
171
+ }
172
+ }
173
+ },
174
+ "virtualrouter": {
175
+ "enabled": true,
176
+ "config": {
177
+ "moduleType": "virtual-router",
178
+ "enableClassification": true,
179
+ "classificationConfig": {
180
+ "confidenceThreshold": 60,
181
+ "enableSmartRouting": true,
182
+ "protocolMapping": {
183
+ "openai": {
184
+ "endpoints": [
185
+ "/v1/chat/completions",
186
+ "/v1/completions"
187
+ ],
188
+ "messageField": "messages",
189
+ "modelField": "model",
190
+ "toolsField": "tools",
191
+ "maxTokensField": "max_tokens"
192
+ },
193
+ "anthropic": {
194
+ "endpoints": [
195
+ "/v1/messages",
196
+ "/v1/anthropic/messages"
197
+ ],
198
+ "messageField": "messages",
199
+ "modelField": "model",
200
+ "toolsField": "tools",
201
+ "maxTokensField": "max_tokens"
202
+ }
203
+ },
204
+ "modelTiers": {
205
+ "basic": {
206
+ "description": "Basic models for simple tasks",
207
+ "models": [
208
+ "gpt-3.5-turbo",
209
+ "claude-3-haiku"
210
+ ],
211
+ "maxTokens": 16384,
212
+ "supportedFeatures": [
213
+ "text_generation",
214
+ "conversation"
215
+ ]
216
+ },
217
+ "advanced": {
218
+ "description": "Advanced models for complex tasks",
219
+ "models": [
220
+ "gpt-5",
221
+ "claude-3-opus",
222
+ "qwen-max"
223
+ ],
224
+ "maxTokens": 262144,
225
+ "supportedFeatures": [
226
+ "text_generation",
227
+ "reasoning",
228
+ "coding",
229
+ "tool_use"
230
+ ]
231
+ }
232
+ },
233
+ "routingDecisions": {
234
+ "default": {
235
+ "description": "Default routing for general requests",
236
+ "modelTier": "basic",
237
+ "tokenThreshold": 8000,
238
+ "toolTypes": [],
239
+ "priority": 1
240
+ },
241
+ "longContext": {
242
+ "description": "Routing for long context requests",
243
+ "modelTier": "advanced",
244
+ "tokenThreshold": 10000,
245
+ "toolTypes": [],
246
+ "priority": 90
247
+ },
248
+ "thinking": {
249
+ "description": "Routing for complex reasoning requests",
250
+ "modelTier": "advanced",
251
+ "tokenThreshold": 16000,
252
+ "toolTypes": [
253
+ "dataAnalysis",
254
+ "complex_reasoning"
255
+ ],
256
+ "priority": 85
257
+ },
258
+ "coding": {
259
+ "description": "Routing for code generation requests",
260
+ "modelTier": "advanced",
261
+ "tokenThreshold": 24000,
262
+ "toolTypes": [
263
+ "codeExecution",
264
+ "fileSearch"
265
+ ],
266
+ "priority": 80
267
+ },
268
+ "webSearch": {
269
+ "description": "Routing for web search requests",
270
+ "modelTier": "advanced",
271
+ "tokenThreshold": 12000,
272
+ "toolTypes": [
273
+ "webSearch"
274
+ ],
275
+ "priority": 95
276
+ }
277
+ },
278
+ "protocolHandlers": {
279
+ "openai": {
280
+ "tokenCalculator": {
281
+ "type": "openai",
282
+ "tokenRatio": 0.25,
283
+ "toolOverhead": 50,
284
+ "messageOverhead": 10,
285
+ "imageTokenDefault": 255
286
+ },
287
+ "toolDetector": {
288
+ "type": "pattern",
289
+ "patterns": {
290
+ "webSearch": [
291
+ "web_search",
292
+ "search",
293
+ "browse",
294
+ "internet"
295
+ ],
296
+ "codeExecution": [
297
+ "code",
298
+ "execute",
299
+ "bash",
300
+ "python",
301
+ "javascript"
302
+ ],
303
+ "fileSearch": [
304
+ "file",
305
+ "read",
306
+ "write",
307
+ "document",
308
+ "pdf"
309
+ ],
310
+ "dataAnalysis": [
311
+ "data",
312
+ "analysis",
313
+ "chart",
314
+ "graph",
315
+ "statistics"
316
+ ]
317
+ }
318
+ }
319
+ },
320
+ "anthropic": {
321
+ "tokenCalculator": {
322
+ "type": "anthropic",
323
+ "tokenRatio": 0.25,
324
+ "toolOverhead": 50,
325
+ "messageOverhead": 10
326
+ },
327
+ "toolDetector": {
328
+ "type": "pattern",
329
+ "patterns": {
330
+ "webSearch": [
331
+ "web_search",
332
+ "search",
333
+ "browse"
334
+ ],
335
+ "codeExecution": [
336
+ "code",
337
+ "execute",
338
+ "bash",
339
+ "python"
340
+ ],
341
+ "fileSearch": [
342
+ "file",
343
+ "read",
344
+ "write"
345
+ ],
346
+ "dataAnalysis": [
347
+ "data",
348
+ "analysis",
349
+ "chart"
350
+ ]
351
+ }
352
+ }
353
+ }
354
+ },
355
+ "inputModelWeights": {
356
+ "qwen3-coder": {
357
+ "weight": 8.5,
358
+ "description": "Qwen3代码模型,高复杂度",
359
+ "routeMapping": {
360
+ "default": 0.4,
361
+ "longContext": 0.3,
362
+ "thinking": 0.7,
363
+ "coding": 0.9,
364
+ "webSearch": 0.2
365
+ }
366
+ },
367
+ "qwen3": {
368
+ "weight": 7,
369
+ "description": "Qwen3通用模型,中高复杂度",
370
+ "routeMapping": {
371
+ "default": 0.6,
372
+ "longContext": 0.7,
373
+ "thinking": 0.8,
374
+ "coding": 0.6,
375
+ "webSearch": 0.5
376
+ }
377
+ },
378
+ "qwen": {
379
+ "weight": 6,
380
+ "description": "Qwen模型,中等复杂度",
381
+ "routeMapping": {
382
+ "default": 0.8,
383
+ "longContext": 0.6,
384
+ "thinking": 0.5,
385
+ "coding": 0.4,
386
+ "webSearch": 0.6
387
+ }
388
+ },
389
+ "gpt-4": {
390
+ "weight": 9,
391
+ "description": "GPT-4模型,极高复杂度",
392
+ "routeMapping": {
393
+ "default": 0.3,
394
+ "longContext": 0.8,
395
+ "thinking": 0.9,
396
+ "coding": 0.8,
397
+ "webSearch": 0.7
398
+ }
399
+ },
400
+ "claude": {
401
+ "weight": 8.5,
402
+ "description": "Claude模型,高复杂度",
403
+ "routeMapping": {
404
+ "default": 0.4,
405
+ "longContext": 0.8,
406
+ "thinking": 0.9,
407
+ "coding": 0.7,
408
+ "webSearch": 0.6
409
+ }
410
+ },
411
+ "code": {
412
+ "weight": 7.5,
413
+ "description": "代码专用模型,高复杂度",
414
+ "routeMapping": {
415
+ "default": 0.5,
416
+ "longContext": 0.4,
417
+ "thinking": 0.6,
418
+ "coding": 0.95,
419
+ "webSearch": 0.3
420
+ }
421
+ },
422
+ "thinking": {
423
+ "weight": 8,
424
+ "description": "思考模型,高复杂度",
425
+ "routeMapping": {
426
+ "default": 0.4,
427
+ "longContext": 0.7,
428
+ "thinking": 0.95,
429
+ "coding": 0.6,
430
+ "webSearch": 0.5
431
+ }
432
+ }
433
+ },
434
+ "routeThresholds": {
435
+ "default": {
436
+ "minWeight": 0,
437
+ "description": "默认路由,适合简单任务"
438
+ },
439
+ "longContext": {
440
+ "minWeight": 6,
441
+ "description": "长上下文路由,需要模型支持长文本"
442
+ },
443
+ "thinking": {
444
+ "minWeight": 7,
445
+ "description": "复杂推理路由,需要模型有推理能力"
446
+ },
447
+ "coding": {
448
+ "minWeight": 7,
449
+ "description": "代码生成路由,需要模型有编程能力"
450
+ },
451
+ "webSearch": {
452
+ "minWeight": 6,
453
+ "description": "网络搜索路由,需要模型有搜索能力"
454
+ }
455
+ }
456
+ }
457
+ }
458
+ },
459
+ "dryrunengine": {
460
+ "enabled": true,
461
+ "config": {
462
+ "moduleType": "dry-run-engine",
463
+ "requestPipeline": {
464
+ "dryRunMode": "partial",
465
+ "nodeConfigs": {
466
+ "llm-switch": {
467
+ "enabled": true,
468
+ "mode": "output-validation",
469
+ "breakpointBehavior": "continue",
470
+ "verbosity": "normal"
471
+ },
472
+ "compatibility": {
473
+ "enabled": false,
474
+ "mode": "output-validation",
475
+ "breakpointBehavior": "continue",
476
+ "verbosity": "minimal"
477
+ },
478
+ "provider": {
479
+ "enabled": false,
480
+ "mode": "output-validation",
481
+ "breakpointBehavior": "continue",
482
+ "verbosity": "minimal"
483
+ }
484
+ },
485
+ "inputSimulation": {
486
+ "enabled": true,
487
+ "primaryStrategy": "historical-data",
488
+ "fallbackStrategies": [
489
+ "schema-inference",
490
+ "rule-based",
491
+ "ai-generation",
492
+ "request-propagation"
493
+ ],
494
+ "qualityRequirement": "medium",
495
+ "useHistoricalData": true,
496
+ "enableSmartInference": true
497
+ }
498
+ },
499
+ "responsePipeline": {
500
+ "dryRunMode": "partial",
501
+ "responseDryRun": {
502
+ "enabled": true,
503
+ "inputSource": "real-response",
504
+ "performanceAnalysis": true,
505
+ "caching": {
506
+ "enabled": true,
507
+ "maxSize": 100,
508
+ "ttlMs": 300000,
509
+ "keyStrategy": "request-id"
510
+ }
511
+ },
512
+ "nodeConfigs": {
513
+ "response-processor": {
514
+ "enabled": true,
515
+ "mode": "output-validation",
516
+ "breakpointBehavior": "continue",
517
+ "verbosity": "normal"
518
+ }
519
+ }
520
+ },
521
+ "driverFeedback": {
522
+ "enabled": true,
523
+ "feedbackDelayMs": 100,
524
+ "analysisLevel": "detailed"
525
+ }
526
+ }
527
+ }
528
+ },
529
+ "virtualrouter": {
530
+ "providers": {
531
+ "lmstudio": {
532
+ "apiKey": [
533
+ "lm-studio-api-key-1234567890abcdef"
534
+ ],
535
+ "baseURL": "http://localhost:1234",
536
+ "compatibility": {
537
+ "config": {},
538
+ "type": "passthrough-compatibility"
539
+ },
540
+ "enabled": true,
541
+ "id": "lmstudio",
542
+ "keyAliases": [
543
+ "key1"
544
+ ],
545
+ "models": {
546
+ "gpt-oss-20b-mlx": {
547
+ "compatibility": {
548
+ "config": {
549
+ "streamingEnabled": true,
550
+ "toolsEnabled": true
551
+ },
552
+ "type": "passthrough-compatibility"
553
+ },
554
+ "maxContext": 262144,
555
+ "maxTokens": 8192,
556
+ "supportsStreaming": true,
557
+ "supportsTools": true,
558
+ "temperature": 0.7
559
+ }
560
+ },
561
+ "type": "lmstudio"
562
+ }
563
+ },
564
+ "routing": {
565
+ "anthropic": [
566
+ "lmstudio.gpt-oss-20b-mlx"
567
+ ],
568
+ "background": [
569
+ "lmstudio.gpt-oss-20b-mlx"
570
+ ],
571
+ "coding": [
572
+ "lmstudio.gpt-oss-20b-mlx"
573
+ ],
574
+ "default": [
575
+ "lmstudio.gpt-oss-20b-mlx"
576
+ ],
577
+ "longcontext": [
578
+ "lmstudio.gpt-oss-20b-mlx"
579
+ ],
580
+ "thinking": [
581
+ "lmstudio.gpt-oss-20b-mlx"
582
+ ],
583
+ "tools": [
584
+ "lmstudio.gpt-oss-20b-mlx"
585
+ ],
586
+ "vision": [
587
+ "lmstudio.gpt-oss-20b-mlx"
588
+ ],
589
+ "websearch": [
590
+ "lmstudio.gpt-oss-20b-mlx"
591
+ ]
592
+ },
593
+ "dryRun": {
594
+ "enabled": false,
595
+ "includeHealthStatus": false,
596
+ "includeLoadBalancerDetails": false,
597
+ "includeWeightCalculation": false,
598
+ "simulateProviderHealth": false
599
+ },
600
+ "inputProtocol": "openai",
601
+ "llmSwitch": {
602
+ "config": {
603
+ "defaultProtocol": "openai",
604
+ "endpointMapping": {
605
+ "anthropic": [
606
+ "/v1/anthropic/messages",
607
+ "/v1/messages"
608
+ ],
609
+ "openai": [
610
+ "/v1/chat/completions",
611
+ "/v1/completions"
612
+ ]
613
+ },
614
+ "protocolDetection": "endpoint-based"
615
+ },
616
+ "type": "llmswitch-unified"
617
+ },
618
+ "outputProtocol": "openai"
619
+ },
620
+ "host": "0.0.0.0",
621
+ "pipelineConfigs": {
622
+ "endpoint-based": {
623
+ "/v1/chat/completions": {
624
+ "workflow": {
625
+ "config": {
626
+ "enableStreaming": true,
627
+ "reasoningPolicy": {
628
+ "openai": {
629
+ "disposition": "keep"
630
+ }
631
+ }
632
+ },
633
+ "enabled": true,
634
+ "type": "streaming-control"
635
+ }
636
+ },
637
+ "/v1/messages": {
638
+ "llmSwitch": {
639
+ "config": {},
640
+ "type": "llmswitch-anthropic-openai"
641
+ },
642
+ "workflow": {
643
+ "config": {
644
+ "enableStreaming": true,
645
+ "reasoningPolicy": {
646
+ "anthropic": {
647
+ "disposition": "drop",
648
+ "strict": true
649
+ }
650
+ }
651
+ },
652
+ "enabled": true,
653
+ "type": "streaming-control"
654
+ }
655
+ }
656
+ },
657
+ "lmstudio.gpt-oss-20b-mlx": {
658
+ "compatibility": {
659
+ "config": {
660
+ "streamingEnabled": true,
661
+ "toolsEnabled": true
662
+ },
663
+ "enabled": true,
664
+ "type": "passthrough-compatibility"
665
+ },
666
+ "llmSwitch": {
667
+ "config": {},
668
+ "enabled": true,
669
+ "type": "llmswitch-unified"
670
+ }
671
+ }
672
+ },
673
+ "port": 5521,
674
+ "schemaVersion": "1.0.0",
675
+ "stableSorting": {
676
+ "enabled": true,
677
+ "sortKeyMappings": true,
678
+ "sortProviders": true,
679
+ "sortRouting": true
680
+ },
681
+ "version": "1.0.0",
682
+ "compatibilityConfig": {
683
+ "originalConfig": {
684
+ "version": "1.0.0",
685
+ "port": 5521,
686
+ "host": "0.0.0.0",
687
+ "virtualrouter": {
688
+ "inputProtocol": "openai",
689
+ "outputProtocol": "openai",
690
+ "providers": {
691
+ "lmstudio": {
692
+ "id": "lmstudio",
693
+ "type": "lmstudio",
694
+ "enabled": true,
695
+ "baseURL": "http://localhost:1234",
696
+ "apiKey": [
697
+ "lm-studio-api-key-1234567890abcdef"
698
+ ],
699
+ "models": {
700
+ "gpt-oss-20b-mlx": {
701
+ "maxContext": 262144,
702
+ "maxTokens": 8192,
703
+ "temperature": 0.7,
704
+ "supportsStreaming": true,
705
+ "supportsTools": true,
706
+ "compatibility": {
707
+ "type": "passthrough-compatibility",
708
+ "config": {
709
+ "toolsEnabled": true,
710
+ "streamingEnabled": true
711
+ }
712
+ }
713
+ }
714
+ },
715
+ "compatibility": {
716
+ "type": "passthrough-compatibility",
717
+ "config": {}
718
+ }
719
+ }
720
+ },
721
+ "routing": {
722
+ "default": [
723
+ "lmstudio.gpt-oss-20b-mlx"
724
+ ],
725
+ "anthropic": [
726
+ "lmstudio.gpt-oss-20b-mlx"
727
+ ],
728
+ "background": [
729
+ "lmstudio.gpt-oss-20b-mlx"
730
+ ],
731
+ "coding": [
732
+ "lmstudio.gpt-oss-20b-mlx"
733
+ ],
734
+ "longcontext": [
735
+ "lmstudio.gpt-oss-20b-mlx"
736
+ ],
737
+ "thinking": [
738
+ "lmstudio.gpt-oss-20b-mlx"
739
+ ],
740
+ "tools": [
741
+ "lmstudio.gpt-oss-20b-mlx"
742
+ ],
743
+ "vision": [
744
+ "lmstudio.gpt-oss-20b-mlx"
745
+ ],
746
+ "websearch": [
747
+ "lmstudio.gpt-oss-20b-mlx"
748
+ ]
749
+ },
750
+ "dryRun": {
751
+ "enabled": false,
752
+ "includeLoadBalancerDetails": false,
753
+ "includeHealthStatus": false,
754
+ "includeWeightCalculation": false,
755
+ "simulateProviderHealth": false
756
+ },
757
+ "llmSwitch": {
758
+ "type": "llmswitch-unified",
759
+ "config": {
760
+ "protocolDetection": "endpoint-based",
761
+ "defaultProtocol": "openai",
762
+ "endpointMapping": {
763
+ "anthropic": [
764
+ "/v1/anthropic/messages",
765
+ "/v1/messages"
766
+ ],
767
+ "openai": [
768
+ "/v1/chat/completions",
769
+ "/v1/completions"
770
+ ]
771
+ }
772
+ }
773
+ }
774
+ },
775
+ "pipelineConfigs": {
776
+ "lmstudio.gpt-oss-20b-mlx": {
777
+ "llmSwitch": {
778
+ "type": "llmswitch-unified",
779
+ "enabled": true,
780
+ "config": {}
781
+ },
782
+ "compatibility": {
783
+ "type": "passthrough-compatibility",
784
+ "enabled": true,
785
+ "config": {
786
+ "toolsEnabled": true,
787
+ "streamingEnabled": true
788
+ }
789
+ }
790
+ },
791
+ "endpoint-based": {
792
+ "/v1/messages": {
793
+ "llmSwitch": {
794
+ "type": "llmswitch-anthropic-openai",
795
+ "config": {}
796
+ },
797
+ "workflow": {
798
+ "type": "streaming-control",
799
+ "enabled": true,
800
+ "config": {
801
+ "enableStreaming": true,
802
+ "reasoningPolicy": {
803
+ "anthropic": {
804
+ "disposition": "drop",
805
+ "strict": true
806
+ }
807
+ }
808
+ }
809
+ }
810
+ },
811
+ "/v1/chat/completions": {
812
+ "workflow": {
813
+ "type": "streaming-control",
814
+ "enabled": true,
815
+ "config": {
816
+ "enableStreaming": true,
817
+ "reasoningPolicy": {
818
+ "openai": {
819
+ "disposition": "keep"
820
+ }
821
+ }
822
+ }
823
+ }
824
+ }
825
+ }
826
+ },
827
+ "schemaVersion": "2.0.0",
828
+ "stableSorting": {
829
+ "enabled": true,
830
+ "sortProviders": true,
831
+ "sortRouting": true,
832
+ "sortKeyMappings": true
833
+ }
834
+ },
835
+ "normalizedConfig": {
836
+ "virtualrouter": {
837
+ "providers": {
838
+ "lmstudio": {
839
+ "apiKey": [
840
+ "lm-studio-api-key-1234567890abcdef"
841
+ ],
842
+ "baseURL": "http://localhost:1234",
843
+ "compatibility": {
844
+ "config": {},
845
+ "type": "passthrough-compatibility"
846
+ },
847
+ "enabled": true,
848
+ "id": "lmstudio",
849
+ "keyAliases": [
850
+ "key1"
851
+ ],
852
+ "models": {
853
+ "gpt-oss-20b-mlx": {
854
+ "compatibility": {
855
+ "config": {
856
+ "streamingEnabled": true,
857
+ "toolsEnabled": true
858
+ },
859
+ "type": "passthrough-compatibility"
860
+ },
861
+ "maxContext": 262144,
862
+ "maxTokens": 8192,
863
+ "supportsStreaming": true,
864
+ "supportsTools": true,
865
+ "temperature": 0.7
866
+ }
867
+ },
868
+ "type": "lmstudio"
869
+ }
870
+ },
871
+ "routing": {
872
+ "anthropic": [
873
+ "lmstudio.gpt-oss-20b-mlx"
874
+ ],
875
+ "background": [
876
+ "lmstudio.gpt-oss-20b-mlx"
877
+ ],
878
+ "coding": [
879
+ "lmstudio.gpt-oss-20b-mlx"
880
+ ],
881
+ "default": [
882
+ "lmstudio.gpt-oss-20b-mlx"
883
+ ],
884
+ "longcontext": [
885
+ "lmstudio.gpt-oss-20b-mlx"
886
+ ],
887
+ "thinking": [
888
+ "lmstudio.gpt-oss-20b-mlx"
889
+ ],
890
+ "tools": [
891
+ "lmstudio.gpt-oss-20b-mlx"
892
+ ],
893
+ "vision": [
894
+ "lmstudio.gpt-oss-20b-mlx"
895
+ ],
896
+ "websearch": [
897
+ "lmstudio.gpt-oss-20b-mlx"
898
+ ]
899
+ },
900
+ "dryRun": {
901
+ "enabled": false,
902
+ "includeHealthStatus": false,
903
+ "includeLoadBalancerDetails": false,
904
+ "includeWeightCalculation": false,
905
+ "simulateProviderHealth": false
906
+ },
907
+ "inputProtocol": "openai",
908
+ "llmSwitch": {
909
+ "config": {
910
+ "defaultProtocol": "openai",
911
+ "endpointMapping": {
912
+ "anthropic": [
913
+ "/v1/anthropic/messages",
914
+ "/v1/messages"
915
+ ],
916
+ "openai": [
917
+ "/v1/chat/completions",
918
+ "/v1/completions"
919
+ ]
920
+ },
921
+ "protocolDetection": "endpoint-based"
922
+ },
923
+ "type": "llmswitch-unified"
924
+ },
925
+ "outputProtocol": "openai"
926
+ },
927
+ "host": "0.0.0.0",
928
+ "pipelineConfigs": {
929
+ "endpoint-based": {
930
+ "/v1/chat/completions": {
931
+ "workflow": {
932
+ "config": {
933
+ "enableStreaming": true,
934
+ "reasoningPolicy": {
935
+ "openai": {
936
+ "disposition": "keep"
937
+ }
938
+ }
939
+ },
940
+ "enabled": true,
941
+ "type": "streaming-control"
942
+ }
943
+ },
944
+ "/v1/messages": {
945
+ "llmSwitch": {
946
+ "config": {},
947
+ "type": "llmswitch-anthropic-openai"
948
+ },
949
+ "workflow": {
950
+ "config": {
951
+ "enableStreaming": true,
952
+ "reasoningPolicy": {
953
+ "anthropic": {
954
+ "disposition": "drop",
955
+ "strict": true
956
+ }
957
+ }
958
+ },
959
+ "enabled": true,
960
+ "type": "streaming-control"
961
+ }
962
+ }
963
+ },
964
+ "lmstudio.gpt-oss-20b-mlx": {
965
+ "compatibility": {
966
+ "config": {
967
+ "streamingEnabled": true,
968
+ "toolsEnabled": true
969
+ },
970
+ "enabled": true,
971
+ "type": "passthrough-compatibility"
972
+ },
973
+ "llmSwitch": {
974
+ "config": {},
975
+ "enabled": true,
976
+ "type": "llmswitch-unified"
977
+ }
978
+ }
979
+ },
980
+ "port": 5521,
981
+ "schemaVersion": "2.0.0",
982
+ "stableSorting": {
983
+ "enabled": true,
984
+ "sortKeyMappings": true,
985
+ "sortProviders": true,
986
+ "sortRouting": true
987
+ },
988
+ "version": "1.0.0"
989
+ },
990
+ "keyMappings": {
991
+ "global": {
992
+ "key1": "lm-studio-api-key-1234567890abcdef"
993
+ },
994
+ "oauth": {},
995
+ "providers": {
996
+ "lmstudio": {
997
+ "key1": "lm-studio-api-key-1234567890abcdef"
998
+ }
999
+ }
1000
+ },
1001
+ "authMappings": {
1002
+ "authFiles": {},
1003
+ "oauthTokens": {},
1004
+ "oauthConfigs": {}
1005
+ },
1006
+ "routeTargets": {
1007
+ "anthropic": [
1008
+ [
1009
+ {
1010
+ "providerId": "lmstudio",
1011
+ "modelId": "gpt-oss-20b-mlx",
1012
+ "keyId": "key1",
1013
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1014
+ "inputProtocol": "openai",
1015
+ "outputProtocol": "openai"
1016
+ }
1017
+ ]
1018
+ ],
1019
+ "background": [
1020
+ [
1021
+ {
1022
+ "providerId": "lmstudio",
1023
+ "modelId": "gpt-oss-20b-mlx",
1024
+ "keyId": "key1",
1025
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1026
+ "inputProtocol": "openai",
1027
+ "outputProtocol": "openai"
1028
+ }
1029
+ ]
1030
+ ],
1031
+ "coding": [
1032
+ [
1033
+ {
1034
+ "providerId": "lmstudio",
1035
+ "modelId": "gpt-oss-20b-mlx",
1036
+ "keyId": "key1",
1037
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1038
+ "inputProtocol": "openai",
1039
+ "outputProtocol": "openai"
1040
+ }
1041
+ ]
1042
+ ],
1043
+ "default": [
1044
+ [
1045
+ {
1046
+ "providerId": "lmstudio",
1047
+ "modelId": "gpt-oss-20b-mlx",
1048
+ "keyId": "key1",
1049
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1050
+ "inputProtocol": "openai",
1051
+ "outputProtocol": "openai"
1052
+ }
1053
+ ]
1054
+ ],
1055
+ "longcontext": [
1056
+ [
1057
+ {
1058
+ "providerId": "lmstudio",
1059
+ "modelId": "gpt-oss-20b-mlx",
1060
+ "keyId": "key1",
1061
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1062
+ "inputProtocol": "openai",
1063
+ "outputProtocol": "openai"
1064
+ }
1065
+ ]
1066
+ ],
1067
+ "thinking": [
1068
+ [
1069
+ {
1070
+ "providerId": "lmstudio",
1071
+ "modelId": "gpt-oss-20b-mlx",
1072
+ "keyId": "key1",
1073
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1074
+ "inputProtocol": "openai",
1075
+ "outputProtocol": "openai"
1076
+ }
1077
+ ]
1078
+ ],
1079
+ "tools": [
1080
+ [
1081
+ {
1082
+ "providerId": "lmstudio",
1083
+ "modelId": "gpt-oss-20b-mlx",
1084
+ "keyId": "key1",
1085
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1086
+ "inputProtocol": "openai",
1087
+ "outputProtocol": "openai"
1088
+ }
1089
+ ]
1090
+ ],
1091
+ "vision": [
1092
+ [
1093
+ {
1094
+ "providerId": "lmstudio",
1095
+ "modelId": "gpt-oss-20b-mlx",
1096
+ "keyId": "key1",
1097
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1098
+ "inputProtocol": "openai",
1099
+ "outputProtocol": "openai"
1100
+ }
1101
+ ]
1102
+ ],
1103
+ "websearch": [
1104
+ [
1105
+ {
1106
+ "providerId": "lmstudio",
1107
+ "modelId": "gpt-oss-20b-mlx",
1108
+ "keyId": "key1",
1109
+ "actualKey": "lm-studio-api-key-1234567890abcdef",
1110
+ "inputProtocol": "openai",
1111
+ "outputProtocol": "openai"
1112
+ }
1113
+ ]
1114
+ ]
1115
+ },
1116
+ "pipelineConfigs": {},
1117
+ "moduleConfigs": {
1118
+ "virtualrouter": {
1119
+ "enabled": true,
1120
+ "config": {
1121
+ "moduleType": "virtual-router",
1122
+ "inputProtocol": "openai",
1123
+ "outputProtocol": "openai"
1124
+ }
1125
+ },
1126
+ "httpserver": {
1127
+ "enabled": true,
1128
+ "config": {
1129
+ "port": 5521
1130
+ }
1131
+ },
1132
+ "pipelineConfigs": {
1133
+ "enabled": true,
1134
+ "config": {
1135
+ "endpoint-based": {
1136
+ "/v1/chat/completions": {
1137
+ "workflow": {
1138
+ "config": {
1139
+ "enableStreaming": true,
1140
+ "reasoningPolicy": {
1141
+ "openai": {
1142
+ "disposition": "keep"
1143
+ }
1144
+ }
1145
+ },
1146
+ "enabled": true,
1147
+ "type": "streaming-control"
1148
+ }
1149
+ },
1150
+ "/v1/messages": {
1151
+ "llmSwitch": {
1152
+ "config": {},
1153
+ "type": "llmswitch-anthropic-openai"
1154
+ },
1155
+ "workflow": {
1156
+ "config": {
1157
+ "enableStreaming": true,
1158
+ "reasoningPolicy": {
1159
+ "anthropic": {
1160
+ "disposition": "drop",
1161
+ "strict": true
1162
+ }
1163
+ }
1164
+ },
1165
+ "enabled": true,
1166
+ "type": "streaming-control"
1167
+ }
1168
+ }
1169
+ },
1170
+ "lmstudio.gpt-oss-20b-mlx": {
1171
+ "compatibility": {
1172
+ "config": {
1173
+ "streamingEnabled": true,
1174
+ "toolsEnabled": true
1175
+ },
1176
+ "enabled": true,
1177
+ "type": "passthrough-compatibility"
1178
+ },
1179
+ "llmSwitch": {
1180
+ "config": {},
1181
+ "enabled": true,
1182
+ "type": "llmswitch-unified"
1183
+ }
1184
+ }
1185
+ }
1186
+ },
1187
+ "stableSorting": {
1188
+ "enabled": true,
1189
+ "config": {
1190
+ "enabled": true,
1191
+ "sortKeyMappings": true,
1192
+ "sortProviders": true,
1193
+ "sortRouting": true
1194
+ }
1195
+ }
1196
+ }
1197
+ },
1198
+ "_metadata": {
1199
+ "version": "2.0.0",
1200
+ "engine": "routecodex-config-engine",
1201
+ "timestamp": 1760317417276,
1202
+ "configPath": "/Users/fanzhang/.routecodex/config/lmstudio-5521-gpt-oss-20b-mlx.json"
1203
+ },
1204
+ "engineVersion": "legacy"
1205
+ }