converse-mcp-server 2.17.1 → 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 +27 -7
package/package.json
CHANGED
package/src/providers/copilot.js
CHANGED
|
@@ -507,8 +507,25 @@ function resolveSessionModel(requestModel, config) {
|
|
|
507
507
|
* - session.idle → processing complete
|
|
508
508
|
* - session.error → { data: { errorType, message } }
|
|
509
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
|
+
|
|
510
527
|
async function* createStreamingGenerator(client, prompt, options, signal, config) {
|
|
511
|
-
const { model, timeout = 120000 } = options;
|
|
528
|
+
const { model, timeout = 120000, reasoning_effort } = options;
|
|
512
529
|
|
|
513
530
|
const sessionModel = resolveSessionModel(model, config);
|
|
514
531
|
const accessLevel = getToolAccessLevel(config);
|
|
@@ -522,6 +539,14 @@ async function* createStreamingGenerator(client, prompt, options, signal, config
|
|
|
522
539
|
sessionConfig.model = sessionModel;
|
|
523
540
|
}
|
|
524
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
|
+
|
|
525
550
|
const session = await client.createSession(sessionConfig);
|
|
526
551
|
|
|
527
552
|
try {
|
|
@@ -685,12 +710,6 @@ export const copilotProvider = {
|
|
|
685
710
|
'[Copilot SDK] Parameter "use_websearch" not supported by Copilot SDK (ignored)',
|
|
686
711
|
);
|
|
687
712
|
}
|
|
688
|
-
if (reasoning_effort !== undefined) {
|
|
689
|
-
debugLog(
|
|
690
|
-
'[Copilot SDK] Parameter "reasoning_effort" not supported by Copilot SDK (ignored)',
|
|
691
|
-
);
|
|
692
|
-
}
|
|
693
|
-
|
|
694
713
|
try {
|
|
695
714
|
const cwd = config.server?.client_cwd || process.cwd();
|
|
696
715
|
const client = await getCopilotClient(cwd);
|
|
@@ -701,6 +720,7 @@ export const copilotProvider = {
|
|
|
701
720
|
const invokeOptions = {
|
|
702
721
|
model,
|
|
703
722
|
timeout: modelConfig.timeout,
|
|
723
|
+
reasoning_effort,
|
|
704
724
|
};
|
|
705
725
|
|
|
706
726
|
if (stream) {
|