converse-mcp-server 1.15.1 → 1.17.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/README.md +2 -1
- package/docs/PROVIDERS.md +1 -0
- package/package.json +11 -11
- package/src/prompts/helpPrompt.js +3 -3
- package/src/providers/anthropic.js +32 -9
- package/src/providers/openai.js +15 -0
- package/src/utils/formatStatus.js +4 -5
package/README.md
CHANGED
|
@@ -209,8 +209,9 @@ SUMMARIZATION_MODEL=gpt-5-nano # Default: gpt-5-nano
|
|
|
209
209
|
- **gpt-5**: Latest flagship model (400K context, 128K output) - Superior reasoning, code generation, and analysis
|
|
210
210
|
- **gpt-5-mini**: Faster, cost-efficient GPT-5 (400K context, 128K output) - Well-defined tasks, precise prompts
|
|
211
211
|
- **gpt-5-nano**: Fastest, most cost-efficient GPT-5 (400K context, 128K output) - Summarization, classification
|
|
212
|
+
- **gpt-5-pro**: Most advanced reasoning model (400K context, 272K output) - Hardest problems, extended compute time (EXPENSIVE)
|
|
212
213
|
- **o3**: Strong reasoning (200K context)
|
|
213
|
-
- **o3-mini**: Fast O3 variant (200K context)
|
|
214
|
+
- **o3-mini**: Fast O3 variant (200K context)
|
|
214
215
|
- **o3-pro**: Professional-grade reasoning (200K context) - EXTREMELY EXPENSIVE
|
|
215
216
|
- **o3-deep-research**: Deep research model (200K context) - 30-90 min runtime
|
|
216
217
|
- **o4-mini**: Latest reasoning model (200K context)
|
package/docs/PROVIDERS.md
CHANGED
|
@@ -9,6 +9,7 @@ This guide documents all supported AI providers in the Converse MCP Server and t
|
|
|
9
9
|
- **Get Key**: [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
|
|
10
10
|
- **Environment Variable**: `OPENAI_API_KEY`
|
|
11
11
|
- **Supported Models**:
|
|
12
|
+
- `gpt-5`, `gpt-5-mini`, `gpt-5-nano`, `gpt-5-pro` - GPT-5 family with advanced reasoning
|
|
12
13
|
- `o3`, `o3-mini`, `o3-pro` - Advanced reasoning models
|
|
13
14
|
- `o4-mini` - Latest fast reasoning model
|
|
14
15
|
- `gpt-4.1` - Large context (1M tokens)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "converse-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Converse MCP Server - Converse with other LLMs with chat and consensus tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -94,22 +94,22 @@
|
|
|
94
94
|
".env.example"
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@anthropic-ai/sdk": "^0.
|
|
98
|
-
"@google/genai": "^1.
|
|
99
|
-
"@mistralai/mistralai": "^1.
|
|
100
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
97
|
+
"@anthropic-ai/sdk": "^0.65.0",
|
|
98
|
+
"@google/genai": "^1.22.0",
|
|
99
|
+
"@mistralai/mistralai": "^1.10.0",
|
|
100
|
+
"@modelcontextprotocol/sdk": "^1.19.1",
|
|
101
101
|
"cors": "^2.8.5",
|
|
102
|
-
"dotenv": "^17.2.
|
|
102
|
+
"dotenv": "^17.2.3",
|
|
103
103
|
"express": "^5.1.0",
|
|
104
|
-
"lru-cache": "^11.
|
|
105
|
-
"openai": "^
|
|
104
|
+
"lru-cache": "^11.2.2",
|
|
105
|
+
"openai": "^6.1.0",
|
|
106
106
|
"p-limit": "^4.0.0",
|
|
107
|
-
"vite": "^7.1.
|
|
107
|
+
"vite": "^7.1.9"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@vitest/coverage-v8": "^3.2.4",
|
|
111
|
-
"cross-env": "^10.
|
|
112
|
-
"eslint": "^9.
|
|
111
|
+
"cross-env": "^10.1.0",
|
|
112
|
+
"eslint": "^9.36.0",
|
|
113
113
|
"prettier": "^3.6.2",
|
|
114
114
|
"rimraf": "^6.0.1",
|
|
115
115
|
"vitest": "^3.2.4"
|
|
@@ -141,12 +141,12 @@ ${formatProviderModels('OpenRouter', allModels.openrouter)}
|
|
|
141
141
|
|
|
142
142
|
### For Large Context Windows
|
|
143
143
|
- **1M+ Tokens**: gpt-4.1 (1M), all Gemini models (1M)
|
|
144
|
-
- **400K Tokens**: gpt-5 family (gpt-5, gpt-5-mini, gpt-5-nano)
|
|
144
|
+
- **400K Tokens**: gpt-5 family (gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-pro)
|
|
145
145
|
- **256K Tokens**: grok-4 series
|
|
146
|
-
- **200K Tokens**:
|
|
146
|
+
- **200K Tokens**: o3 series, o4-mini
|
|
147
147
|
|
|
148
148
|
### Special Features
|
|
149
|
-
- **Web Search**: gpt-5, gpt-5-mini, gpt-5 series, o4-mini, gpt-4 series, gemini models with grounding, grok-4
|
|
149
|
+
- **Web Search**: gpt-5, gpt-5-mini, gpt-5-pro, o3 series, o4-mini, gpt-4 series, gemini models with grounding, grok-4
|
|
150
150
|
- **Thinking Mode**: gpt-5 series (reasoning_effort), gemini models (thinking budget)
|
|
151
151
|
- **Image Support**: All models except gemini-2.0-flash-lite and grok-code-fast-1
|
|
152
152
|
|
|
@@ -29,6 +29,23 @@ const SUPPORTED_MODELS = {
|
|
|
29
29
|
description: 'Claude Opus 4.1 - Highest level of intelligence and capability with extended thinking',
|
|
30
30
|
aliases: ['claude-opus-4-1', 'claude-4.1-opus', 'claude-4-1-opus', 'opus-4.1', 'opus-4-1', 'claude-4-opus', 'opus-4', 'opus', 'claude-opus', 'claude-opus-4', 'opus4', 'opus4.1', 'claude-opus-4.1']
|
|
31
31
|
},
|
|
32
|
+
'claude-sonnet-4-5-20250929': {
|
|
33
|
+
modelName: 'claude-sonnet-4-5-20250929',
|
|
34
|
+
friendlyName: 'Claude Sonnet 4.5',
|
|
35
|
+
contextWindow: 200000,
|
|
36
|
+
maxOutputTokens: 64000,
|
|
37
|
+
supportsStreaming: true,
|
|
38
|
+
supportsImages: true,
|
|
39
|
+
supportsTemperature: true,
|
|
40
|
+
supportsWebSearch: false,
|
|
41
|
+
supportsThinking: true,
|
|
42
|
+
minThinkingTokens: 1024,
|
|
43
|
+
maxThinkingTokens: 64000,
|
|
44
|
+
timeout: 300000,
|
|
45
|
+
supports1MContext: true, // Beta 1M context support
|
|
46
|
+
description: 'Claude Sonnet 4.5 - Latest Sonnet with enhanced intelligence and optional 1M context',
|
|
47
|
+
aliases: ['claude-4.5-sonnet', 'sonnet-4.5', 'claude-sonnet-4.5', 'sonnet4.5', 'claude-sonnet-4-5']
|
|
48
|
+
},
|
|
32
49
|
'claude-sonnet-4-20250514': {
|
|
33
50
|
modelName: 'claude-sonnet-4-20250514',
|
|
34
51
|
friendlyName: 'Claude Sonnet 4',
|
|
@@ -42,6 +59,7 @@ const SUPPORTED_MODELS = {
|
|
|
42
59
|
minThinkingTokens: 1024,
|
|
43
60
|
maxThinkingTokens: 64000,
|
|
44
61
|
timeout: 300000,
|
|
62
|
+
supports1MContext: true, // Beta 1M context support
|
|
45
63
|
description: 'Claude Sonnet 4 - High intelligence and balanced performance with extended thinking',
|
|
46
64
|
aliases: ['claude-4-sonnet', 'sonnet-4', 'sonnet', 'claude-sonnet', 'claude-sonnet-4', 'sonnet4']
|
|
47
65
|
},
|
|
@@ -357,20 +375,23 @@ export const anthropicProvider = {
|
|
|
357
375
|
const resolvedModel = resolveModelName(model);
|
|
358
376
|
const modelConfig = SUPPORTED_MODELS[resolvedModel] || {};
|
|
359
377
|
|
|
360
|
-
// Initialize Anthropic client
|
|
361
|
-
// Use both prompt caching and extended cache duration headers for 1-hour caching
|
|
362
|
-
// Set beta headers for caching
|
|
363
|
-
const betaHeaders = ['prompt-caching-2024-07-31', 'extended-cache-ttl-2025-04-11'];
|
|
364
|
-
|
|
378
|
+
// Initialize Anthropic client
|
|
365
379
|
const anthropic = new Anthropic({
|
|
366
380
|
apiKey: config.apiKeys.anthropic,
|
|
367
|
-
defaultHeaders: {
|
|
368
|
-
'anthropic-beta': betaHeaders.join(',')
|
|
369
|
-
},
|
|
370
381
|
// Increase timeout to 20 minutes for thinking models that may take longer
|
|
371
382
|
timeout: 20 * 60 * 1000
|
|
372
383
|
});
|
|
373
384
|
|
|
385
|
+
// Build beta features array for the request
|
|
386
|
+
// Use both prompt caching and extended cache duration for 1-hour caching
|
|
387
|
+
const betas = ['prompt-caching-2024-07-31', 'extended-cache-ttl-2025-04-11'];
|
|
388
|
+
|
|
389
|
+
// Add 1M context beta feature if model supports it
|
|
390
|
+
if (modelConfig.supports1MContext) {
|
|
391
|
+
betas.push('context-1m-2025-08-07');
|
|
392
|
+
debugLog(`[Anthropic] Model ${resolvedModel} supports 1M context window with beta feature`);
|
|
393
|
+
}
|
|
394
|
+
|
|
374
395
|
// Convert messages to Anthropic format (system messages are always cached)
|
|
375
396
|
const { systemPrompt, messages: anthropicMessages } = convertMessagesToAnthropic(messages);
|
|
376
397
|
|
|
@@ -379,6 +400,7 @@ export const anthropicProvider = {
|
|
|
379
400
|
model: resolvedModel,
|
|
380
401
|
messages: anthropicMessages,
|
|
381
402
|
stream,
|
|
403
|
+
betas, // Include beta features
|
|
382
404
|
...otherOptions
|
|
383
405
|
};
|
|
384
406
|
|
|
@@ -404,7 +426,7 @@ export const anthropicProvider = {
|
|
|
404
426
|
// For other models, check against max_tokens if set
|
|
405
427
|
const maxTokensLimit = requestPayload.max_tokens ||
|
|
406
428
|
(resolvedModel.includes('claude-opus-4') ? 32000 :
|
|
407
|
-
resolvedModel.includes('claude-sonnet-4') ? 64000 :
|
|
429
|
+
(resolvedModel.includes('claude-sonnet-4-5') || resolvedModel.includes('claude-sonnet-4')) ? 64000 :
|
|
408
430
|
modelConfig.maxOutputTokens);
|
|
409
431
|
|
|
410
432
|
if (thinkingBudget > 0 && thinkingBudget < maxTokensLimit) {
|
|
@@ -449,6 +471,7 @@ export const anthropicProvider = {
|
|
|
449
471
|
max_tokens: requestPayload.max_tokens,
|
|
450
472
|
thinking: requestPayload.thinking,
|
|
451
473
|
temperature: requestPayload.temperature,
|
|
474
|
+
betas: requestPayload.betas,
|
|
452
475
|
message_count: requestPayload.messages?.length,
|
|
453
476
|
system_length: Array.isArray(requestPayload.system) ? requestPayload.system[0]?.text?.length : requestPayload.system?.length
|
|
454
477
|
}, null, 2));
|
package/src/providers/openai.js
CHANGED
|
@@ -52,6 +52,21 @@ const SUPPORTED_MODELS = {
|
|
|
52
52
|
description: 'Fastest, most cost-efficient GPT-5 (400K context, 128K output) - Summarization, classification',
|
|
53
53
|
aliases: ['gpt5-nano', 'gpt-5nano', 'gpt 5 nano', 'gpt-5-nano-2025-08-07']
|
|
54
54
|
},
|
|
55
|
+
'gpt-5-pro': {
|
|
56
|
+
modelName: 'gpt-5-pro',
|
|
57
|
+
friendlyName: 'OpenAI (GPT-5 Pro)',
|
|
58
|
+
contextWindow: 400000,
|
|
59
|
+
maxOutputTokens: 272000,
|
|
60
|
+
supportsStreaming: false, // GPT-5 Pro doesn't support streaming
|
|
61
|
+
supportsImages: true,
|
|
62
|
+
supportsTemperature: false, // GPT-5 models don't support temperature
|
|
63
|
+
supportsWebSearch: true,
|
|
64
|
+
supportsResponsesAPI: true,
|
|
65
|
+
supportsDeepResearch: false, // Not a deep research model
|
|
66
|
+
timeout: 3600000, // 60 minutes - some requests may take several minutes
|
|
67
|
+
description: 'Most advanced reasoning model (400K context, 272K output) - Hardest problems, extended compute time (EXPENSIVE)',
|
|
68
|
+
aliases: ['gpt5-pro', 'gpt-5pro', 'gpt 5 pro', 'gpt-5 pro', 'gpt-5-pro-2025-10-06']
|
|
69
|
+
},
|
|
55
70
|
'o3': {
|
|
56
71
|
modelName: 'o3',
|
|
57
72
|
friendlyName: 'OpenAI (O3)',
|
|
@@ -20,12 +20,11 @@ export async function formatJobListHumanReadable(jobsList, dependencies = {}) {
|
|
|
20
20
|
const parts = [];
|
|
21
21
|
|
|
22
22
|
// Summary line - include cancelled jobs if any
|
|
23
|
-
|
|
23
|
+
const summaryParts = [];
|
|
24
24
|
if (jobsList.summary.active_jobs > 0) summaryParts.push(`${jobsList.summary.active_jobs} active`);
|
|
25
25
|
if (jobsList.summary.completed_jobs > 0) summaryParts.push(`${jobsList.summary.completed_jobs} completed`);
|
|
26
26
|
if (jobsList.summary.failed_jobs > 0) summaryParts.push(`${jobsList.summary.failed_jobs} failed`);
|
|
27
27
|
if (jobsList.summary.cancelled_jobs > 0) summaryParts.push(`${jobsList.summary.cancelled_jobs} cancelled`);
|
|
28
|
-
|
|
29
28
|
const summaryStr = summaryParts.length > 0 ? summaryParts.join(', ') : '0 jobs';
|
|
30
29
|
parts.push(`📊 Jobs Summary: ${summaryStr}`);
|
|
31
30
|
|
|
@@ -170,11 +169,11 @@ export async function formatHumanReadableStatus(jobStatus, options = {}, depende
|
|
|
170
169
|
} else if (jobStatus.status === 'running' && !jobStatus.accumulated_content && jobStatus.elapsed_seconds > 5) {
|
|
171
170
|
// Fallback thinking status for jobs without reasoning summaries
|
|
172
171
|
const thinkingTime = Math.floor(jobStatus.elapsed_seconds);
|
|
173
|
-
debugLog(
|
|
174
|
-
parts.push(
|
|
172
|
+
debugLog('[FormatStatus] *** FALLBACK THINKING (no reasoning_summary available)');
|
|
173
|
+
parts.push('Thinking: Model is processing your request (' + thinkingTime + 's elapsed)');
|
|
175
174
|
}
|
|
176
175
|
|
|
177
|
-
// Generate streaming summary for running jobs if accumulated content available
|
|
176
|
+
// Generate streaming summary for running jobs if accumulated content available
|
|
178
177
|
if (jobStatus.status === 'running' && jobStatus.accumulated_content) {
|
|
179
178
|
try {
|
|
180
179
|
if (dependencies.config && dependencies.providers) {
|