@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.
- package/README.md +51 -1427
- package/dist/build-info.js +2 -2
- package/dist/cli/commands/config.js +3 -0
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/init.js +3 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/config/bundled-docs.js +2 -2
- package/dist/cli/config/bundled-docs.js.map +1 -1
- package/dist/cli/config/init-config.d.ts +2 -1
- package/dist/cli/config/init-config.js +33 -1
- package/dist/cli/config/init-config.js.map +1 -1
- package/dist/client/gemini/gemini-protocol-client.js +2 -1
- package/dist/client/gemini/gemini-protocol-client.js.map +1 -1
- package/dist/client/gemini-cli/gemini-cli-protocol-client.js +39 -15
- package/dist/client/gemini-cli/gemini-cli-protocol-client.js.map +1 -1
- package/dist/client/openai/chat-protocol-client.js +2 -1
- package/dist/client/openai/chat-protocol-client.js.map +1 -1
- package/dist/client/responses/responses-protocol-client.js +2 -1
- package/dist/client/responses/responses-protocol-client.js.map +1 -1
- package/dist/error-handling/quiet-error-handling-center.js +46 -8
- package/dist/error-handling/quiet-error-handling-center.js.map +1 -1
- package/dist/manager/modules/quota/provider-quota-daemon.events.js +4 -2
- package/dist/manager/modules/quota/provider-quota-daemon.events.js.map +1 -1
- package/dist/manager/modules/quota/provider-quota-daemon.model-backoff.js +9 -6
- package/dist/manager/modules/quota/provider-quota-daemon.model-backoff.js.map +1 -1
- package/dist/providers/auth/antigravity-userinfo-helper.d.ts +2 -1
- package/dist/providers/auth/antigravity-userinfo-helper.js +25 -4
- package/dist/providers/auth/antigravity-userinfo-helper.js.map +1 -1
- package/dist/providers/auth/tokenfile-auth.d.ts +2 -0
- package/dist/providers/auth/tokenfile-auth.js +33 -1
- package/dist/providers/auth/tokenfile-auth.js.map +1 -1
- package/dist/providers/core/config/camoufox-launcher.d.ts +5 -0
- package/dist/providers/core/config/camoufox-launcher.js +5 -0
- package/dist/providers/core/config/camoufox-launcher.js.map +1 -1
- package/dist/providers/core/config/service-profiles.js +7 -18
- package/dist/providers/core/config/service-profiles.js.map +1 -1
- package/dist/providers/core/runtime/base-provider.d.ts +0 -5
- package/dist/providers/core/runtime/base-provider.js +26 -112
- package/dist/providers/core/runtime/base-provider.js.map +1 -1
- package/dist/providers/core/runtime/gemini-cli-http-provider.d.ts +7 -0
- package/dist/providers/core/runtime/gemini-cli-http-provider.js +362 -93
- package/dist/providers/core/runtime/gemini-cli-http-provider.js.map +1 -1
- package/dist/providers/core/runtime/http-request-executor.d.ts +3 -0
- package/dist/providers/core/runtime/http-request-executor.js +110 -38
- package/dist/providers/core/runtime/http-request-executor.js.map +1 -1
- package/dist/providers/core/runtime/http-transport-provider.d.ts +3 -0
- package/dist/providers/core/runtime/http-transport-provider.js +80 -37
- package/dist/providers/core/runtime/http-transport-provider.js.map +1 -1
- package/dist/providers/core/runtime/rate-limit-manager.d.ts +1 -12
- package/dist/providers/core/runtime/rate-limit-manager.js +4 -77
- package/dist/providers/core/runtime/rate-limit-manager.js.map +1 -1
- package/dist/providers/core/utils/http-client.js +20 -43
- package/dist/providers/core/utils/http-client.js.map +1 -1
- package/dist/server/handlers/handler-utils.js +5 -1
- package/dist/server/handlers/handler-utils.js.map +1 -1
- package/dist/server/handlers/responses-handler.js +1 -1
- package/dist/server/handlers/responses-handler.js.map +1 -1
- package/dist/server/runtime/http-server/index.js +68 -29
- package/dist/server/runtime/http-server/index.js.map +1 -1
- package/dist/server/runtime/http-server/request-executor.js +50 -6
- package/dist/server/runtime/http-server/request-executor.js.map +1 -1
- package/dist/server/runtime/http-server/routes.js +4 -1
- package/dist/server/runtime/http-server/routes.js.map +1 -1
- package/dist/utils/strip-internal-keys.d.ts +12 -0
- package/dist/utils/strip-internal-keys.js +28 -0
- package/dist/utils/strip-internal-keys.js.map +1 -0
- package/docs/CHAT_PROCESS_PROTOCOL_AND_PIPELINE.md +221 -0
- package/docs/antigravity-gemini-format-cleanup.md +102 -0
- package/docs/antigravity-routing-contract.md +31 -0
- package/docs/chat-semantic-expansion-plan.md +8 -6
- package/docs/glm-chat-completions.md +1 -1
- package/docs/servertool-framework.md +65 -0
- package/docs/v2-architecture/README.md +6 -8
- package/docs/verified-configs/README.md +60 -0
- package/docs/verified-configs/v0.45.0/README.md +244 -0
- package/docs/verified-configs/v0.45.0/lmstudio-5521-gpt-oss-20b-mlx.json +135 -0
- package/docs/verified-configs/v0.45.0/merged-config.5521.json +1205 -0
- package/docs/verified-configs/v0.45.0/merged-config.qwen-5522.json +1559 -0
- package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus-final.json +221 -0
- package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus-fixed.json +242 -0
- package/docs/verified-configs/v0.45.0/qwen-5522-qwen3-coder-plus.json +242 -0
- package/package.json +17 -11
- package/scripts/build-core.mjs +3 -1
- package/scripts/ci/repo-sanity.mjs +138 -0
- package/scripts/mock-provider/run-regressions.mjs +157 -1
- package/scripts/run-bg.sh +0 -14
- package/scripts/tests/ci-jest.mjs +119 -0
- package/scripts/tools-dev/responses-debug-client/README.md +23 -0
- package/scripts/tools-dev/responses-debug-client/payloads/poem.json +13 -0
- package/scripts/tools-dev/responses-debug-client/payloads/sample-no-tools.json +98 -0
- package/scripts/tools-dev/responses-debug-client/payloads/text.json +13 -0
- package/scripts/tools-dev/responses-debug-client/payloads/tool.json +27 -0
- package/scripts/tools-dev/responses-debug-client/run.mjs +65 -0
- package/scripts/tools-dev/responses-debug-client/src/index.ts +281 -0
- package/scripts/tools-dev/run-llmswitch-chat.mjs +53 -0
- package/scripts/tools-dev/server-tools-dev/run-web-fetch.mjs +65 -0
- package/scripts/vendor-core.mjs +13 -3
- package/scripts/test-fc-responses.mjs +0 -66
- package/scripts/test-guidance.mjs +0 -100
- package/scripts/test-iflow-web-search.mjs +0 -141
- package/scripts/test-iflow.mjs +0 -379
- package/scripts/test-tool-exec.mjs +0 -26
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"port": 5520,
|
|
4
|
+
"host": "0.0.0.0",
|
|
5
|
+
"virtualrouter": {
|
|
6
|
+
"inputProtocol": "openai",
|
|
7
|
+
"outputProtocol": "openai",
|
|
8
|
+
"providers": {
|
|
9
|
+
"qwen-provider": {
|
|
10
|
+
"id": "qwen-provider",
|
|
11
|
+
"type": "qwen",
|
|
12
|
+
"enabled": true,
|
|
13
|
+
"baseURL": "https://portal.qwen.ai/v1",
|
|
14
|
+
"auth": {
|
|
15
|
+
"type": "oauth",
|
|
16
|
+
"clientId": "f0304373b74a44d2b584a3fb70ca9e56",
|
|
17
|
+
"deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
|
|
18
|
+
"tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
|
|
19
|
+
"scopes": ["openid", "profile", "email", "model.completion"],
|
|
20
|
+
"tokenFile": "/Users/fanzhang/.qwen/oauth_creds.json"
|
|
21
|
+
},
|
|
22
|
+
"compatibility": {
|
|
23
|
+
"type": "qwen-compatibility",
|
|
24
|
+
"config": {
|
|
25
|
+
"toolsEnabled": true,
|
|
26
|
+
"streamingEnabled": true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"models": {
|
|
30
|
+
"qwen3-coder-plus": {
|
|
31
|
+
"maxContext": 262144,
|
|
32
|
+
"maxTokens": 262144,
|
|
33
|
+
"temperature": 0.7,
|
|
34
|
+
"supportsStreaming": true,
|
|
35
|
+
"supportsTools": true
|
|
36
|
+
},
|
|
37
|
+
"qwen3-4b-thinking-2507-mlx": {
|
|
38
|
+
"maxContext": 262144,
|
|
39
|
+
"maxTokens": 262144,
|
|
40
|
+
"temperature": 0.7,
|
|
41
|
+
"supportsStreaming": true,
|
|
42
|
+
"supportsTools": true
|
|
43
|
+
},
|
|
44
|
+
"qwen3-30b-a3b-instruct-2507-mlx": {
|
|
45
|
+
"maxContext": 262144,
|
|
46
|
+
"maxTokens": 262144,
|
|
47
|
+
"temperature": 0.7,
|
|
48
|
+
"supportsStreaming": true,
|
|
49
|
+
"supportsTools": true
|
|
50
|
+
},
|
|
51
|
+
"qwen3-coder-480b-a35b-instruct-mlx": {
|
|
52
|
+
"maxContext": 262144,
|
|
53
|
+
"maxTokens": 262144,
|
|
54
|
+
"temperature": 0.7,
|
|
55
|
+
"supportsStreaming": true,
|
|
56
|
+
"supportsTools": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"timeout": 60000,
|
|
60
|
+
"retryAttempts": 3
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"routing": {
|
|
64
|
+
"default": [
|
|
65
|
+
"qwen-provider.qwen3-coder-plus"
|
|
66
|
+
],
|
|
67
|
+
"anthropic": [
|
|
68
|
+
"qwen-provider.qwen3-coder-plus"
|
|
69
|
+
],
|
|
70
|
+
"background": [
|
|
71
|
+
"qwen-provider.qwen3-coder-plus"
|
|
72
|
+
],
|
|
73
|
+
"coding": [
|
|
74
|
+
"qwen-provider.qwen3-coder-plus"
|
|
75
|
+
],
|
|
76
|
+
"longcontext": [
|
|
77
|
+
"qwen-provider.qwen3-coder-plus"
|
|
78
|
+
],
|
|
79
|
+
"thinking": [
|
|
80
|
+
"qwen-provider.qwen3-4b-thinking-2507-mlx"
|
|
81
|
+
],
|
|
82
|
+
"tools": [
|
|
83
|
+
"qwen-provider.qwen3-coder-plus"
|
|
84
|
+
],
|
|
85
|
+
"vision": [
|
|
86
|
+
"qwen-provider.qwen3-coder-plus"
|
|
87
|
+
],
|
|
88
|
+
"websearch": [
|
|
89
|
+
"qwen-provider.qwen3-coder-plus"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"dryRun": {
|
|
93
|
+
"enabled": false,
|
|
94
|
+
"includeLoadBalancerDetails": false,
|
|
95
|
+
"includeHealthStatus": false,
|
|
96
|
+
"includeWeightCalculation": false,
|
|
97
|
+
"simulateProviderHealth": false
|
|
98
|
+
},
|
|
99
|
+
"llmSwitch": {
|
|
100
|
+
"type": "llmswitch-unified",
|
|
101
|
+
"config": {
|
|
102
|
+
"protocolDetection": "endpoint-based",
|
|
103
|
+
"defaultProtocol": "openai",
|
|
104
|
+
"endpointMapping": {
|
|
105
|
+
"anthropic": [
|
|
106
|
+
"/v1/anthropic/messages",
|
|
107
|
+
"/v1/messages"
|
|
108
|
+
],
|
|
109
|
+
"openai": [
|
|
110
|
+
"/v1/chat/completions",
|
|
111
|
+
"/v1/completions"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"pipelineConfigs": {
|
|
118
|
+
"endpoint-based": {
|
|
119
|
+
"/v1/messages": {
|
|
120
|
+
"llmSwitch": {
|
|
121
|
+
"type": "llmswitch-anthropic-openai",
|
|
122
|
+
"config": {}
|
|
123
|
+
},
|
|
124
|
+
"workflow": {
|
|
125
|
+
"type": "streaming-control",
|
|
126
|
+
"enabled": true,
|
|
127
|
+
"config": {
|
|
128
|
+
"enableStreaming": true,
|
|
129
|
+
"reasoningPolicy": {
|
|
130
|
+
"anthropic": {
|
|
131
|
+
"disposition": "drop",
|
|
132
|
+
"strict": true
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"/v1/chat/completions": {
|
|
139
|
+
"workflow": {
|
|
140
|
+
"type": "streaming-control",
|
|
141
|
+
"enabled": true,
|
|
142
|
+
"config": {
|
|
143
|
+
"enableStreaming": true,
|
|
144
|
+
"reasoningPolicy": {
|
|
145
|
+
"openai": {
|
|
146
|
+
"disposition": "keep"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"qwen-provider.qwen3-coder-plus": {
|
|
153
|
+
"llmSwitch": {
|
|
154
|
+
"type": "llmswitch-unified",
|
|
155
|
+
"enabled": true,
|
|
156
|
+
"config": {}
|
|
157
|
+
},
|
|
158
|
+
"compatibility": {
|
|
159
|
+
"type": "qwen-compatibility",
|
|
160
|
+
"enabled": true,
|
|
161
|
+
"config": {
|
|
162
|
+
"toolsEnabled": true,
|
|
163
|
+
"streamingEnabled": true
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"qwen-provider.qwen3-4b-thinking-2507-mlx": {
|
|
168
|
+
"llmSwitch": {
|
|
169
|
+
"type": "llmswitch-unified",
|
|
170
|
+
"enabled": true,
|
|
171
|
+
"config": {}
|
|
172
|
+
},
|
|
173
|
+
"compatibility": {
|
|
174
|
+
"type": "qwen-compatibility",
|
|
175
|
+
"enabled": true,
|
|
176
|
+
"config": {
|
|
177
|
+
"toolsEnabled": true,
|
|
178
|
+
"streamingEnabled": true
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"qwen-provider.qwen3-30b-a3b-instruct-2507-mlx": {
|
|
183
|
+
"llmSwitch": {
|
|
184
|
+
"type": "llmswitch-unified",
|
|
185
|
+
"enabled": true,
|
|
186
|
+
"config": {}
|
|
187
|
+
},
|
|
188
|
+
"compatibility": {
|
|
189
|
+
"type": "qwen-compatibility",
|
|
190
|
+
"enabled": true,
|
|
191
|
+
"config": {
|
|
192
|
+
"toolsEnabled": true,
|
|
193
|
+
"streamingEnabled": true
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"qwen-provider.qwen3-coder-480b-a35b-instruct-mlx": {
|
|
198
|
+
"llmSwitch": {
|
|
199
|
+
"type": "llmswitch-unified",
|
|
200
|
+
"enabled": true,
|
|
201
|
+
"config": {}
|
|
202
|
+
},
|
|
203
|
+
"compatibility": {
|
|
204
|
+
"type": "qwen-compatibility",
|
|
205
|
+
"enabled": true,
|
|
206
|
+
"config": {
|
|
207
|
+
"toolsEnabled": true,
|
|
208
|
+
"streamingEnabled": true
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"schemaVersion": "1.0.0",
|
|
215
|
+
"stableSorting": {
|
|
216
|
+
"enabled": true,
|
|
217
|
+
"sortKeyMappings": true,
|
|
218
|
+
"sortProviders": true,
|
|
219
|
+
"sortRouting": true
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"port": 5520,
|
|
4
|
+
"host": "0.0.0.0",
|
|
5
|
+
"virtualrouter": {
|
|
6
|
+
"inputProtocol": "openai",
|
|
7
|
+
"outputProtocol": "openai",
|
|
8
|
+
"providers": {
|
|
9
|
+
"qwen-provider": {
|
|
10
|
+
"id": "qwen-provider",
|
|
11
|
+
"type": "qwen",
|
|
12
|
+
"enabled": true,
|
|
13
|
+
"baseURL": "https://portal.qwen.ai/v1",
|
|
14
|
+
"auth": {
|
|
15
|
+
"type": "oauth",
|
|
16
|
+
"clientId": "f0304373b74a44d2b584a3fb70ca9e56",
|
|
17
|
+
"deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
|
|
18
|
+
"tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
|
|
19
|
+
"scopes": ["openid", "profile", "email", "model.completion"],
|
|
20
|
+
"tokenFile": "/Users/fanzhang/.qwen/oauth_creds.json"
|
|
21
|
+
},
|
|
22
|
+
"models": {
|
|
23
|
+
"qwen3-coder-plus": {
|
|
24
|
+
"maxContext": 262144,
|
|
25
|
+
"maxTokens": 262144,
|
|
26
|
+
"temperature": 0.7,
|
|
27
|
+
"supportsStreaming": true,
|
|
28
|
+
"supportsTools": true,
|
|
29
|
+
"compatibility": {
|
|
30
|
+
"type": "qwen-compatibility",
|
|
31
|
+
"config": {
|
|
32
|
+
"toolsEnabled": true,
|
|
33
|
+
"streamingEnabled": true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"qwen3-4b-thinking-2507-mlx": {
|
|
38
|
+
"maxContext": 262144,
|
|
39
|
+
"maxTokens": 262144,
|
|
40
|
+
"temperature": 0.7,
|
|
41
|
+
"supportsStreaming": true,
|
|
42
|
+
"supportsTools": true,
|
|
43
|
+
"compatibility": {
|
|
44
|
+
"type": "qwen-compatibility",
|
|
45
|
+
"config": {
|
|
46
|
+
"toolsEnabled": true,
|
|
47
|
+
"streamingEnabled": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"qwen3-30b-a3b-instruct-2507-mlx": {
|
|
52
|
+
"maxContext": 262144,
|
|
53
|
+
"maxTokens": 262144,
|
|
54
|
+
"temperature": 0.7,
|
|
55
|
+
"supportsStreaming": true,
|
|
56
|
+
"supportsTools": true,
|
|
57
|
+
"compatibility": {
|
|
58
|
+
"type": "qwen-compatibility",
|
|
59
|
+
"config": {
|
|
60
|
+
"toolsEnabled": true,
|
|
61
|
+
"streamingEnabled": true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"qwen3-coder-480b-a35b-instruct-mlx": {
|
|
66
|
+
"maxContext": 262144,
|
|
67
|
+
"maxTokens": 262144,
|
|
68
|
+
"temperature": 0.7,
|
|
69
|
+
"supportsStreaming": true,
|
|
70
|
+
"supportsTools": true,
|
|
71
|
+
"compatibility": {
|
|
72
|
+
"type": "qwen-compatibility",
|
|
73
|
+
"config": {
|
|
74
|
+
"toolsEnabled": true,
|
|
75
|
+
"streamingEnabled": true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"timeout": 60000,
|
|
81
|
+
"retryAttempts": 3
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"routing": {
|
|
85
|
+
"default": [
|
|
86
|
+
"qwen-provider.qwen3-coder-plus"
|
|
87
|
+
],
|
|
88
|
+
"anthropic": [
|
|
89
|
+
"qwen-provider.qwen3-coder-plus"
|
|
90
|
+
],
|
|
91
|
+
"background": [
|
|
92
|
+
"qwen-provider.qwen3-coder-plus"
|
|
93
|
+
],
|
|
94
|
+
"coding": [
|
|
95
|
+
"qwen-provider.qwen3-coder-plus"
|
|
96
|
+
],
|
|
97
|
+
"longcontext": [
|
|
98
|
+
"qwen-provider.qwen3-coder-plus"
|
|
99
|
+
],
|
|
100
|
+
"thinking": [
|
|
101
|
+
"qwen-provider.qwen3-4b-thinking-2507-mlx"
|
|
102
|
+
],
|
|
103
|
+
"tools": [
|
|
104
|
+
"qwen-provider.qwen3-coder-plus"
|
|
105
|
+
],
|
|
106
|
+
"vision": [
|
|
107
|
+
"qwen-provider.qwen3-coder-plus"
|
|
108
|
+
],
|
|
109
|
+
"websearch": [
|
|
110
|
+
"qwen-provider.qwen3-coder-plus"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"dryRun": {
|
|
114
|
+
"enabled": false,
|
|
115
|
+
"includeLoadBalancerDetails": false,
|
|
116
|
+
"includeHealthStatus": false,
|
|
117
|
+
"includeWeightCalculation": false,
|
|
118
|
+
"simulateProviderHealth": false
|
|
119
|
+
},
|
|
120
|
+
"llmSwitch": {
|
|
121
|
+
"type": "llmswitch-unified",
|
|
122
|
+
"config": {
|
|
123
|
+
"protocolDetection": "endpoint-based",
|
|
124
|
+
"defaultProtocol": "openai",
|
|
125
|
+
"endpointMapping": {
|
|
126
|
+
"anthropic": [
|
|
127
|
+
"/v1/anthropic/messages",
|
|
128
|
+
"/v1/messages"
|
|
129
|
+
],
|
|
130
|
+
"openai": [
|
|
131
|
+
"/v1/chat/completions",
|
|
132
|
+
"/v1/completions"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"pipelineConfigs": {
|
|
139
|
+
"endpoint-based": {
|
|
140
|
+
"/v1/messages": {
|
|
141
|
+
"llmSwitch": {
|
|
142
|
+
"type": "llmswitch-anthropic-openai",
|
|
143
|
+
"config": {}
|
|
144
|
+
},
|
|
145
|
+
"workflow": {
|
|
146
|
+
"type": "streaming-control",
|
|
147
|
+
"enabled": true,
|
|
148
|
+
"config": {
|
|
149
|
+
"enableStreaming": true,
|
|
150
|
+
"reasoningPolicy": {
|
|
151
|
+
"anthropic": {
|
|
152
|
+
"disposition": "drop",
|
|
153
|
+
"strict": true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"/v1/chat/completions": {
|
|
160
|
+
"workflow": {
|
|
161
|
+
"type": "streaming-control",
|
|
162
|
+
"enabled": true,
|
|
163
|
+
"config": {
|
|
164
|
+
"enableStreaming": true,
|
|
165
|
+
"reasoningPolicy": {
|
|
166
|
+
"openai": {
|
|
167
|
+
"disposition": "keep"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"qwen-provider.qwen3-coder-plus": {
|
|
174
|
+
"llmSwitch": {
|
|
175
|
+
"type": "llmswitch-unified",
|
|
176
|
+
"enabled": true,
|
|
177
|
+
"config": {}
|
|
178
|
+
},
|
|
179
|
+
"compatibility": {
|
|
180
|
+
"type": "qwen-compatibility",
|
|
181
|
+
"enabled": true,
|
|
182
|
+
"config": {
|
|
183
|
+
"toolsEnabled": true,
|
|
184
|
+
"streamingEnabled": true
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"qwen-provider.qwen3-4b-thinking-2507-mlx": {
|
|
189
|
+
"llmSwitch": {
|
|
190
|
+
"type": "llmswitch-unified",
|
|
191
|
+
"enabled": true,
|
|
192
|
+
"config": {}
|
|
193
|
+
},
|
|
194
|
+
"compatibility": {
|
|
195
|
+
"type": "qwen-compatibility",
|
|
196
|
+
"enabled": true,
|
|
197
|
+
"config": {
|
|
198
|
+
"toolsEnabled": true,
|
|
199
|
+
"streamingEnabled": true
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"qwen-provider.qwen3-30b-a3b-instruct-2507-mlx": {
|
|
204
|
+
"llmSwitch": {
|
|
205
|
+
"type": "llmswitch-unified",
|
|
206
|
+
"enabled": true,
|
|
207
|
+
"config": {}
|
|
208
|
+
},
|
|
209
|
+
"compatibility": {
|
|
210
|
+
"type": "qwen-compatibility",
|
|
211
|
+
"enabled": true,
|
|
212
|
+
"config": {
|
|
213
|
+
"toolsEnabled": true,
|
|
214
|
+
"streamingEnabled": true
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"qwen-provider.qwen3-coder-480b-a35b-instruct-mlx": {
|
|
219
|
+
"llmSwitch": {
|
|
220
|
+
"type": "llmswitch-unified",
|
|
221
|
+
"enabled": true,
|
|
222
|
+
"config": {}
|
|
223
|
+
},
|
|
224
|
+
"compatibility": {
|
|
225
|
+
"type": "qwen-compatibility",
|
|
226
|
+
"enabled": true,
|
|
227
|
+
"config": {
|
|
228
|
+
"toolsEnabled": true,
|
|
229
|
+
"streamingEnabled": true
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"schemaVersion": "1.0.0",
|
|
236
|
+
"stableSorting": {
|
|
237
|
+
"enabled": true,
|
|
238
|
+
"sortKeyMappings": true,
|
|
239
|
+
"sortProviders": true,
|
|
240
|
+
"sortRouting": true
|
|
241
|
+
}
|
|
242
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"port": 5522,
|
|
4
|
+
"host": "0.0.0.0",
|
|
5
|
+
"virtualrouter": {
|
|
6
|
+
"inputProtocol": "openai",
|
|
7
|
+
"outputProtocol": "openai",
|
|
8
|
+
"providers": {
|
|
9
|
+
"qwen-provider": {
|
|
10
|
+
"id": "qwen-provider",
|
|
11
|
+
"type": "qwen",
|
|
12
|
+
"enabled": true,
|
|
13
|
+
"baseURL": "https://portal.qwen.ai/v1",
|
|
14
|
+
"auth": {
|
|
15
|
+
"type": "oauth",
|
|
16
|
+
"clientId": "f0304373b74a44d2b584a3fb70ca9e56",
|
|
17
|
+
"deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
|
|
18
|
+
"tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
|
|
19
|
+
"scopes": ["openid", "profile", "email", "model.completion"],
|
|
20
|
+
"tokenFile": "/Users/fanzhang/.qwen/oauth_creds.json"
|
|
21
|
+
},
|
|
22
|
+
"models": {
|
|
23
|
+
"qwen3-coder-plus": {
|
|
24
|
+
"maxContext": 262144,
|
|
25
|
+
"maxTokens": 262144,
|
|
26
|
+
"temperature": 0.7,
|
|
27
|
+
"supportsStreaming": true,
|
|
28
|
+
"supportsTools": true,
|
|
29
|
+
"compatibility": {
|
|
30
|
+
"type": "qwen-compatibility",
|
|
31
|
+
"config": {
|
|
32
|
+
"toolsEnabled": true,
|
|
33
|
+
"streamingEnabled": true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"qwen3-4b-thinking-2507-mlx": {
|
|
38
|
+
"maxContext": 262144,
|
|
39
|
+
"maxTokens": 262144,
|
|
40
|
+
"temperature": 0.7,
|
|
41
|
+
"supportsStreaming": true,
|
|
42
|
+
"supportsTools": true,
|
|
43
|
+
"compatibility": {
|
|
44
|
+
"type": "qwen-compatibility",
|
|
45
|
+
"config": {
|
|
46
|
+
"toolsEnabled": true,
|
|
47
|
+
"streamingEnabled": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"qwen3-30b-a3b-instruct-2507-mlx": {
|
|
52
|
+
"maxContext": 262144,
|
|
53
|
+
"maxTokens": 262144,
|
|
54
|
+
"temperature": 0.7,
|
|
55
|
+
"supportsStreaming": true,
|
|
56
|
+
"supportsTools": true,
|
|
57
|
+
"compatibility": {
|
|
58
|
+
"type": "qwen-compatibility",
|
|
59
|
+
"config": {
|
|
60
|
+
"toolsEnabled": true,
|
|
61
|
+
"streamingEnabled": true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"qwen3-coder-480b-a35b-instruct-mlx": {
|
|
66
|
+
"maxContext": 262144,
|
|
67
|
+
"maxTokens": 262144,
|
|
68
|
+
"temperature": 0.7,
|
|
69
|
+
"supportsStreaming": true,
|
|
70
|
+
"supportsTools": true,
|
|
71
|
+
"compatibility": {
|
|
72
|
+
"type": "qwen-compatibility",
|
|
73
|
+
"config": {
|
|
74
|
+
"toolsEnabled": true,
|
|
75
|
+
"streamingEnabled": true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"timeout": 60000,
|
|
81
|
+
"retryAttempts": 3
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"routing": {
|
|
85
|
+
"default": [
|
|
86
|
+
"qwen-provider.qwen3-coder-plus"
|
|
87
|
+
],
|
|
88
|
+
"anthropic": [
|
|
89
|
+
"qwen-provider.qwen3-coder-plus"
|
|
90
|
+
],
|
|
91
|
+
"background": [
|
|
92
|
+
"qwen-provider.qwen3-coder-plus"
|
|
93
|
+
],
|
|
94
|
+
"coding": [
|
|
95
|
+
"qwen-provider.qwen3-coder-plus"
|
|
96
|
+
],
|
|
97
|
+
"longcontext": [
|
|
98
|
+
"qwen-provider.qwen3-coder-plus"
|
|
99
|
+
],
|
|
100
|
+
"thinking": [
|
|
101
|
+
"qwen-provider.qwen3-4b-thinking-2507-mlx"
|
|
102
|
+
],
|
|
103
|
+
"tools": [
|
|
104
|
+
"qwen-provider.qwen3-coder-plus"
|
|
105
|
+
],
|
|
106
|
+
"vision": [
|
|
107
|
+
"qwen-provider.qwen3-coder-plus"
|
|
108
|
+
],
|
|
109
|
+
"websearch": [
|
|
110
|
+
"qwen-provider.qwen3-coder-plus"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"dryRun": {
|
|
114
|
+
"enabled": false,
|
|
115
|
+
"includeLoadBalancerDetails": false,
|
|
116
|
+
"includeHealthStatus": false,
|
|
117
|
+
"includeWeightCalculation": false,
|
|
118
|
+
"simulateProviderHealth": false
|
|
119
|
+
},
|
|
120
|
+
"llmSwitch": {
|
|
121
|
+
"type": "llmswitch-unified",
|
|
122
|
+
"config": {
|
|
123
|
+
"protocolDetection": "endpoint-based",
|
|
124
|
+
"defaultProtocol": "openai",
|
|
125
|
+
"endpointMapping": {
|
|
126
|
+
"anthropic": [
|
|
127
|
+
"/v1/anthropic/messages",
|
|
128
|
+
"/v1/messages"
|
|
129
|
+
],
|
|
130
|
+
"openai": [
|
|
131
|
+
"/v1/chat/completions",
|
|
132
|
+
"/v1/completions"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"pipelineConfigs": {
|
|
139
|
+
"endpoint-based": {
|
|
140
|
+
"/v1/messages": {
|
|
141
|
+
"llmSwitch": {
|
|
142
|
+
"type": "llmswitch-anthropic-openai",
|
|
143
|
+
"config": {}
|
|
144
|
+
},
|
|
145
|
+
"workflow": {
|
|
146
|
+
"type": "streaming-control",
|
|
147
|
+
"enabled": true,
|
|
148
|
+
"config": {
|
|
149
|
+
"enableStreaming": true,
|
|
150
|
+
"reasoningPolicy": {
|
|
151
|
+
"anthropic": {
|
|
152
|
+
"disposition": "drop",
|
|
153
|
+
"strict": true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"/v1/chat/completions": {
|
|
160
|
+
"workflow": {
|
|
161
|
+
"type": "streaming-control",
|
|
162
|
+
"enabled": true,
|
|
163
|
+
"config": {
|
|
164
|
+
"enableStreaming": true,
|
|
165
|
+
"reasoningPolicy": {
|
|
166
|
+
"openai": {
|
|
167
|
+
"disposition": "keep"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"qwen-provider.qwen3-coder-plus": {
|
|
174
|
+
"llmSwitch": {
|
|
175
|
+
"type": "llmswitch-unified",
|
|
176
|
+
"enabled": true,
|
|
177
|
+
"config": {}
|
|
178
|
+
},
|
|
179
|
+
"compatibility": {
|
|
180
|
+
"type": "qwen-compatibility",
|
|
181
|
+
"enabled": true,
|
|
182
|
+
"config": {
|
|
183
|
+
"toolsEnabled": true,
|
|
184
|
+
"streamingEnabled": true
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"qwen-provider.qwen3-4b-thinking-2507-mlx": {
|
|
189
|
+
"llmSwitch": {
|
|
190
|
+
"type": "llmswitch-unified",
|
|
191
|
+
"enabled": true,
|
|
192
|
+
"config": {}
|
|
193
|
+
},
|
|
194
|
+
"compatibility": {
|
|
195
|
+
"type": "qwen-compatibility",
|
|
196
|
+
"enabled": true,
|
|
197
|
+
"config": {
|
|
198
|
+
"toolsEnabled": true,
|
|
199
|
+
"streamingEnabled": true
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"qwen-provider.qwen3-30b-a3b-instruct-2507-mlx": {
|
|
204
|
+
"llmSwitch": {
|
|
205
|
+
"type": "llmswitch-unified",
|
|
206
|
+
"enabled": true,
|
|
207
|
+
"config": {}
|
|
208
|
+
},
|
|
209
|
+
"compatibility": {
|
|
210
|
+
"type": "qwen-compatibility",
|
|
211
|
+
"enabled": true,
|
|
212
|
+
"config": {
|
|
213
|
+
"toolsEnabled": true,
|
|
214
|
+
"streamingEnabled": true
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"qwen-provider.qwen3-coder-480b-a35b-instruct-mlx": {
|
|
219
|
+
"llmSwitch": {
|
|
220
|
+
"type": "llmswitch-unified",
|
|
221
|
+
"enabled": true,
|
|
222
|
+
"config": {}
|
|
223
|
+
},
|
|
224
|
+
"compatibility": {
|
|
225
|
+
"type": "qwen-compatibility",
|
|
226
|
+
"enabled": true,
|
|
227
|
+
"config": {
|
|
228
|
+
"toolsEnabled": true,
|
|
229
|
+
"streamingEnabled": true
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"schemaVersion": "1.0.0",
|
|
236
|
+
"stableSorting": {
|
|
237
|
+
"enabled": true,
|
|
238
|
+
"sortKeyMappings": true,
|
|
239
|
+
"sortProviders": true,
|
|
240
|
+
"sortRouting": true
|
|
241
|
+
}
|
|
242
|
+
}
|