@jsonstudio/rcc 0.89.1205 → 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 (391) hide show
  1. package/README.md +53 -1412
  2. package/configsamples/config.json +426 -0
  3. package/configsamples/config.reference.json +58 -0
  4. package/configsamples/provider/crs/config.v1.json +46 -0
  5. package/configsamples/provider/glm/config.v1.json +81 -0
  6. package/configsamples/provider/glm-anthropic/config.v1.json +45 -0
  7. package/configsamples/provider/iflow/config.v1.json +74 -0
  8. package/configsamples/provider/kimi/config.v1.json +41 -0
  9. package/configsamples/provider/lmstudio/config.v1.json +101 -0
  10. package/configsamples/provider/mimo/config.v1.json +35 -0
  11. package/configsamples/provider/modelscope/config.v1.json +96 -0
  12. package/configsamples/provider/qwen/config.v1.json +38 -0
  13. package/configsamples/provider/tab/config.v1.json +50 -0
  14. package/configsamples/provider/tabglm/config.v1.json +49 -0
  15. package/dist/build-info.js +2 -2
  16. package/dist/cli/commands/code.js +12 -6
  17. package/dist/cli/commands/code.js.map +1 -1
  18. package/dist/cli/commands/config.d.ts +2 -1
  19. package/dist/cli/commands/config.js +77 -103
  20. package/dist/cli/commands/config.js.map +1 -1
  21. package/dist/cli/commands/examples.js +6 -6
  22. package/dist/cli/commands/examples.js.map +1 -1
  23. package/dist/cli/commands/init.d.ts +28 -0
  24. package/dist/cli/commands/init.js +94 -0
  25. package/dist/cli/commands/init.js.map +1 -0
  26. package/dist/cli/commands/port.js +10 -2
  27. package/dist/cli/commands/port.js.map +1 -1
  28. package/dist/cli/commands/restart.js +5 -2
  29. package/dist/cli/commands/restart.js.map +1 -1
  30. package/dist/cli/commands/start.js +25 -22
  31. package/dist/cli/commands/start.js.map +1 -1
  32. package/dist/cli/commands/status.js +1 -0
  33. package/dist/cli/commands/status.js.map +1 -1
  34. package/dist/cli/commands/stop.js +1 -0
  35. package/dist/cli/commands/stop.js.map +1 -1
  36. package/dist/cli/config/bundled-docs.d.ts +20 -0
  37. package/dist/cli/config/bundled-docs.js +91 -0
  38. package/dist/cli/config/bundled-docs.js.map +1 -0
  39. package/dist/cli/config/init-config.d.ts +37 -0
  40. package/dist/cli/config/init-config.js +212 -0
  41. package/dist/cli/config/init-config.js.map +1 -0
  42. package/dist/cli/config/init-provider-catalog.d.ts +8 -0
  43. package/dist/cli/config/init-provider-catalog.js +187 -0
  44. package/dist/cli/config/init-provider-catalog.js.map +1 -0
  45. package/dist/cli/register/init-command.d.ts +3 -0
  46. package/dist/cli/register/init-command.js +5 -0
  47. package/dist/cli/register/init-command.js.map +1 -0
  48. package/dist/cli.js +28 -3
  49. package/dist/cli.js.map +1 -1
  50. package/dist/client/gemini/gemini-protocol-client.js +2 -1
  51. package/dist/client/gemini/gemini-protocol-client.js.map +1 -1
  52. package/dist/client/gemini-cli/gemini-cli-protocol-client.js +40 -16
  53. package/dist/client/gemini-cli/gemini-cli-protocol-client.js.map +1 -1
  54. package/dist/client/openai/chat-protocol-client.js +2 -1
  55. package/dist/client/openai/chat-protocol-client.js.map +1 -1
  56. package/dist/client/responses/responses-protocol-client.js +2 -1
  57. package/dist/client/responses/responses-protocol-client.js.map +1 -1
  58. package/dist/config/risk-control-config.d.ts +94 -0
  59. package/dist/config/risk-control-config.js +196 -0
  60. package/dist/config/risk-control-config.js.map +1 -0
  61. package/dist/constants/index.d.ts +6 -0
  62. package/dist/constants/index.js +13 -0
  63. package/dist/constants/index.js.map +1 -1
  64. package/dist/docs/daemon-admin-ui.html +2113 -190
  65. package/dist/error-handling/quiet-error-handling-center.js +46 -8
  66. package/dist/error-handling/quiet-error-handling-center.js.map +1 -1
  67. package/dist/index.js +0 -1
  68. package/dist/index.js.map +1 -1
  69. package/dist/manager/modules/health/index.d.ts +1 -1
  70. package/dist/manager/modules/quota/antigravity-quota-manager.d.ts +70 -0
  71. package/dist/manager/modules/quota/antigravity-quota-manager.js +442 -0
  72. package/dist/manager/modules/quota/antigravity-quota-manager.js.map +1 -0
  73. package/dist/manager/modules/quota/index.d.ts +3 -127
  74. package/dist/manager/modules/quota/index.js +2 -1093
  75. package/dist/manager/modules/quota/index.js.map +1 -1
  76. package/dist/manager/modules/quota/provider-key-normalization.d.ts +3 -0
  77. package/dist/manager/modules/quota/provider-key-normalization.js +155 -0
  78. package/dist/manager/modules/quota/provider-key-normalization.js.map +1 -0
  79. package/dist/manager/modules/quota/provider-quota-daemon.cooldown.d.ts +9 -0
  80. package/dist/manager/modules/quota/provider-quota-daemon.cooldown.js +115 -0
  81. package/dist/manager/modules/quota/provider-quota-daemon.cooldown.js.map +1 -0
  82. package/dist/manager/modules/quota/provider-quota-daemon.d.ts +77 -0
  83. package/dist/manager/modules/quota/provider-quota-daemon.events.d.ts +12 -0
  84. package/dist/manager/modules/quota/provider-quota-daemon.events.js +239 -0
  85. package/dist/manager/modules/quota/provider-quota-daemon.events.js.map +1 -0
  86. package/dist/manager/modules/quota/provider-quota-daemon.js +404 -0
  87. package/dist/manager/modules/quota/provider-quota-daemon.js.map +1 -0
  88. package/dist/manager/modules/quota/provider-quota-daemon.model-backoff.d.ts +11 -0
  89. package/dist/manager/modules/quota/provider-quota-daemon.model-backoff.js +192 -0
  90. package/dist/manager/modules/quota/provider-quota-daemon.model-backoff.js.map +1 -0
  91. package/dist/manager/modules/quota/provider-quota-daemon.snapshot.d.ts +8 -0
  92. package/dist/manager/modules/quota/provider-quota-daemon.snapshot.js +96 -0
  93. package/dist/manager/modules/quota/provider-quota-daemon.snapshot.js.map +1 -0
  94. package/dist/manager/modules/quota/provider-quota-daemon.view.d.ts +19 -0
  95. package/dist/manager/modules/quota/provider-quota-daemon.view.js +37 -0
  96. package/dist/manager/modules/quota/provider-quota-daemon.view.js.map +1 -0
  97. package/dist/manager/modules/routing/index.d.ts +1 -0
  98. package/dist/manager/modules/routing/index.js +11 -25
  99. package/dist/manager/modules/routing/index.js.map +1 -1
  100. package/dist/manager/quota/provider-quota-center.d.ts +2 -0
  101. package/dist/manager/quota/provider-quota-center.js +80 -82
  102. package/dist/manager/quota/provider-quota-center.js.map +1 -1
  103. package/dist/modules/llmswitch/bridge.d.ts +16 -18
  104. package/dist/modules/llmswitch/bridge.js +293 -94
  105. package/dist/modules/llmswitch/bridge.js.map +1 -1
  106. package/dist/modules/llmswitch/core-loader.d.ts +4 -2
  107. package/dist/modules/llmswitch/core-loader.js +32 -20
  108. package/dist/modules/llmswitch/core-loader.js.map +1 -1
  109. package/dist/modules/pipeline/utils/colored-logger.js +3 -2
  110. package/dist/modules/pipeline/utils/colored-logger.js.map +1 -1
  111. package/dist/modules/pipeline/utils/debug-logger.js +1 -1
  112. package/dist/modules/pipeline/utils/debug-logger.js.map +1 -1
  113. package/dist/providers/auth/antigravity-userinfo-helper.d.ts +2 -1
  114. package/dist/providers/auth/antigravity-userinfo-helper.js +25 -4
  115. package/dist/providers/auth/antigravity-userinfo-helper.js.map +1 -1
  116. package/dist/providers/auth/iflow-cookie-auth.js +0 -2
  117. package/dist/providers/auth/iflow-cookie-auth.js.map +1 -1
  118. package/dist/providers/auth/oauth-lifecycle.js +2 -23
  119. package/dist/providers/auth/oauth-lifecycle.js.map +1 -1
  120. package/dist/providers/auth/tokenfile-auth.d.ts +2 -0
  121. package/dist/providers/auth/tokenfile-auth.js +33 -1
  122. package/dist/providers/auth/tokenfile-auth.js.map +1 -1
  123. package/dist/providers/core/config/camoufox-launcher.d.ts +5 -0
  124. package/dist/providers/core/config/camoufox-launcher.js +40 -4
  125. package/dist/providers/core/config/camoufox-launcher.js.map +1 -1
  126. package/dist/providers/core/config/service-profiles.js +7 -18
  127. package/dist/providers/core/config/service-profiles.js.map +1 -1
  128. package/dist/providers/core/runtime/antigravity-quota-client.js +6 -3
  129. package/dist/providers/core/runtime/antigravity-quota-client.js.map +1 -1
  130. package/dist/providers/core/runtime/base-provider.d.ts +2 -7
  131. package/dist/providers/core/runtime/base-provider.js +84 -165
  132. package/dist/providers/core/runtime/base-provider.js.map +1 -1
  133. package/dist/providers/core/runtime/gemini-cli-http-provider.d.ts +7 -0
  134. package/dist/providers/core/runtime/gemini-cli-http-provider.js +368 -97
  135. package/dist/providers/core/runtime/gemini-cli-http-provider.js.map +1 -1
  136. package/dist/providers/core/runtime/http-request-executor.d.ts +3 -0
  137. package/dist/providers/core/runtime/http-request-executor.js +110 -38
  138. package/dist/providers/core/runtime/http-request-executor.js.map +1 -1
  139. package/dist/providers/core/runtime/http-transport-provider.d.ts +17 -0
  140. package/dist/providers/core/runtime/http-transport-provider.js +165 -16
  141. package/dist/providers/core/runtime/http-transport-provider.js.map +1 -1
  142. package/dist/providers/core/runtime/provider-error-classifier.js +10 -0
  143. package/dist/providers/core/runtime/provider-error-classifier.js.map +1 -1
  144. package/dist/providers/core/runtime/provider-factory.js +7 -5
  145. package/dist/providers/core/runtime/provider-factory.js.map +1 -1
  146. package/dist/providers/core/runtime/provider-runtime-metadata.d.ts +6 -0
  147. package/dist/providers/core/runtime/provider-runtime-metadata.js.map +1 -1
  148. package/dist/providers/core/runtime/rate-limit-manager.d.ts +1 -12
  149. package/dist/providers/core/runtime/rate-limit-manager.js +4 -77
  150. package/dist/providers/core/runtime/rate-limit-manager.js.map +1 -1
  151. package/dist/providers/core/runtime/responses-provider.d.ts +1 -7
  152. package/dist/providers/core/runtime/responses-provider.js +12 -93
  153. package/dist/providers/core/runtime/responses-provider.js.map +1 -1
  154. package/dist/providers/core/strategies/oauth-auth-code-flow.js +12 -8
  155. package/dist/providers/core/strategies/oauth-auth-code-flow.js.map +1 -1
  156. package/dist/providers/core/utils/http-client.js +36 -46
  157. package/dist/providers/core/utils/http-client.js.map +1 -1
  158. package/dist/providers/core/utils/provider-error-logger.d.ts +1 -1
  159. package/dist/providers/core/utils/provider-error-reporter.d.ts +3 -1
  160. package/dist/providers/core/utils/provider-error-reporter.js +3 -0
  161. package/dist/providers/core/utils/provider-error-reporter.js.map +1 -1
  162. package/dist/providers/core/utils/snapshot-writer.js +1 -4
  163. package/dist/providers/core/utils/snapshot-writer.js.map +1 -1
  164. package/dist/providers/mock/mock-provider-runtime.js +57 -27
  165. package/dist/providers/mock/mock-provider-runtime.js.map +1 -1
  166. package/dist/scripts/camoufox/launch-auth.mjs +193 -58
  167. package/dist/server/handlers/handler-utils.js +8 -3
  168. package/dist/server/handlers/handler-utils.js.map +1 -1
  169. package/dist/server/handlers/responses-handler.js +1 -1
  170. package/dist/server/handlers/responses-handler.js.map +1 -1
  171. package/dist/server/runtime/http-server/daemon-admin/auth-handler.d.ts +2 -0
  172. package/dist/server/runtime/http-server/daemon-admin/auth-handler.js +103 -0
  173. package/dist/server/runtime/http-server/daemon-admin/auth-handler.js.map +1 -0
  174. package/dist/server/runtime/http-server/daemon-admin/auth-session.d.ts +5 -0
  175. package/dist/server/runtime/http-server/daemon-admin/auth-session.js +77 -0
  176. package/dist/server/runtime/http-server/daemon-admin/auth-session.js.map +1 -0
  177. package/dist/server/runtime/http-server/daemon-admin/auth-store.d.ts +18 -0
  178. package/dist/server/runtime/http-server/daemon-admin/auth-store.js +89 -0
  179. package/dist/server/runtime/http-server/daemon-admin/auth-store.js.map +1 -0
  180. package/dist/server/runtime/http-server/daemon-admin/credentials-handler.js +1 -2
  181. package/dist/server/runtime/http-server/daemon-admin/credentials-handler.js.map +1 -1
  182. package/dist/server/runtime/http-server/daemon-admin/providers-handler.js +226 -24
  183. package/dist/server/runtime/http-server/daemon-admin/providers-handler.js.map +1 -1
  184. package/dist/server/runtime/http-server/daemon-admin/quota-handler.js +47 -8
  185. package/dist/server/runtime/http-server/daemon-admin/quota-handler.js.map +1 -1
  186. package/dist/server/runtime/http-server/daemon-admin/restart-handler.js +1 -1
  187. package/dist/server/runtime/http-server/daemon-admin/restart-handler.js.map +1 -1
  188. package/dist/server/runtime/http-server/daemon-admin/stats-handler.js +1 -1
  189. package/dist/server/runtime/http-server/daemon-admin/stats-handler.js.map +1 -1
  190. package/dist/server/runtime/http-server/daemon-admin/status-handler.js +68 -4
  191. package/dist/server/runtime/http-server/daemon-admin/status-handler.js.map +1 -1
  192. package/dist/server/runtime/http-server/daemon-admin-routes.d.ts +3 -4
  193. package/dist/server/runtime/http-server/daemon-admin-routes.js +9 -14
  194. package/dist/server/runtime/http-server/daemon-admin-routes.js.map +1 -1
  195. package/dist/server/runtime/http-server/executor-metadata.js +1 -1
  196. package/dist/server/runtime/http-server/executor-metadata.js.map +1 -1
  197. package/dist/server/runtime/http-server/executor-response.js +0 -16
  198. package/dist/server/runtime/http-server/executor-response.js.map +1 -1
  199. package/dist/server/runtime/http-server/hub-shadow-compare.js +110 -34
  200. package/dist/server/runtime/http-server/hub-shadow-compare.js.map +1 -1
  201. package/dist/server/runtime/http-server/index.d.ts +5 -3
  202. package/dist/server/runtime/http-server/index.js +281 -136
  203. package/dist/server/runtime/http-server/index.js.map +1 -1
  204. package/dist/server/runtime/http-server/middleware.js +19 -1
  205. package/dist/server/runtime/http-server/middleware.js.map +1 -1
  206. package/dist/server/runtime/http-server/request-executor.js +59 -24
  207. package/dist/server/runtime/http-server/request-executor.js.map +1 -1
  208. package/dist/server/runtime/http-server/routes.js +12 -3
  209. package/dist/server/runtime/http-server/routes.js.map +1 -1
  210. package/dist/server/runtime/http-server/session-dir.d.ts +2 -0
  211. package/dist/server/runtime/http-server/session-dir.js +59 -0
  212. package/dist/server/runtime/http-server/session-dir.js.map +1 -0
  213. package/dist/server/runtime/http-server/types.d.ts +0 -4
  214. package/dist/server/utils/utf8-chunk-buffer.js +6 -3
  215. package/dist/server/utils/utf8-chunk-buffer.js.map +1 -1
  216. package/dist/server/utils/warmup-storm-tracker.js +1 -1
  217. package/dist/server/utils/warmup-storm-tracker.js.map +1 -1
  218. package/dist/server-factory.d.ts +6 -28
  219. package/dist/server-factory.js +8 -93
  220. package/dist/server-factory.js.map +1 -1
  221. package/dist/token-daemon/index.js +2 -2
  222. package/dist/token-daemon/index.js.map +1 -1
  223. package/dist/token-daemon/provider-registry.js +0 -1
  224. package/dist/token-daemon/provider-registry.js.map +1 -1
  225. package/dist/token-daemon/server-utils.js +8 -9
  226. package/dist/token-daemon/server-utils.js.map +1 -1
  227. package/dist/token-daemon/token-utils.js +1 -1
  228. package/dist/token-daemon/token-utils.js.map +1 -1
  229. package/dist/tools/semantic-replay.js +2 -2
  230. package/dist/tools/semantic-replay.js.map +1 -1
  231. package/dist/tools/stats-request-events.d.ts +1 -1
  232. package/dist/tools/stats-usage.js +6 -3
  233. package/dist/tools/stats-usage.js.map +1 -1
  234. package/dist/utils/llms-engine-shadow.d.ts +19 -0
  235. package/dist/utils/llms-engine-shadow.js +209 -0
  236. package/dist/utils/llms-engine-shadow.js.map +1 -0
  237. package/dist/utils/runtime-versions.js +2 -1
  238. package/dist/utils/runtime-versions.js.map +1 -1
  239. package/dist/utils/strip-internal-keys.d.ts +12 -0
  240. package/dist/utils/strip-internal-keys.js +28 -0
  241. package/dist/utils/strip-internal-keys.js.map +1 -0
  242. package/docs/ARCHITECTURE.md +402 -0
  243. package/docs/CHAT_PROCESS_PROTOCOL_AND_PIPELINE.md +221 -0
  244. package/docs/CODEX_AND_CLAUDE_CODE.md +69 -0
  245. package/docs/CONFIG_ARCHITECTURE.md +517 -0
  246. package/docs/ERROR_HANDLING_AUDIT.md +0 -0
  247. package/docs/GCLI2API_PARITY_GAPS.md +98 -0
  248. package/docs/INSTALLATION_AND_QUICKSTART.md +74 -0
  249. package/docs/INSTRUCTION_MARKUP.md +89 -0
  250. package/docs/MODULE_ENHANCEMENT_SYSTEM.md +666 -0
  251. package/docs/PORTS.md +36 -0
  252. package/docs/PROVIDERS_BUILTIN.md +111 -0
  253. package/docs/PROVIDER_TYPES.md +55 -0
  254. package/docs/SERVERTOOL_CLOCK_DESIGN.md +233 -0
  255. package/docs/USAGE_HANDLING_ANALYSIS.md +335 -0
  256. package/docs/USER_CONFIG_PARSER_CHANGES.md +175 -0
  257. package/docs/V3_INBOUND_OUTBOUND_DESIGN.md +86 -0
  258. package/docs/VIRTUAL_ROUTER_PRIORITY_AND_HEALTH.md +125 -0
  259. package/docs/anthropic-request-golden-samples.md +50 -0
  260. package/docs/antigravity-gemini-format-cleanup.md +102 -0
  261. package/docs/antigravity-routing-contract.md +31 -0
  262. package/docs/ccr-alignment-enhancetool.md +105 -0
  263. package/docs/chat-glm-500-analysis.md +79 -0
  264. package/docs/chat-request-golden-samples.md +42 -0
  265. package/docs/chat-semantic-expansion-plan.md +84 -0
  266. package/docs/cli-command-inventory.md +76 -0
  267. package/docs/codex-samples-replay.md +50 -0
  268. package/docs/daemon-admin-api-design.md +350 -0
  269. package/docs/daemon-admin-module-structure.md +169 -0
  270. package/docs/daemon-admin-ui.html +3394 -0
  271. package/docs/debug-system-design.md +734 -0
  272. package/docs/debugging/gemini-sse-root-cause.md +52 -0
  273. package/docs/debugging/sse_encoding_failure_analysis.md +53 -0
  274. package/docs/dry-run/README.md +721 -0
  275. package/docs/error-handling-v2.md +92 -0
  276. package/docs/exec-command-guard-policy.example.v1.json +42 -0
  277. package/docs/fixes/gemini-protocol-mapping.md +57 -0
  278. package/docs/fixes/oauth-portal-timing-fix.md +202 -0
  279. package/docs/fixes/web-search-hop3-fix.md +265 -0
  280. package/docs/glm-api-reference.md +390 -0
  281. package/docs/glm-chat-completions.md +1779 -0
  282. package/docs/glm-history-inline-images.md +44 -0
  283. package/docs/golden-ci-library.md +66 -0
  284. package/docs/lmstudio-dry-run-summary.md +203 -0
  285. package/docs/lmstudio-tool-calling.md +214 -0
  286. package/docs/mapping-tables/anthropic-to-openai.json +290 -0
  287. package/docs/mapping-tables/iflow-to-openai.json +215 -0
  288. package/docs/mapping-tables/openai-passthrough.json +190 -0
  289. package/docs/mapping-tables/openai-to-iflow.json +227 -0
  290. package/docs/monitoring/Design.md +61 -0
  291. package/docs/multi-token-auth-guide.md +66 -0
  292. package/docs/oauth-authentication-guide.md +168 -0
  293. package/docs/oauth-iflow-implementation.md +153 -0
  294. package/docs/pipeline-routing-report.md +209 -0
  295. package/docs/plans/manager-daemon/PLAN.md +86 -0
  296. package/docs/plans/provider-config-v2-plan.md +176 -0
  297. package/docs/plans/provider-runtime-manager-plan.md +209 -0
  298. package/docs/plans/transparent-429-failover.md +89 -0
  299. package/docs/plans/unified-hub-framework-v1.md +245 -0
  300. package/docs/provider-config-v2-ui-design.md +181 -0
  301. package/docs/provider-quota-design.md +129 -0
  302. package/docs/providers/gemini-provider.md +62 -0
  303. package/docs/providers/lmstudio-v2-migration-report.md +102 -0
  304. package/docs/providers/provider-composite-design.md +142 -0
  305. package/docs/providers/provider-composite-testing.md +98 -0
  306. package/docs/providers/provider-type-only-migration.md +111 -0
  307. package/docs/rccx-wasm-migration.md +74 -0
  308. package/docs/refactoring/architecture-comparison-diagram.md +140 -0
  309. package/docs/refactoring/compatibility-v2-architecture-design.md +738 -0
  310. package/docs/refactoring/workflow-compatibility-refactoring-design.md +361 -0
  311. package/docs/reports/routing-classification-report.json +24 -0
  312. package/docs/reports/routing-classification-report.md +18 -0
  313. package/docs/reports/thinking-keywords-report.json +19 -0
  314. package/docs/responses/README.md +156 -0
  315. package/docs/responses-generic-provider.md +86 -0
  316. package/docs/responses-passthrough-provider-design.md +202 -0
  317. package/docs/routing-awrr-health-weighted-round-robin.md +179 -0
  318. package/docs/routing-instructions.md +393 -0
  319. package/docs/servertool-framework.md +65 -0
  320. package/docs/stop-message-auto.md +225 -0
  321. package/docs/streaming-flow.html +30 -0
  322. package/docs/streaming-flow.md +182 -0
  323. package/docs/token-daemon-preview.html +490 -0
  324. package/docs/token-refresh-daemon-plan.md +269 -0
  325. package/docs/transformation-tables/Gemini-FinishReason/345/256/214/346/225/264/350/275/254/346/215/242/350/241/250.json +233 -0
  326. package/docs/transformation-tables/README.md +225 -0
  327. package/docs/transformation-tables/claude-code-router-anthropic-to-gemini.json +283 -0
  328. package/docs/transformation-tables/claude-code-router-anthropic-to-openai.json +208 -0
  329. package/docs/transformation-tables/claude-code-router-openai-to-anthropic.json +261 -0
  330. package/docs/transformation-tables/claude-code-router-openai-to-gemini.json +208 -0
  331. package/docs/transformation-tables/claude-code-router-openai-to-lmstudio.json +182 -0
  332. package/docs/transformation-tables/claude-code-router-openai-to-ollama.json +250 -0
  333. package/docs/transformation-tables/claude-code-router-openai-to-textgenwebui.json +295 -0
  334. package/docs/transformation-tables/claude-code-router-provider-conversions.json +193 -0
  335. package/docs/transformation-tables//345/256/214/346/225/264/347/232/204/345/267/245/345/205/267/346/211/247/350/241/214/346/265/201/347/250/213/350/275/254/346/215/242/350/241/250.json +299 -0
  336. package/docs/transformation-tables//345/257/271/350/257/235/345/216/206/345/217/262/347/273/264/346/212/244/345/210/206/346/236/220.md +134 -0
  337. package/docs/transformation-tables//345/267/245/345/205/267/350/260/203/347/224/250/346/250/241/345/274/217/345/210/206/346/236/220.md +158 -0
  338. package/docs/transformation-tables//347/212/266/346/200/201/347/256/241/347/220/206/351/234/200/346/261/202/345/210/206/346/236/220.md +175 -0
  339. package/docs/transformation-tables//351/235/231/346/200/201/350/241/250vs/345/212/250/346/200/201/345/210/206/346/236/220.md +189 -0
  340. package/docs/transformation-tables//351/235/231/346/200/201/350/241/250/345/207/206/347/241/256/346/200/247/350/257/204/344/274/260.md +179 -0
  341. package/docs/transformation-tables//351/235/236/346/265/201/345/274/217/345/234/272/346/231/257/345/210/206/346/236/220.md +189 -0
  342. package/docs/v2-architecture/IMPLEMENTATION-ROADMAP.md +367 -0
  343. package/docs/v2-architecture/OPTIMIZED-DESIGN.md +827 -0
  344. package/docs/v2-architecture/PRERUN-CONNECTION-DESIGN.md +716 -0
  345. package/docs/v2-architecture/README.md +549 -0
  346. package/docs/verification/modelscope-verify.md +59 -0
  347. package/docs/verified-configs/README.md +60 -0
  348. package/docs/verified-configs/v0.45.0/README.md +244 -0
  349. package/docs/verified-configs/v0.45.0/lmstudio-5521-gpt-oss-20b-mlx.json +135 -0
  350. package/docs/verified-configs/v0.45.0/merged-config.5521.json +1205 -0
  351. package/docs/verified-configs/v0.45.0/merged-config.qwen-5522.json +1559 -0
  352. package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus-final.json +221 -0
  353. package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus-fixed.json +242 -0
  354. package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus.json +242 -0
  355. package/docs/web-search-service-design.md +322 -0
  356. package/package.json +26 -15
  357. package/scripts/build-core.mjs +3 -1
  358. package/scripts/camoufox/launch-auth.mjs +193 -58
  359. package/scripts/ci/repo-sanity.mjs +138 -0
  360. package/scripts/mock-provider/run-regressions.mjs +157 -1
  361. package/scripts/monitor-diff.mjs +126 -0
  362. package/scripts/pack-mode.mjs +19 -1
  363. package/scripts/pack-rcc.mjs +63 -0
  364. package/scripts/run-bg.sh +0 -14
  365. package/scripts/tests/ci-jest.mjs +119 -0
  366. package/scripts/tools-dev/responses-debug-client/README.md +23 -0
  367. package/scripts/tools-dev/responses-debug-client/payloads/poem.json +13 -0
  368. package/scripts/tools-dev/responses-debug-client/payloads/sample-no-tools.json +98 -0
  369. package/scripts/tools-dev/responses-debug-client/payloads/text.json +13 -0
  370. package/scripts/tools-dev/responses-debug-client/payloads/tool.json +27 -0
  371. package/scripts/tools-dev/responses-debug-client/run.mjs +65 -0
  372. package/scripts/tools-dev/responses-debug-client/src/index.ts +281 -0
  373. package/scripts/tools-dev/run-llmswitch-chat.mjs +53 -0
  374. package/scripts/tools-dev/server-tools-dev/run-web-fetch.mjs +65 -0
  375. package/scripts/unified-hub-shadow-compare.mjs +33 -13
  376. package/scripts/vendor-core.mjs +13 -3
  377. package/scripts/verify-e2e-toolcall.mjs +115 -26
  378. package/dist/modules/llmswitch/pipeline-registry.d.ts +0 -57
  379. package/dist/modules/llmswitch/pipeline-registry.js +0 -229
  380. package/dist/modules/llmswitch/pipeline-registry.js.map +0 -1
  381. package/dist/server/RouteCodexServer.d.ts +0 -13
  382. package/dist/server/RouteCodexServer.js +0 -25
  383. package/dist/server/RouteCodexServer.js.map +0 -1
  384. package/dist/v2/conversion/hub/snapshot-recorder.d.ts +0 -12
  385. package/dist/v2/conversion/hub/snapshot-recorder.js +0 -22
  386. package/dist/v2/conversion/hub/snapshot-recorder.js.map +0 -1
  387. package/scripts/test-fc-responses.mjs +0 -66
  388. package/scripts/test-guidance.mjs +0 -100
  389. package/scripts/test-iflow-web-search.mjs +0 -141
  390. package/scripts/test-iflow.mjs +0 -379
  391. package/scripts/test-tool-exec.mjs +0 -26
@@ -0,0 +1,1559 @@
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
+ "qwen-provider": {
532
+ "auth": {
533
+ "clientId": "***REDACTED***",
534
+ "deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
535
+ "scopes": [
536
+ "email",
537
+ "model.completion",
538
+ "openid",
539
+ "profile"
540
+ ],
541
+ "tokenFile": "/Users/fanzhang/.qwen/oauth_creds.json",
542
+ "tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
543
+ "type": "oauth"
544
+ },
545
+ "baseURL": "https://portal.qwen.ai/v1",
546
+ "compatibility": {
547
+ "config": {},
548
+ "type": "passthrough-compatibility"
549
+ },
550
+ "enabled": true,
551
+ "id": "qwen-provider",
552
+ "keyAliases": [
553
+ "key1"
554
+ ],
555
+ "models": {
556
+ "qwen3-30b-a3b-instruct-2507-mlx": {
557
+ "compatibility": {
558
+ "config": {
559
+ "streamingEnabled": true,
560
+ "toolsEnabled": true
561
+ },
562
+ "type": "qwen-compatibility"
563
+ },
564
+ "maxContext": 262144,
565
+ "maxTokens": 262144,
566
+ "supportsStreaming": true,
567
+ "supportsTools": true,
568
+ "temperature": 0.7
569
+ },
570
+ "qwen3-4b-thinking-2507-mlx": {
571
+ "compatibility": {
572
+ "config": {
573
+ "streamingEnabled": true,
574
+ "toolsEnabled": true
575
+ },
576
+ "type": "qwen-compatibility"
577
+ },
578
+ "maxContext": 262144,
579
+ "maxTokens": 262144,
580
+ "supportsStreaming": true,
581
+ "supportsTools": true,
582
+ "temperature": 0.7
583
+ },
584
+ "qwen3-coder-480b-a35b-instruct-mlx": {
585
+ "compatibility": {
586
+ "config": {
587
+ "streamingEnabled": true,
588
+ "toolsEnabled": true
589
+ },
590
+ "type": "qwen-compatibility"
591
+ },
592
+ "maxContext": 262144,
593
+ "maxTokens": 262144,
594
+ "supportsStreaming": true,
595
+ "supportsTools": true,
596
+ "temperature": 0.7
597
+ },
598
+ "qwen3-coder-plus": {
599
+ "compatibility": {
600
+ "config": {
601
+ "streamingEnabled": true,
602
+ "toolsEnabled": true
603
+ },
604
+ "type": "qwen-compatibility"
605
+ },
606
+ "maxContext": 262144,
607
+ "maxTokens": 262144,
608
+ "supportsStreaming": true,
609
+ "supportsTools": true,
610
+ "temperature": 0.7
611
+ }
612
+ },
613
+ "retryAttempts": 3,
614
+ "timeout": 60000,
615
+ "type": "qwen"
616
+ }
617
+ },
618
+ "routing": {
619
+ "anthropic": [
620
+ "qwen-provider.qwen3-coder-plus"
621
+ ],
622
+ "background": [
623
+ "qwen-provider.qwen3-coder-plus"
624
+ ],
625
+ "coding": [
626
+ "qwen-provider.qwen3-coder-plus"
627
+ ],
628
+ "default": [
629
+ "qwen-provider.qwen3-coder-plus"
630
+ ],
631
+ "longcontext": [
632
+ "qwen-provider.qwen3-coder-plus"
633
+ ],
634
+ "thinking": [
635
+ "qwen-provider.qwen3-4b-thinking-2507-mlx"
636
+ ],
637
+ "tools": [
638
+ "qwen-provider.qwen3-coder-plus"
639
+ ],
640
+ "vision": [
641
+ "qwen-provider.qwen3-coder-plus"
642
+ ],
643
+ "websearch": [
644
+ "qwen-provider.qwen3-coder-plus"
645
+ ]
646
+ },
647
+ "dryRun": {
648
+ "enabled": false,
649
+ "includeHealthStatus": false,
650
+ "includeLoadBalancerDetails": false,
651
+ "includeWeightCalculation": false,
652
+ "simulateProviderHealth": false
653
+ },
654
+ "inputProtocol": "openai",
655
+ "llmSwitch": {
656
+ "config": {
657
+ "defaultProtocol": "openai",
658
+ "endpointMapping": {
659
+ "anthropic": [
660
+ "/v1/anthropic/messages",
661
+ "/v1/messages"
662
+ ],
663
+ "openai": [
664
+ "/v1/chat/completions",
665
+ "/v1/completions"
666
+ ]
667
+ },
668
+ "protocolDetection": "endpoint-based"
669
+ },
670
+ "type": "llmswitch-unified"
671
+ },
672
+ "outputProtocol": "openai"
673
+ },
674
+ "host": "0.0.0.0",
675
+ "pipelineConfigs": {
676
+ "endpoint-based": {
677
+ "/v1/chat/completions": {
678
+ "workflow": {
679
+ "config": {
680
+ "enableStreaming": true,
681
+ "reasoningPolicy": {
682
+ "openai": {
683
+ "disposition": "keep"
684
+ }
685
+ }
686
+ },
687
+ "enabled": true,
688
+ "type": "streaming-control"
689
+ }
690
+ },
691
+ "/v1/messages": {
692
+ "llmSwitch": {
693
+ "config": {},
694
+ "type": "llmswitch-anthropic-openai"
695
+ },
696
+ "workflow": {
697
+ "config": {
698
+ "enableStreaming": true,
699
+ "reasoningPolicy": {
700
+ "anthropic": {
701
+ "disposition": "drop",
702
+ "strict": true
703
+ }
704
+ }
705
+ },
706
+ "enabled": true,
707
+ "type": "streaming-control"
708
+ }
709
+ },
710
+ "qwen-provider.qwen3-30b-a3b-instruct-2507-mlx": {
711
+ "compatibility": {
712
+ "config": {
713
+ "streamingEnabled": true,
714
+ "toolsEnabled": true
715
+ },
716
+ "enabled": true,
717
+ "type": "qwen-compatibility"
718
+ },
719
+ "llmSwitch": {
720
+ "config": {},
721
+ "enabled": true,
722
+ "type": "llmswitch-unified"
723
+ }
724
+ },
725
+ "qwen-provider.qwen3-4b-thinking-2507-mlx": {
726
+ "compatibility": {
727
+ "config": {
728
+ "streamingEnabled": true,
729
+ "toolsEnabled": true
730
+ },
731
+ "enabled": true,
732
+ "type": "qwen-compatibility"
733
+ },
734
+ "llmSwitch": {
735
+ "config": {},
736
+ "enabled": true,
737
+ "type": "llmswitch-unified"
738
+ }
739
+ },
740
+ "qwen-provider.qwen3-coder-480b-a35b-instruct-mlx": {
741
+ "compatibility": {
742
+ "config": {
743
+ "streamingEnabled": true,
744
+ "toolsEnabled": true
745
+ },
746
+ "enabled": true,
747
+ "type": "qwen-compatibility"
748
+ },
749
+ "llmSwitch": {
750
+ "config": {},
751
+ "enabled": true,
752
+ "type": "llmswitch-unified"
753
+ }
754
+ },
755
+ "qwen-provider.qwen3-coder-plus": {
756
+ "compatibility": {
757
+ "config": {
758
+ "streamingEnabled": true,
759
+ "toolsEnabled": true
760
+ },
761
+ "enabled": true,
762
+ "type": "qwen-compatibility"
763
+ },
764
+ "llmSwitch": {
765
+ "config": {},
766
+ "enabled": true,
767
+ "type": "llmswitch-unified"
768
+ }
769
+ }
770
+ }
771
+ },
772
+ "port": 5522,
773
+ "schemaVersion": "1.0.0",
774
+ "stableSorting": {
775
+ "enabled": true,
776
+ "sortKeyMappings": true,
777
+ "sortProviders": true,
778
+ "sortRouting": true
779
+ },
780
+ "version": "1.0.0",
781
+ "compatibilityConfig": {
782
+ "originalConfig": {
783
+ "version": "1.0.0",
784
+ "port": 5522,
785
+ "host": "0.0.0.0",
786
+ "virtualrouter": {
787
+ "inputProtocol": "openai",
788
+ "outputProtocol": "openai",
789
+ "providers": {
790
+ "qwen-provider": {
791
+ "id": "qwen-provider",
792
+ "type": "qwen",
793
+ "enabled": true,
794
+ "baseURL": "https://portal.qwen.ai/v1",
795
+ "auth": {
796
+ "type": "oauth",
797
+ "clientId": "***REDACTED***",
798
+ "deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
799
+ "tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
800
+ "scopes": [
801
+ "openid",
802
+ "profile",
803
+ "email",
804
+ "model.completion"
805
+ ],
806
+ "tokenFile": "/Users/fanzhang/.qwen/oauth_creds.json"
807
+ },
808
+ "models": {
809
+ "qwen3-coder-plus": {
810
+ "maxContext": 262144,
811
+ "maxTokens": 262144,
812
+ "temperature": 0.7,
813
+ "supportsStreaming": true,
814
+ "supportsTools": true,
815
+ "compatibility": {
816
+ "type": "qwen-compatibility",
817
+ "config": {
818
+ "toolsEnabled": true,
819
+ "streamingEnabled": true
820
+ }
821
+ }
822
+ },
823
+ "qwen3-4b-thinking-2507-mlx": {
824
+ "maxContext": 262144,
825
+ "maxTokens": 262144,
826
+ "temperature": 0.7,
827
+ "supportsStreaming": true,
828
+ "supportsTools": true,
829
+ "compatibility": {
830
+ "type": "qwen-compatibility",
831
+ "config": {
832
+ "toolsEnabled": true,
833
+ "streamingEnabled": true
834
+ }
835
+ }
836
+ },
837
+ "qwen3-30b-a3b-instruct-2507-mlx": {
838
+ "maxContext": 262144,
839
+ "maxTokens": 262144,
840
+ "temperature": 0.7,
841
+ "supportsStreaming": true,
842
+ "supportsTools": true,
843
+ "compatibility": {
844
+ "type": "qwen-compatibility",
845
+ "config": {
846
+ "toolsEnabled": true,
847
+ "streamingEnabled": true
848
+ }
849
+ }
850
+ },
851
+ "qwen3-coder-480b-a35b-instruct-mlx": {
852
+ "maxContext": 262144,
853
+ "maxTokens": 262144,
854
+ "temperature": 0.7,
855
+ "supportsStreaming": true,
856
+ "supportsTools": true,
857
+ "compatibility": {
858
+ "type": "qwen-compatibility",
859
+ "config": {
860
+ "toolsEnabled": true,
861
+ "streamingEnabled": true
862
+ }
863
+ }
864
+ }
865
+ },
866
+ "timeout": 60000,
867
+ "retryAttempts": 3,
868
+ "compatibility": {
869
+ "type": "passthrough-compatibility",
870
+ "config": {}
871
+ }
872
+ }
873
+ },
874
+ "routing": {
875
+ "default": [
876
+ "qwen-provider.qwen3-coder-plus"
877
+ ],
878
+ "anthropic": [
879
+ "qwen-provider.qwen3-coder-plus"
880
+ ],
881
+ "background": [
882
+ "qwen-provider.qwen3-coder-plus"
883
+ ],
884
+ "coding": [
885
+ "qwen-provider.qwen3-coder-plus"
886
+ ],
887
+ "longcontext": [
888
+ "qwen-provider.qwen3-coder-plus"
889
+ ],
890
+ "thinking": [
891
+ "qwen-provider.qwen3-4b-thinking-2507-mlx"
892
+ ],
893
+ "tools": [
894
+ "qwen-provider.qwen3-coder-plus"
895
+ ],
896
+ "vision": [
897
+ "qwen-provider.qwen3-coder-plus"
898
+ ],
899
+ "websearch": [
900
+ "qwen-provider.qwen3-coder-plus"
901
+ ]
902
+ },
903
+ "dryRun": {
904
+ "enabled": false,
905
+ "includeLoadBalancerDetails": false,
906
+ "includeHealthStatus": false,
907
+ "includeWeightCalculation": false,
908
+ "simulateProviderHealth": false
909
+ },
910
+ "llmSwitch": {
911
+ "type": "llmswitch-unified",
912
+ "config": {
913
+ "protocolDetection": "endpoint-based",
914
+ "defaultProtocol": "openai",
915
+ "endpointMapping": {
916
+ "anthropic": [
917
+ "/v1/anthropic/messages",
918
+ "/v1/messages"
919
+ ],
920
+ "openai": [
921
+ "/v1/chat/completions",
922
+ "/v1/completions"
923
+ ]
924
+ }
925
+ }
926
+ }
927
+ },
928
+ "pipelineConfigs": {
929
+ "endpoint-based": {
930
+ "/v1/messages": {
931
+ "llmSwitch": {
932
+ "type": "llmswitch-anthropic-openai",
933
+ "config": {}
934
+ },
935
+ "workflow": {
936
+ "type": "streaming-control",
937
+ "enabled": true,
938
+ "config": {
939
+ "enableStreaming": true,
940
+ "reasoningPolicy": {
941
+ "anthropic": {
942
+ "disposition": "drop",
943
+ "strict": true
944
+ }
945
+ }
946
+ }
947
+ }
948
+ },
949
+ "/v1/chat/completions": {
950
+ "workflow": {
951
+ "type": "streaming-control",
952
+ "enabled": true,
953
+ "config": {
954
+ "enableStreaming": true,
955
+ "reasoningPolicy": {
956
+ "openai": {
957
+ "disposition": "keep"
958
+ }
959
+ }
960
+ }
961
+ }
962
+ },
963
+ "qwen-provider.qwen3-coder-plus": {
964
+ "llmSwitch": {
965
+ "type": "llmswitch-unified",
966
+ "enabled": true,
967
+ "config": {}
968
+ },
969
+ "compatibility": {
970
+ "type": "qwen-compatibility",
971
+ "enabled": true,
972
+ "config": {
973
+ "toolsEnabled": true,
974
+ "streamingEnabled": true
975
+ }
976
+ }
977
+ },
978
+ "qwen-provider.qwen3-4b-thinking-2507-mlx": {
979
+ "llmSwitch": {
980
+ "type": "llmswitch-unified",
981
+ "enabled": true,
982
+ "config": {}
983
+ },
984
+ "compatibility": {
985
+ "type": "qwen-compatibility",
986
+ "enabled": true,
987
+ "config": {
988
+ "toolsEnabled": true,
989
+ "streamingEnabled": true
990
+ }
991
+ }
992
+ },
993
+ "qwen-provider.qwen3-30b-a3b-instruct-2507-mlx": {
994
+ "llmSwitch": {
995
+ "type": "llmswitch-unified",
996
+ "enabled": true,
997
+ "config": {}
998
+ },
999
+ "compatibility": {
1000
+ "type": "qwen-compatibility",
1001
+ "enabled": true,
1002
+ "config": {
1003
+ "toolsEnabled": true,
1004
+ "streamingEnabled": true
1005
+ }
1006
+ }
1007
+ },
1008
+ "qwen-provider.qwen3-coder-480b-a35b-instruct-mlx": {
1009
+ "llmSwitch": {
1010
+ "type": "llmswitch-unified",
1011
+ "enabled": true,
1012
+ "config": {}
1013
+ },
1014
+ "compatibility": {
1015
+ "type": "qwen-compatibility",
1016
+ "enabled": true,
1017
+ "config": {
1018
+ "toolsEnabled": true,
1019
+ "streamingEnabled": true
1020
+ }
1021
+ }
1022
+ }
1023
+ }
1024
+ },
1025
+ "schemaVersion": "2.0.0",
1026
+ "stableSorting": {
1027
+ "enabled": true,
1028
+ "sortKeyMappings": true,
1029
+ "sortProviders": true,
1030
+ "sortRouting": true
1031
+ }
1032
+ },
1033
+ "normalizedConfig": {
1034
+ "virtualrouter": {
1035
+ "providers": {
1036
+ "qwen-provider": {
1037
+ "auth": {
1038
+ "clientId": "***REDACTED***",
1039
+ "deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
1040
+ "scopes": [
1041
+ "email",
1042
+ "model.completion",
1043
+ "openid",
1044
+ "profile"
1045
+ ],
1046
+ "tokenFile": "/Users/fanzhang/.qwen/oauth_creds.json",
1047
+ "tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
1048
+ "type": "oauth"
1049
+ },
1050
+ "baseURL": "https://portal.qwen.ai/v1",
1051
+ "compatibility": {
1052
+ "config": {},
1053
+ "type": "passthrough-compatibility"
1054
+ },
1055
+ "enabled": true,
1056
+ "id": "qwen-provider",
1057
+ "keyAliases": [
1058
+ "key1"
1059
+ ],
1060
+ "models": {
1061
+ "qwen3-30b-a3b-instruct-2507-mlx": {
1062
+ "compatibility": {
1063
+ "config": {
1064
+ "streamingEnabled": true,
1065
+ "toolsEnabled": true
1066
+ },
1067
+ "type": "qwen-compatibility"
1068
+ },
1069
+ "maxContext": 262144,
1070
+ "maxTokens": 262144,
1071
+ "supportsStreaming": true,
1072
+ "supportsTools": true,
1073
+ "temperature": 0.7
1074
+ },
1075
+ "qwen3-4b-thinking-2507-mlx": {
1076
+ "compatibility": {
1077
+ "config": {
1078
+ "streamingEnabled": true,
1079
+ "toolsEnabled": true
1080
+ },
1081
+ "type": "qwen-compatibility"
1082
+ },
1083
+ "maxContext": 262144,
1084
+ "maxTokens": 262144,
1085
+ "supportsStreaming": true,
1086
+ "supportsTools": true,
1087
+ "temperature": 0.7
1088
+ },
1089
+ "qwen3-coder-480b-a35b-instruct-mlx": {
1090
+ "compatibility": {
1091
+ "config": {
1092
+ "streamingEnabled": true,
1093
+ "toolsEnabled": true
1094
+ },
1095
+ "type": "qwen-compatibility"
1096
+ },
1097
+ "maxContext": 262144,
1098
+ "maxTokens": 262144,
1099
+ "supportsStreaming": true,
1100
+ "supportsTools": true,
1101
+ "temperature": 0.7
1102
+ },
1103
+ "qwen3-coder-plus": {
1104
+ "compatibility": {
1105
+ "config": {
1106
+ "streamingEnabled": true,
1107
+ "toolsEnabled": true
1108
+ },
1109
+ "type": "qwen-compatibility"
1110
+ },
1111
+ "maxContext": 262144,
1112
+ "maxTokens": 262144,
1113
+ "supportsStreaming": true,
1114
+ "supportsTools": true,
1115
+ "temperature": 0.7
1116
+ }
1117
+ },
1118
+ "retryAttempts": 3,
1119
+ "timeout": 60000,
1120
+ "type": "qwen"
1121
+ }
1122
+ },
1123
+ "routing": {
1124
+ "anthropic": [
1125
+ "qwen-provider.qwen3-coder-plus"
1126
+ ],
1127
+ "background": [
1128
+ "qwen-provider.qwen3-coder-plus"
1129
+ ],
1130
+ "coding": [
1131
+ "qwen-provider.qwen3-coder-plus"
1132
+ ],
1133
+ "default": [
1134
+ "qwen-provider.qwen3-coder-plus"
1135
+ ],
1136
+ "longcontext": [
1137
+ "qwen-provider.qwen3-coder-plus"
1138
+ ],
1139
+ "thinking": [
1140
+ "qwen-provider.qwen3-4b-thinking-2507-mlx"
1141
+ ],
1142
+ "tools": [
1143
+ "qwen-provider.qwen3-coder-plus"
1144
+ ],
1145
+ "vision": [
1146
+ "qwen-provider.qwen3-coder-plus"
1147
+ ],
1148
+ "websearch": [
1149
+ "qwen-provider.qwen3-coder-plus"
1150
+ ]
1151
+ },
1152
+ "dryRun": {
1153
+ "enabled": false,
1154
+ "includeHealthStatus": false,
1155
+ "includeLoadBalancerDetails": false,
1156
+ "includeWeightCalculation": false,
1157
+ "simulateProviderHealth": false
1158
+ },
1159
+ "inputProtocol": "openai",
1160
+ "llmSwitch": {
1161
+ "config": {
1162
+ "defaultProtocol": "openai",
1163
+ "endpointMapping": {
1164
+ "anthropic": [
1165
+ "/v1/anthropic/messages",
1166
+ "/v1/messages"
1167
+ ],
1168
+ "openai": [
1169
+ "/v1/chat/completions",
1170
+ "/v1/completions"
1171
+ ]
1172
+ },
1173
+ "protocolDetection": "endpoint-based"
1174
+ },
1175
+ "type": "llmswitch-unified"
1176
+ },
1177
+ "outputProtocol": "openai"
1178
+ },
1179
+ "host": "0.0.0.0",
1180
+ "pipelineConfigs": {
1181
+ "endpoint-based": {
1182
+ "/v1/chat/completions": {
1183
+ "workflow": {
1184
+ "config": {
1185
+ "enableStreaming": true,
1186
+ "reasoningPolicy": {
1187
+ "openai": {
1188
+ "disposition": "keep"
1189
+ }
1190
+ }
1191
+ },
1192
+ "enabled": true,
1193
+ "type": "streaming-control"
1194
+ }
1195
+ },
1196
+ "/v1/messages": {
1197
+ "llmSwitch": {
1198
+ "config": {},
1199
+ "type": "llmswitch-anthropic-openai"
1200
+ },
1201
+ "workflow": {
1202
+ "config": {
1203
+ "enableStreaming": true,
1204
+ "reasoningPolicy": {
1205
+ "anthropic": {
1206
+ "disposition": "drop",
1207
+ "strict": true
1208
+ }
1209
+ }
1210
+ },
1211
+ "enabled": true,
1212
+ "type": "streaming-control"
1213
+ }
1214
+ },
1215
+ "qwen-provider.qwen3-30b-a3b-instruct-2507-mlx": {
1216
+ "compatibility": {
1217
+ "config": {
1218
+ "streamingEnabled": true,
1219
+ "toolsEnabled": true
1220
+ },
1221
+ "enabled": true,
1222
+ "type": "qwen-compatibility"
1223
+ },
1224
+ "llmSwitch": {
1225
+ "config": {},
1226
+ "enabled": true,
1227
+ "type": "llmswitch-unified"
1228
+ }
1229
+ },
1230
+ "qwen-provider.qwen3-4b-thinking-2507-mlx": {
1231
+ "compatibility": {
1232
+ "config": {
1233
+ "streamingEnabled": true,
1234
+ "toolsEnabled": true
1235
+ },
1236
+ "enabled": true,
1237
+ "type": "qwen-compatibility"
1238
+ },
1239
+ "llmSwitch": {
1240
+ "config": {},
1241
+ "enabled": true,
1242
+ "type": "llmswitch-unified"
1243
+ }
1244
+ },
1245
+ "qwen-provider.qwen3-coder-480b-a35b-instruct-mlx": {
1246
+ "compatibility": {
1247
+ "config": {
1248
+ "streamingEnabled": true,
1249
+ "toolsEnabled": true
1250
+ },
1251
+ "enabled": true,
1252
+ "type": "qwen-compatibility"
1253
+ },
1254
+ "llmSwitch": {
1255
+ "config": {},
1256
+ "enabled": true,
1257
+ "type": "llmswitch-unified"
1258
+ }
1259
+ },
1260
+ "qwen-provider.qwen3-coder-plus": {
1261
+ "compatibility": {
1262
+ "config": {
1263
+ "streamingEnabled": true,
1264
+ "toolsEnabled": true
1265
+ },
1266
+ "enabled": true,
1267
+ "type": "qwen-compatibility"
1268
+ },
1269
+ "llmSwitch": {
1270
+ "config": {},
1271
+ "enabled": true,
1272
+ "type": "llmswitch-unified"
1273
+ }
1274
+ }
1275
+ }
1276
+ },
1277
+ "port": 5522,
1278
+ "schemaVersion": "2.0.0",
1279
+ "stableSorting": {
1280
+ "enabled": true,
1281
+ "sortKeyMappings": true,
1282
+ "sortProviders": true,
1283
+ "sortRouting": true
1284
+ },
1285
+ "version": "1.0.0"
1286
+ },
1287
+ "keyMappings": {
1288
+ "global": {
1289
+ "key1": "default"
1290
+ },
1291
+ "oauth": {},
1292
+ "providers": {
1293
+ "qwen-provider": {
1294
+ "key1": "default"
1295
+ }
1296
+ }
1297
+ },
1298
+ "authMappings": {
1299
+ "authFiles": {
1300
+ "auth-clientId": "***REDACTED***",
1301
+ "auth-deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
1302
+ "auth-scopes": [
1303
+ "email",
1304
+ "model.completion",
1305
+ "openid",
1306
+ "profile"
1307
+ ],
1308
+ "auth-tokenFile": "/Users/fanzhang/.qwen/oauth_creds.json",
1309
+ "auth-tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
1310
+ "auth-type": "oauth"
1311
+ },
1312
+ "oauthTokens": {},
1313
+ "oauthConfigs": {}
1314
+ },
1315
+ "routeTargets": {
1316
+ "anthropic": [
1317
+ [
1318
+ {
1319
+ "providerId": "qwen-provider",
1320
+ "modelId": "qwen3-coder-plus",
1321
+ "keyId": "key1",
1322
+ "actualKey": "default",
1323
+ "inputProtocol": "openai",
1324
+ "outputProtocol": "openai"
1325
+ }
1326
+ ]
1327
+ ],
1328
+ "background": [
1329
+ [
1330
+ {
1331
+ "providerId": "qwen-provider",
1332
+ "modelId": "qwen3-coder-plus",
1333
+ "keyId": "key1",
1334
+ "actualKey": "default",
1335
+ "inputProtocol": "openai",
1336
+ "outputProtocol": "openai"
1337
+ }
1338
+ ]
1339
+ ],
1340
+ "coding": [
1341
+ [
1342
+ {
1343
+ "providerId": "qwen-provider",
1344
+ "modelId": "qwen3-coder-plus",
1345
+ "keyId": "key1",
1346
+ "actualKey": "default",
1347
+ "inputProtocol": "openai",
1348
+ "outputProtocol": "openai"
1349
+ }
1350
+ ]
1351
+ ],
1352
+ "default": [
1353
+ [
1354
+ {
1355
+ "providerId": "qwen-provider",
1356
+ "modelId": "qwen3-coder-plus",
1357
+ "keyId": "key1",
1358
+ "actualKey": "default",
1359
+ "inputProtocol": "openai",
1360
+ "outputProtocol": "openai"
1361
+ }
1362
+ ]
1363
+ ],
1364
+ "longcontext": [
1365
+ [
1366
+ {
1367
+ "providerId": "qwen-provider",
1368
+ "modelId": "qwen3-coder-plus",
1369
+ "keyId": "key1",
1370
+ "actualKey": "default",
1371
+ "inputProtocol": "openai",
1372
+ "outputProtocol": "openai"
1373
+ }
1374
+ ]
1375
+ ],
1376
+ "thinking": [
1377
+ [
1378
+ {
1379
+ "providerId": "qwen-provider",
1380
+ "modelId": "qwen3-4b-thinking-2507-mlx",
1381
+ "keyId": "key1",
1382
+ "actualKey": "default",
1383
+ "inputProtocol": "openai",
1384
+ "outputProtocol": "openai"
1385
+ }
1386
+ ]
1387
+ ],
1388
+ "tools": [
1389
+ [
1390
+ {
1391
+ "providerId": "qwen-provider",
1392
+ "modelId": "qwen3-coder-plus",
1393
+ "keyId": "key1",
1394
+ "actualKey": "default",
1395
+ "inputProtocol": "openai",
1396
+ "outputProtocol": "openai"
1397
+ }
1398
+ ]
1399
+ ],
1400
+ "vision": [
1401
+ [
1402
+ {
1403
+ "providerId": "qwen-provider",
1404
+ "modelId": "qwen3-coder-plus",
1405
+ "keyId": "key1",
1406
+ "actualKey": "default",
1407
+ "inputProtocol": "openai",
1408
+ "outputProtocol": "openai"
1409
+ }
1410
+ ]
1411
+ ],
1412
+ "websearch": [
1413
+ [
1414
+ {
1415
+ "providerId": "qwen-provider",
1416
+ "modelId": "qwen3-coder-plus",
1417
+ "keyId": "key1",
1418
+ "actualKey": "default",
1419
+ "inputProtocol": "openai",
1420
+ "outputProtocol": "openai"
1421
+ }
1422
+ ]
1423
+ ]
1424
+ },
1425
+ "pipelineConfigs": {},
1426
+ "moduleConfigs": {
1427
+ "virtualrouter": {
1428
+ "enabled": true,
1429
+ "config": {
1430
+ "moduleType": "virtual-router",
1431
+ "inputProtocol": "openai",
1432
+ "outputProtocol": "openai"
1433
+ }
1434
+ },
1435
+ "httpserver": {
1436
+ "enabled": true,
1437
+ "config": {
1438
+ "port": 5522
1439
+ }
1440
+ },
1441
+ "pipelineConfigs": {
1442
+ "enabled": true,
1443
+ "config": {
1444
+ "endpoint-based": {
1445
+ "/v1/chat/completions": {
1446
+ "workflow": {
1447
+ "config": {
1448
+ "enableStreaming": true,
1449
+ "reasoningPolicy": {
1450
+ "openai": {
1451
+ "disposition": "keep"
1452
+ }
1453
+ }
1454
+ },
1455
+ "enabled": true,
1456
+ "type": "streaming-control"
1457
+ }
1458
+ },
1459
+ "/v1/messages": {
1460
+ "llmSwitch": {
1461
+ "config": {},
1462
+ "type": "llmswitch-anthropic-openai"
1463
+ },
1464
+ "workflow": {
1465
+ "config": {
1466
+ "enableStreaming": true,
1467
+ "reasoningPolicy": {
1468
+ "anthropic": {
1469
+ "disposition": "drop",
1470
+ "strict": true
1471
+ }
1472
+ }
1473
+ },
1474
+ "enabled": true,
1475
+ "type": "streaming-control"
1476
+ }
1477
+ },
1478
+ "qwen-provider.qwen3-30b-a3b-instruct-2507-mlx": {
1479
+ "compatibility": {
1480
+ "config": {
1481
+ "streamingEnabled": true,
1482
+ "toolsEnabled": true
1483
+ },
1484
+ "enabled": true,
1485
+ "type": "qwen-compatibility"
1486
+ },
1487
+ "llmSwitch": {
1488
+ "config": {},
1489
+ "enabled": true,
1490
+ "type": "llmswitch-unified"
1491
+ }
1492
+ },
1493
+ "qwen-provider.qwen3-4b-thinking-2507-mlx": {
1494
+ "compatibility": {
1495
+ "config": {
1496
+ "streamingEnabled": true,
1497
+ "toolsEnabled": true
1498
+ },
1499
+ "enabled": true,
1500
+ "type": "qwen-compatibility"
1501
+ },
1502
+ "llmSwitch": {
1503
+ "config": {},
1504
+ "enabled": true,
1505
+ "type": "llmswitch-unified"
1506
+ }
1507
+ },
1508
+ "qwen-provider.qwen3-coder-480b-a35b-instruct-mlx": {
1509
+ "compatibility": {
1510
+ "config": {
1511
+ "streamingEnabled": true,
1512
+ "toolsEnabled": true
1513
+ },
1514
+ "enabled": true,
1515
+ "type": "qwen-compatibility"
1516
+ },
1517
+ "llmSwitch": {
1518
+ "config": {},
1519
+ "enabled": true,
1520
+ "type": "llmswitch-unified"
1521
+ }
1522
+ },
1523
+ "qwen-provider.qwen3-coder-plus": {
1524
+ "compatibility": {
1525
+ "config": {
1526
+ "streamingEnabled": true,
1527
+ "toolsEnabled": true
1528
+ },
1529
+ "enabled": true,
1530
+ "type": "qwen-compatibility"
1531
+ },
1532
+ "llmSwitch": {
1533
+ "config": {},
1534
+ "enabled": true,
1535
+ "type": "llmswitch-unified"
1536
+ }
1537
+ }
1538
+ }
1539
+ }
1540
+ },
1541
+ "stableSorting": {
1542
+ "enabled": true,
1543
+ "config": {
1544
+ "enabled": true,
1545
+ "sortKeyMappings": true,
1546
+ "sortProviders": true,
1547
+ "sortRouting": true
1548
+ }
1549
+ }
1550
+ }
1551
+ },
1552
+ "_metadata": {
1553
+ "version": "2.0.0",
1554
+ "engine": "routecodex-config-engine",
1555
+ "timestamp": 1760321473341,
1556
+ "configPath": "/Users/fanzhang/.routecodex/config/qwen-5522-qwen3-coder-plus.json"
1557
+ },
1558
+ "engineVersion": "legacy"
1559
+ }