converse-mcp-server 2.17.0 → 2.18.0
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/package.json +1 -1
- package/src/providers/copilot.js +28 -90
package/package.json
CHANGED
package/src/providers/copilot.js
CHANGED
|
@@ -229,47 +229,8 @@ const SUPPORTED_MODELS = {
|
|
|
229
229
|
description: 'Anthropic Claude Opus 4.6 via Copilot subscription',
|
|
230
230
|
aliases: ['opus'],
|
|
231
231
|
},
|
|
232
|
-
'claude-opus-4.6-fast': {
|
|
233
|
-
modelName: 'claude-opus-4.6-fast',
|
|
234
|
-
friendlyName: 'Claude Opus 4.6 Fast (via Copilot)',
|
|
235
|
-
contextWindow: 200000,
|
|
236
|
-
maxOutputTokens: 32768,
|
|
237
|
-
supportsStreaming: true,
|
|
238
|
-
supportsImages: false,
|
|
239
|
-
supportsTemperature: false,
|
|
240
|
-
supportsWebSearch: false,
|
|
241
|
-
timeout: 300000,
|
|
242
|
-
description: 'Anthropic Claude Opus 4.6 Fast mode via Copilot subscription',
|
|
243
|
-
aliases: [],
|
|
244
|
-
},
|
|
245
232
|
|
|
246
233
|
// Google models
|
|
247
|
-
'gemini-2.5-pro': {
|
|
248
|
-
modelName: 'gemini-2.5-pro',
|
|
249
|
-
friendlyName: 'Gemini 2.5 Pro (via Copilot)',
|
|
250
|
-
contextWindow: 1048576,
|
|
251
|
-
maxOutputTokens: 65536,
|
|
252
|
-
supportsStreaming: true,
|
|
253
|
-
supportsImages: false,
|
|
254
|
-
supportsTemperature: false,
|
|
255
|
-
supportsWebSearch: false,
|
|
256
|
-
timeout: 300000,
|
|
257
|
-
description: 'Google Gemini 2.5 Pro via Copilot subscription',
|
|
258
|
-
aliases: ['gemini'],
|
|
259
|
-
},
|
|
260
|
-
'gemini-3-flash-preview': {
|
|
261
|
-
modelName: 'gemini-3-flash-preview',
|
|
262
|
-
friendlyName: 'Gemini 3 Flash Preview (via Copilot)',
|
|
263
|
-
contextWindow: 1048576,
|
|
264
|
-
maxOutputTokens: 65536,
|
|
265
|
-
supportsStreaming: true,
|
|
266
|
-
supportsImages: false,
|
|
267
|
-
supportsTemperature: false,
|
|
268
|
-
supportsWebSearch: false,
|
|
269
|
-
timeout: 120000,
|
|
270
|
-
description: 'Google Gemini 3 Flash Preview via Copilot subscription',
|
|
271
|
-
aliases: ['flash', 'gemini-3-flash'],
|
|
272
|
-
},
|
|
273
234
|
'gemini-3-pro-preview': {
|
|
274
235
|
modelName: 'gemini-3-pro-preview',
|
|
275
236
|
friendlyName: 'Gemini 3 Pro Preview (via Copilot)',
|
|
@@ -294,50 +255,7 @@ const SUPPORTED_MODELS = {
|
|
|
294
255
|
supportsWebSearch: false,
|
|
295
256
|
timeout: 300000,
|
|
296
257
|
description: 'Google Gemini 3.1 Pro Preview via Copilot subscription',
|
|
297
|
-
aliases: ['gemini-3.1-pro'],
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
// xAI models
|
|
301
|
-
'grok-code-fast-1': {
|
|
302
|
-
modelName: 'grok-code-fast-1',
|
|
303
|
-
friendlyName: 'Grok Code Fast 1 (via Copilot)',
|
|
304
|
-
contextWindow: 131072,
|
|
305
|
-
maxOutputTokens: 16384,
|
|
306
|
-
supportsStreaming: true,
|
|
307
|
-
supportsImages: false,
|
|
308
|
-
supportsTemperature: false,
|
|
309
|
-
supportsWebSearch: false,
|
|
310
|
-
timeout: 120000,
|
|
311
|
-
description: 'xAI Grok Code Fast 1 via Copilot subscription',
|
|
312
|
-
aliases: ['grok'],
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
// Fine-tuned / specialized models
|
|
316
|
-
'raptor-mini': {
|
|
317
|
-
modelName: 'raptor-mini',
|
|
318
|
-
friendlyName: 'Raptor Mini (via Copilot)',
|
|
319
|
-
contextWindow: 128000,
|
|
320
|
-
maxOutputTokens: 16384,
|
|
321
|
-
supportsStreaming: true,
|
|
322
|
-
supportsImages: false,
|
|
323
|
-
supportsTemperature: false,
|
|
324
|
-
supportsWebSearch: false,
|
|
325
|
-
timeout: 120000,
|
|
326
|
-
description: 'GitHub fine-tuned Raptor Mini via Copilot subscription',
|
|
327
|
-
aliases: [],
|
|
328
|
-
},
|
|
329
|
-
goldeneye: {
|
|
330
|
-
modelName: 'goldeneye',
|
|
331
|
-
friendlyName: 'Goldeneye (via Copilot)',
|
|
332
|
-
contextWindow: 128000,
|
|
333
|
-
maxOutputTokens: 16384,
|
|
334
|
-
supportsStreaming: true,
|
|
335
|
-
supportsImages: false,
|
|
336
|
-
supportsTemperature: false,
|
|
337
|
-
supportsWebSearch: false,
|
|
338
|
-
timeout: 120000,
|
|
339
|
-
description: 'GitHub Goldeneye model via Copilot subscription',
|
|
340
|
-
aliases: [],
|
|
258
|
+
aliases: ['gemini', 'gemini-3.1-pro'],
|
|
341
259
|
},
|
|
342
260
|
};
|
|
343
261
|
|
|
@@ -589,8 +507,25 @@ function resolveSessionModel(requestModel, config) {
|
|
|
589
507
|
* - session.idle → processing complete
|
|
590
508
|
* - session.error → { data: { errorType, message } }
|
|
591
509
|
*/
|
|
510
|
+
/**
|
|
511
|
+
* Map tool-level reasoning_effort values to Copilot SDK's ReasoningEffort.
|
|
512
|
+
* Tool enum: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'max'
|
|
513
|
+
* SDK enum: 'low' | 'medium' | 'high' | 'xhigh'
|
|
514
|
+
*/
|
|
515
|
+
function mapReasoningEffort(effort) {
|
|
516
|
+
const mapping = {
|
|
517
|
+
none: 'low',
|
|
518
|
+
minimal: 'low',
|
|
519
|
+
low: 'low',
|
|
520
|
+
medium: 'medium',
|
|
521
|
+
high: 'high',
|
|
522
|
+
max: 'xhigh',
|
|
523
|
+
};
|
|
524
|
+
return mapping[effort] || undefined;
|
|
525
|
+
}
|
|
526
|
+
|
|
592
527
|
async function* createStreamingGenerator(client, prompt, options, signal, config) {
|
|
593
|
-
const { model, timeout = 120000 } = options;
|
|
528
|
+
const { model, timeout = 120000, reasoning_effort } = options;
|
|
594
529
|
|
|
595
530
|
const sessionModel = resolveSessionModel(model, config);
|
|
596
531
|
const accessLevel = getToolAccessLevel(config);
|
|
@@ -604,6 +539,14 @@ async function* createStreamingGenerator(client, prompt, options, signal, config
|
|
|
604
539
|
sessionConfig.model = sessionModel;
|
|
605
540
|
}
|
|
606
541
|
|
|
542
|
+
if (reasoning_effort) {
|
|
543
|
+
const mapped = mapReasoningEffort(reasoning_effort);
|
|
544
|
+
if (mapped) {
|
|
545
|
+
sessionConfig.reasoningEffort = mapped;
|
|
546
|
+
debugLog(`[Copilot SDK] Setting reasoningEffort: ${mapped} (from ${reasoning_effort})`);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
607
550
|
const session = await client.createSession(sessionConfig);
|
|
608
551
|
|
|
609
552
|
try {
|
|
@@ -767,12 +710,6 @@ export const copilotProvider = {
|
|
|
767
710
|
'[Copilot SDK] Parameter "use_websearch" not supported by Copilot SDK (ignored)',
|
|
768
711
|
);
|
|
769
712
|
}
|
|
770
|
-
if (reasoning_effort !== undefined) {
|
|
771
|
-
debugLog(
|
|
772
|
-
'[Copilot SDK] Parameter "reasoning_effort" not supported by Copilot SDK (ignored)',
|
|
773
|
-
);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
713
|
try {
|
|
777
714
|
const cwd = config.server?.client_cwd || process.cwd();
|
|
778
715
|
const client = await getCopilotClient(cwd);
|
|
@@ -783,6 +720,7 @@ export const copilotProvider = {
|
|
|
783
720
|
const invokeOptions = {
|
|
784
721
|
model,
|
|
785
722
|
timeout: modelConfig.timeout,
|
|
723
|
+
reasoning_effort,
|
|
786
724
|
};
|
|
787
725
|
|
|
788
726
|
if (stream) {
|