-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
407 lines (407 loc) · 14.8 KB
/
Copy pathpackage.json
File metadata and controls
407 lines (407 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
{
"name": "copilot-amplify",
"version": "2.2.0",
"displayName": "Copilot Amplify",
"description": "Extend GitHub Copilot Chat with additional AI model providers",
"author": "Md Mojahid",
"publisher": "mojahid2021",
"repository": {
"type": "git",
"url": "https://github.com/mojahid2021/copilot-amplify"
},
"license": "ISC",
"keywords": [
"xiaomi",
"mimo",
"glm",
"zai",
"nvidia",
"nim",
"omniroute",
"agentrouter",
"ai",
"chat",
"copilot",
"language-model",
"provider"
],
"icon": "icon.png",
"engines": {
"vscode": "^1.125.0"
},
"categories": [
"AI",
"Chat"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {
"configuration": {
"title": "Copilot Amplify",
"type": "object",
"properties": {
"copilot-amplify.customSystemPrompt": {
"type": "string",
"default": "",
"markdownDescription": "Custom system prompt or guardrail instructions to inject into chat requests across all providers."
},
"copilot-amplify.enableReasoning": {
"type": "boolean",
"default": true,
"markdownDescription": "Globally enable reasoning capabilities for supported models (e.g. DeepSeek-R1, QwQ). This applies to both the Chat panel and native Copilot Chat."
},
"copilot-amplify.requestTimeoutMs": {
"type": "number",
"default": 120000,
"minimum": 1000,
"markdownDescription": "Chat request timeout in milliseconds for fixed-catalog providers (Xiaomi MiMo, Z.ai, Groq, NVIDIA NIM). Prevents hung requests from blocking for minutes."
},
"copilot-amplify.CA-omniroute.baseUrl": {
"type": "string",
"default": "http://localhost:20128/v1",
"markdownDescription": "Base URL of the OmniRoute server. **Must include the `/v1` path** (e.g. `http://localhost:20128/v1` or `https://omniroute.example.com/v1`). The chat-completions endpoint is permanently fixed at `{baseUrl}/chat/completions`. Change this if you run OmniRoute on a different host/port."
},
"copilot-amplify.CA-omniroute.noCache": {
"type": "boolean",
"default": false,
"markdownDescription": "Send `X-OmniRoute-No-Cache: true` to bypass the semantic cache for every request. Defaults to `false` (caching enabled, so repeated requests hit the cache and cost nothing)."
},
"copilot-amplify.CA-omniroute.noMemory": {
"type": "boolean",
"default": true,
"markdownDescription": "Send `x-omniroute-no-memory: true` to skip memory + skills injection for every request, avoiding the per-call token/cost overhead. Set to `false` if you want OmniRoute memory and skills to be injected (requires a stable `sessionId` to be useful)."
},
"copilot-amplify.CA-omniroute.compression": {
"type": "string",
"default": "",
"markdownDescription": "Per-request compression override sent via `x-omniroute-compression`. Values: `off`, `default`, `engine:<id>` (e.g. `engine:rtk`), or a named combo id. Leave empty to let OmniRoute pick."
},
"copilot-amplify.CA-omniroute.sessionId": {
"type": "string",
"default": "",
"markdownDescription": "Caller-supplied session/conversation tag sent via `X-OmniRoute-Session-Id`. It is persisted to `call_logs.session_tag` for per-session cost attribution and feeds memory. Leave empty to let the extension generate one per chat conversation."
},
"copilot-amplify.CA-omniroute.progress": {
"type": "boolean",
"default": false,
"markdownDescription": "Send `X-OmniRoute-Progress: true` to opt into progress events from the server."
},
"copilot-amplify.CA-omniroute.modelCacheTtlSeconds": {
"type": "number",
"default": 300,
"minimum": 10,
"markdownDescription": "How long (in seconds) the discovered model list stays cached before refetching `GET /v1/models`."
},
"copilot-amplify.CA-omniroute.requestTimeoutMs": {
"type": "number",
"default": 120000,
"minimum": 1000,
"markdownDescription": "Chat request timeout in milliseconds (covers connection + full stream)."
},
"copilot-amplify.CA-omniroute.discoveryTimeoutMs": {
"type": "number",
"default": 8000,
"minimum": 500,
"markdownDescription": "Model discovery / connection-test timeout in milliseconds."
},
"copilot-amplify.CA-omniroute.warmupOnStartup": {
"type": "boolean",
"default": false,
"markdownDescription": "Discover OmniRoute models when the extension activates instead of on first use. Off by default to keep activation lightweight."
},
"copilot-amplify.CA-omniroute.debugLogging": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable debug-level logging for OmniRoute in the Copilot Amplify output channel."
},
"copilot-amplify.CA-agentrouter.baseUrl": {
"type": "string",
"default": "https://agentrouter.org/v1",
"markdownDescription": "OpenAI-compatible base URL of the AgentRouter gateway. **Must include the `/v1` path** (e.g. `https://agentrouter.org/v1`). Used for all non-Anthropic models (GPT, GLM, DeepSeek, etc.). Claude models use the Anthropic-native endpoint derived from this URL by stripping `/v1`."
},
"copilot-amplify.CA-agentrouter.discoveryTimeoutMs": {
"type": "number",
"default": 8000,
"minimum": 500,
"markdownDescription": "Catalog discovery / connection-test timeout in milliseconds. The provider fetches `GET {baseUrl}/api/pricing` to enumerate models and to validate credentials."
},
"copilot-amplify.CA-agentrouter.requestTimeoutMs": {
"type": "number",
"default": 120000,
"minimum": 1000,
"markdownDescription": "Chat request timeout in milliseconds (covers connection + full stream) for both the Anthropic and OpenAI-compatible transports."
},
"copilot-amplify.CA-agentrouter.cacheTtlSeconds": {
"type": "number",
"default": 300,
"minimum": 10,
"markdownDescription": "How long the discovered model list stays cached before refetching `GET {baseUrl}/api/pricing`."
},
"copilot-amplify.CA-agentrouter.warmupOnStartup": {
"type": "boolean",
"default": false,
"markdownDescription": "Discover CA-AgentRouter models when the extension activates instead of on first use. Off by default to keep activation lightweight."
},
"copilot-amplify.circuitBreaker.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Temporarily stop sending requests to a provider after repeated consecutive failures, retrying after a cooldown."
},
"copilot-amplify.circuitBreaker.failureThreshold": {
"type": "number",
"default": 5,
"minimum": 1,
"markdownDescription": "Consecutive failures before a provider's circuit opens."
},
"copilot-amplify.circuitBreaker.resetTimeoutSeconds": {
"type": "number",
"default": 30,
"minimum": 5,
"markdownDescription": "Cooldown (seconds) before a single probe request is allowed through an open circuit."
},
"copilot-amplify.debugLogging": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable debug-level logging in the Copilot Amplify output channel."
},
"copilot-amplify.CA-omniroute.logTelemetry": {
"type": "boolean",
"default": true,
"markdownDescription": "Log OmniRoute response telemetry (routing decision, provider, latency, tokens, cost, cache hit/cost-saved) to the `Omniroute` output channel. Open it with the `Copilot Amplify: Show Omniroute Telemetry` command."
}
}
},
"viewsContainers": {
"activitybar": [
{
"id": "copilot-amplify-view-container",
"title": "Copilot Amplify",
"icon": "media/icon.svg"
}
]
},
"views": {
"copilot-amplify-view-container": [
{
"id": "copilot-amplify.providers",
"name": "Providers & Models",
"type": "tree",
"icon": "media/icon.svg"
}
]
},
"menus": {
"view/title": [
{
"command": "copilot-amplify.refresh",
"when": "view == copilot-amplify.providers",
"group": "0_copilot-amplify/navigation"
}
],
"view/item/context": [
{
"command": "copilot-amplify.setApiKey",
"when": "view == copilot-amplify.providers && viewItem == 'provider'",
"group": "inline@1"
},
{
"command": "copilot-amplify.testConnection",
"when": "view == copilot-amplify.providers && viewItem == 'provider'",
"group": "inline@2"
},
{
"command": "copilot-amplify.clearApiKey",
"when": "view == copilot-amplify.providers && viewItem == 'provider'",
"group": "inline@3"
},
{
"command": "copilot-amplify.pinModel",
"when": "view == copilot-amplify.providers && viewItem == 'model'",
"group": "inline@1"
},
{
"command": "copilot-amplify.selectModel",
"when": "view == copilot-amplify.providers && (viewItem == 'model' || viewItem == 'favorite-model')",
"group": "inline@2"
},
{
"command": "copilot-amplify.unpinModel",
"when": "view == copilot-amplify.providers && viewItem == 'favorite-model'",
"group": "inline@1"
}
]
},
"languageModelChatProviders": [
{
"vendor": "LuneCode.CA-xiaomi",
"displayName": "CA-Xiaomi MiMo",
"managementCommand": "copilot-amplify.manage"
},
{
"vendor": "LuneCode.CA-glm",
"displayName": "CA-Z.ai GLM",
"managementCommand": "copilot-amplify.manage"
},
{
"vendor": "LuneCode.CA-groq",
"displayName": "CA-Groq",
"managementCommand": "copilot-amplify.manage"
},
{
"vendor": "LuneCode.CA-nvidia",
"displayName": "CA-NVIDIA NIM",
"managementCommand": "copilot-amplify.manage"
},
{
"vendor": "LuneCode.CA-omniroute",
"displayName": "CA-Omniroute",
"managementCommand": "copilot-amplify.manage"
},
{
"vendor": "LuneCode.CA-agentrouter",
"displayName": "CA-AgentRouter",
"managementCommand": "copilot-amplify.manage"
}
],
"commands": [
{
"command": "copilot-amplify.refresh",
"title": "Refresh Providers & Models",
"icon": "$(sync)"
},
{
"command": "copilot-amplify.manage",
"title": "Manage Providers...",
"icon": "$(gear)"
},
{
"command": "copilot-amplify.setApiKey",
"title": "Set API Key",
"icon": "$(key)"
},
{
"command": "copilot-amplify.testConnection",
"title": "Test Connection",
"icon": "$(plug)"
},
{
"command": "copilot-amplify.clearApiKey",
"title": "Clear API Key",
"icon": "$(trash)"
},
{
"command": "copilot-amplify.pinModel",
"title": "Pin to Favorites",
"icon": "$(star-full)"
},
{
"command": "copilot-amplify.unpinModel",
"title": "Unpin from Favorites",
"icon": "$(star-delete)"
},
{
"command": "copilot-amplify.selectModel",
"title": "Select Model",
"icon": "$(check)"
},
{
"command": "copilot-amplify.provider.click",
"title": "Open Provider",
"enablement": "false"
},
{
"command": "copilot-amplify.documentation",
"title": "Documentation & Guide"
},
{
"command": "copilot-amplify.report",
"title": "Report Issue or Feedback"
},
{
"command": "copilot-amplify.CA-omniroute.configure",
"title": "OmniRoute: Configure…",
"category": "Copilot Amplify",
"icon": "$(gear)"
},
{
"command": "copilot-amplify.CA-omniroute.editBaseUrl",
"title": "OmniRoute: Edit Base URL",
"category": "Copilot Amplify",
"icon": "$(link)"
},
{
"command": "copilot-amplify.CA-omniroute.setApiKey",
"title": "OmniRoute: Set API Key",
"category": "Copilot Amplify",
"icon": "$(key)"
},
{
"command": "copilot-amplify.CA-omniroute.removeApiKey",
"title": "OmniRoute: Remove API Key",
"category": "Copilot Amplify",
"icon": "$(trash)"
},
{
"command": "copilot-amplify.CA-omniroute.testConnection",
"title": "OmniRoute: Test Connection",
"category": "Copilot Amplify",
"icon": "$(plug)"
},
{
"command": "copilot-amplify.CA-omniroute.refreshModels",
"title": "OmniRoute: Refresh Models",
"category": "Copilot Amplify",
"icon": "$(sync)"
},
{
"command": "copilot-amplify.CA-omniroute.showDiagnostics",
"title": "OmniRoute: Show Diagnostics",
"category": "Copilot Amplify",
"icon": "$(pulse)"
},
{
"command": "copilot-amplify.CA-omniroute.resetConfiguration",
"title": "OmniRoute: Reset Configuration",
"category": "Copilot Amplify",
"icon": "$(discard)"
},
{
"command": "copilot-amplify.CA-omniroute.showTelemetry",
"title": "Show Omniroute Telemetry",
"icon": "$(output)"
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc",
"watch": "tsc -watch -p ./",
"lint": "eslint src/ tests/",
"lint:fix": "eslint src/ tests/ --fix",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"clean": "node -e \"require('fs').rmSync('out', { recursive: true, force: true }); require('fs').rmSync('tsconfig.tsbuildinfo', { force: true })\"",
"package": "vsce package",
"publish": "vsce publish"
},
"dependencies": {
"openai": "^6.48.0",
"secure-json-parse": "^4.1.0",
"ts-pattern": "^5.9.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^26.1.1",
"@types/vscode": "^1.125.0",
"@vscode/vsce": "^3.9.2",
"eslint": "^10.7.0",
"eslint-plugin-n": "^18.2.2",
"globals": "^17.7.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.64.0",
"vitest": "^3.2.7"
}
}