converse-mcp-server 1.10.0 → 1.10.1
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 +16 -1
- package/package.json +1 -1
- package/src/tools/chat.js +2 -2
- package/src/tools/consensus.js +48 -9
package/README.md
CHANGED
|
@@ -250,7 +250,7 @@ Use `"auto"` for automatic model selection, or specify exact models:
|
|
|
250
250
|
|
|
251
251
|
// Specific models
|
|
252
252
|
{ "model": "gemini-2.5-flash" }
|
|
253
|
-
{ "model": "
|
|
253
|
+
{ "model": "gpt-5" }
|
|
254
254
|
{ "model": "grok-4-0709" }
|
|
255
255
|
|
|
256
256
|
// Using aliases
|
|
@@ -259,6 +259,21 @@ Use `"auto"` for automatic model selection, or specify exact models:
|
|
|
259
259
|
{ "model": "grok" } // -> grok-4-0709
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
+
**Auto Model Behavior:**
|
|
263
|
+
- **Chat Tool**: Selects the first available provider and uses its default model
|
|
264
|
+
- **Consensus Tool**: When using `[{"model": "auto"}]`, automatically expands to the first 3 available providers
|
|
265
|
+
|
|
266
|
+
Provider priority order (requires corresponding API key):
|
|
267
|
+
1. OpenAI (`gpt-5`)
|
|
268
|
+
2. Google (`gemini-2.5-pro`)
|
|
269
|
+
3. XAI (`grok-4-0709`)
|
|
270
|
+
4. Anthropic (`claude-sonnet-4-20250514`)
|
|
271
|
+
5. Mistral (`magistral-medium-2506`)
|
|
272
|
+
6. DeepSeek (`deepseek-reasoner`)
|
|
273
|
+
7. OpenRouter (`qwen/qwen3-coder`)
|
|
274
|
+
|
|
275
|
+
The system will use the first 3 providers that have valid API keys configured. This enables automatic multi-model consensus without manually specifying models.
|
|
276
|
+
|
|
262
277
|
### Advanced Configuration
|
|
263
278
|
|
|
264
279
|
#### Manual Installation Options
|
package/package.json
CHANGED
package/src/tools/chat.js
CHANGED
|
@@ -272,7 +272,7 @@ function resolveAutoModel(model, providerName) {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
const defaults = {
|
|
275
|
-
'openai': '
|
|
275
|
+
'openai': 'gpt-5',
|
|
276
276
|
'xai': 'grok-4-0709',
|
|
277
277
|
'google': 'gemini-2.5-pro',
|
|
278
278
|
'anthropic': 'claude-sonnet-4-20250514',
|
|
@@ -281,7 +281,7 @@ function resolveAutoModel(model, providerName) {
|
|
|
281
281
|
'openrouter': 'qwen/qwen3-coder'
|
|
282
282
|
};
|
|
283
283
|
|
|
284
|
-
return defaults[providerName] || 'gpt-
|
|
284
|
+
return defaults[providerName] || 'gpt-5';
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
function mapModelToProvider(model, providers) {
|
package/src/tools/consensus.js
CHANGED
|
@@ -143,7 +143,39 @@ export async function consensusTool(args, dependencies) {
|
|
|
143
143
|
const providerCalls = [];
|
|
144
144
|
const failedModels = [];
|
|
145
145
|
|
|
146
|
-
for
|
|
146
|
+
// Special handling for single "auto" model - expand to first 3 available providers
|
|
147
|
+
let modelsToProcess = models;
|
|
148
|
+
if (models.length === 1 && models[0].model && models[0].model.toLowerCase() === 'auto') {
|
|
149
|
+
// Find first 3 available providers
|
|
150
|
+
const availableProviders = [];
|
|
151
|
+
const providerOrder = ['openai', 'google', 'xai', 'anthropic', 'mistral', 'deepseek', 'openrouter'];
|
|
152
|
+
|
|
153
|
+
for (const providerName of providerOrder) {
|
|
154
|
+
if (availableProviders.length >= 3) break;
|
|
155
|
+
const provider = providers[providerName];
|
|
156
|
+
if (provider && provider.isAvailable(config)) {
|
|
157
|
+
availableProviders.push(providerName);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (availableProviders.length === 0) {
|
|
162
|
+
return createToolError('No providers available. Please configure at least one API key.');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Create model specs for each available provider with their default model
|
|
166
|
+
modelsToProcess = availableProviders.map(providerName => ({
|
|
167
|
+
model: getDefaultModelForProvider(providerName)
|
|
168
|
+
}));
|
|
169
|
+
|
|
170
|
+
logger.debug('Auto-expanded to providers', {
|
|
171
|
+
data: {
|
|
172
|
+
providers: availableProviders,
|
|
173
|
+
models: modelsToProcess.map(m => m.model)
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
for (const modelSpec of modelsToProcess) {
|
|
147
179
|
if (!modelSpec.model || typeof modelSpec.model !== 'string') {
|
|
148
180
|
failedModels.push({
|
|
149
181
|
model: modelSpec.model || 'unknown',
|
|
@@ -406,15 +438,11 @@ Please provide your refined response:`;
|
|
|
406
438
|
* @returns {string} Provider name
|
|
407
439
|
*/
|
|
408
440
|
/**
|
|
409
|
-
*
|
|
441
|
+
* Get default model for a provider
|
|
410
442
|
*/
|
|
411
|
-
function
|
|
412
|
-
if (model.toLowerCase() !== 'auto') {
|
|
413
|
-
return model;
|
|
414
|
-
}
|
|
415
|
-
|
|
443
|
+
function getDefaultModelForProvider(providerName) {
|
|
416
444
|
const defaults = {
|
|
417
|
-
'openai': '
|
|
445
|
+
'openai': 'gpt-5',
|
|
418
446
|
'xai': 'grok-4-0709',
|
|
419
447
|
'google': 'gemini-2.5-pro',
|
|
420
448
|
'anthropic': 'claude-sonnet-4-20250514',
|
|
@@ -423,7 +451,18 @@ function resolveAutoModel(model, providerName) {
|
|
|
423
451
|
'openrouter': 'qwen/qwen3-coder'
|
|
424
452
|
};
|
|
425
453
|
|
|
426
|
-
return defaults[providerName] || '
|
|
454
|
+
return defaults[providerName] || 'gpt-5';
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Resolve "auto" model to default model for the provider
|
|
459
|
+
*/
|
|
460
|
+
function resolveAutoModel(model, providerName) {
|
|
461
|
+
if (model.toLowerCase() !== 'auto') {
|
|
462
|
+
return model;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
return getDefaultModelForProvider(providerName);
|
|
427
466
|
}
|
|
428
467
|
|
|
429
468
|
function mapModelToProvider(model, providers) {
|