converse-mcp-server 2.28.0 → 2.29.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/.env.example +3 -3
- package/docs/API.md +7 -5
- package/docs/PROVIDERS.md +6 -2
- package/package.json +14 -14
- package/src/config.js +8 -2
- package/src/providers/codex.js +4 -2
- package/src/providers/copilot.js +92 -8
- package/src/providers/openai.js +80 -12
- package/src/utils/modelRouting.js +2 -2
package/.env.example
CHANGED
|
@@ -77,9 +77,9 @@ OPENROUTER_REFERER=https://github.com/FallDownTheSystem/converse
|
|
|
77
77
|
# WARNING: Interactive policies may cause hangs in server/headless mode
|
|
78
78
|
# CODEX_APPROVAL_POLICY=never
|
|
79
79
|
|
|
80
|
-
# Default Codex model (default: gpt-5.
|
|
81
|
-
# Options: gpt-5.5, gpt-5.
|
|
82
|
-
# CODEX_MODEL=gpt-5.
|
|
80
|
+
# Default Codex model (default: gpt-5.6)
|
|
81
|
+
# Options: gpt-5.6, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.3-codex
|
|
82
|
+
# CODEX_MODEL=gpt-5.6
|
|
83
83
|
|
|
84
84
|
# ============================================
|
|
85
85
|
# Server Configuration
|
package/docs/API.md
CHANGED
|
@@ -516,11 +516,13 @@ When complete, `check_status` for the continuation_id renders the full lap trans
|
|
|
516
516
|
|
|
517
517
|
| Model | Context | Tokens | Features | Use Cases |
|
|
518
518
|
|-------|---------|--------|----------|-----------|
|
|
519
|
-
| `gpt-5.
|
|
520
|
-
| `gpt-5` |
|
|
521
|
-
| `gpt-5-
|
|
522
|
-
| `gpt-5
|
|
523
|
-
| `gpt-5-pro` | 1M |
|
|
519
|
+
| `gpt-5.6-sol` (`gpt-5.6`, `gpt-5`, `sol`) | 1M | 128K | Flagship, default | Frontier reasoning, coding, agentic workflows |
|
|
520
|
+
| `gpt-5.6-terra` (`terra`) | 400K | 128K | Lower cost | Strong performance at half the flagship price |
|
|
521
|
+
| `gpt-5.6-luna` (`luna`) | 400K | 128K | Fastest | High-volume, latency-sensitive workloads |
|
|
522
|
+
| `gpt-5.4` | 1M | 128K | Previous flagship | Complex reasoning, analysis |
|
|
523
|
+
| `gpt-5.4-pro` | 1M | 272K | Pro tier | Extended capabilities (expensive) |
|
|
524
|
+
| `gpt-5-mini` | 400K | 128K | Fast | Balanced performance/speed |
|
|
525
|
+
| `gpt-5-nano` | 400K | 128K | Ultra-fast | Quick responses, simple queries |
|
|
524
526
|
| `o3` | 200K | 100K | Reasoning | Logic, analysis, complex problems |
|
|
525
527
|
| `o3-pro` | 200K | 100K | Extended reasoning | Deep analysis |
|
|
526
528
|
| `o4-mini` | 200K | 100K | Fast reasoning | General purpose, rapid reasoning |
|
package/docs/PROVIDERS.md
CHANGED
|
@@ -9,7 +9,10 @@ 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.
|
|
12
|
+
- `gpt-5.6-sol` (aliases: `gpt-5.6`, `gpt-5`, `sol`) - Flagship GPT-5.6, the default OpenAI model
|
|
13
|
+
- `gpt-5.6-terra` (alias: `terra`) - Lower-cost GPT-5.6, competitive with GPT-5.5
|
|
14
|
+
- `gpt-5.6-luna` (alias: `luna`) - Fastest, most affordable GPT-5.6
|
|
15
|
+
- `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.4-pro`, `gpt-5-mini`, `gpt-5-nano` - GPT-5.4/GPT-5 family
|
|
13
16
|
- `o3`, `o3-pro`, `o4-mini` - Advanced reasoning models
|
|
14
17
|
- `gpt-4.1` - Large context (1M tokens)
|
|
15
18
|
- `o3-deep-research`, `o4-mini-deep-research` - Deep research models
|
|
@@ -92,8 +95,9 @@ This guide documents all supported AI providers in the Converse MCP Server and t
|
|
|
92
95
|
- `CODEX_SANDBOX_MODE` - Filesystem access control (default: read-only)
|
|
93
96
|
- `CODEX_SKIP_GIT_CHECK` - Skip Git repository validation (default: true)
|
|
94
97
|
- `CODEX_APPROVAL_POLICY` - Command approval behavior (default: never)
|
|
98
|
+
- `CODEX_MODEL` - Underlying model for Codex sessions (default: gpt-5.6; e.g. gpt-5.6-terra, gpt-5.6-luna, gpt-5.5)
|
|
95
99
|
- **Supported Models**:
|
|
96
|
-
- `codex` - OpenAI Codex agentic coding assistant
|
|
100
|
+
- `codex` - OpenAI Codex agentic coding assistant (GPT-5.6 by default)
|
|
97
101
|
- Thread-based sessions with persistent context
|
|
98
102
|
- Direct filesystem access from working directory
|
|
99
103
|
- Typical response time: 6-20 seconds (longer for complex tasks)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "converse-mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.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",
|
|
@@ -93,29 +93,29 @@
|
|
|
93
93
|
".env.example"
|
|
94
94
|
],
|
|
95
95
|
"dependencies": {
|
|
96
|
-
"@anthropic-ai/claude-agent-sdk": "^0.3.
|
|
97
|
-
"@anthropic-ai/sdk": "^0.
|
|
98
|
-
"@github/copilot-sdk": "^1.0.
|
|
99
|
-
"@google/genai": "^2.
|
|
96
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.201",
|
|
97
|
+
"@anthropic-ai/sdk": "^0.110.0",
|
|
98
|
+
"@github/copilot-sdk": "^1.0.5",
|
|
99
|
+
"@google/genai": "^2.10.0",
|
|
100
100
|
"@lydell/node-pty": "1.2.0-beta.12",
|
|
101
|
-
"@mistralai/mistralai": "^2.
|
|
101
|
+
"@mistralai/mistralai": "^2.4.1",
|
|
102
102
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
103
|
-
"@openai/codex-sdk": "^0.
|
|
104
|
-
"ai": "^6.0.
|
|
103
|
+
"@openai/codex-sdk": "^0.142.5",
|
|
104
|
+
"ai": "^6.0.208",
|
|
105
105
|
"cors": "^2.8.6",
|
|
106
106
|
"dotenv": "^17.4.2",
|
|
107
107
|
"express": "^5.2.1",
|
|
108
108
|
"lru-cache": "^11.5.1",
|
|
109
|
-
"nanoid": "^5.1.
|
|
110
|
-
"openai": "^6.
|
|
109
|
+
"nanoid": "^5.1.16",
|
|
110
|
+
"openai": "^6.45.0",
|
|
111
111
|
"p-limit": "^7.3.0",
|
|
112
|
-
"vite": "^8.
|
|
112
|
+
"vite": "^8.1.3"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@vitest/coverage-v8": "^4.1.
|
|
115
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
116
116
|
"cross-env": "^10.1.0",
|
|
117
|
-
"eslint": "^10.
|
|
117
|
+
"eslint": "^10.6.0",
|
|
118
118
|
"rimraf": "^6.1.3",
|
|
119
|
-
"vitest": "^4.1.
|
|
119
|
+
"vitest": "^4.1.9"
|
|
120
120
|
}
|
|
121
121
|
}
|
package/src/config.js
CHANGED
|
@@ -279,9 +279,9 @@ const CONFIG_SCHEMA = {
|
|
|
279
279
|
},
|
|
280
280
|
CODEX_MODEL: {
|
|
281
281
|
type: 'string',
|
|
282
|
-
default: 'gpt-5.
|
|
282
|
+
default: 'gpt-5.6',
|
|
283
283
|
description:
|
|
284
|
-
'Default Codex model (e.g., gpt-5.5, gpt-5.
|
|
284
|
+
'Default Codex model (e.g., gpt-5.6, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5)',
|
|
285
285
|
},
|
|
286
286
|
|
|
287
287
|
// Copilot configuration
|
|
@@ -296,6 +296,12 @@ const CONFIG_SCHEMA = {
|
|
|
296
296
|
description:
|
|
297
297
|
'Default model for Copilot SDK sessions (e.g., gpt-5, claude-sonnet-4.5)',
|
|
298
298
|
},
|
|
299
|
+
COPILOT_CLI_PATH: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
required: false,
|
|
302
|
+
description:
|
|
303
|
+
'Explicit path to the Copilot CLI runtime (index.js or copilot binary). Overrides automatic resolution.',
|
|
304
|
+
},
|
|
299
305
|
},
|
|
300
306
|
|
|
301
307
|
// MCP configuration
|
package/src/providers/codex.js
CHANGED
|
@@ -21,7 +21,7 @@ import { normalizeExtendedPath } from '../utils/pathUtils.js';
|
|
|
21
21
|
const SUPPORTED_MODELS = {
|
|
22
22
|
codex: {
|
|
23
23
|
modelName: 'codex',
|
|
24
|
-
friendlyName: 'OpenAI Codex (GPT-5.
|
|
24
|
+
friendlyName: 'OpenAI Codex (GPT-5.6)',
|
|
25
25
|
contextWindow: 400000,
|
|
26
26
|
maxOutputTokens: 128000,
|
|
27
27
|
supportsStreaming: true,
|
|
@@ -30,7 +30,7 @@ const SUPPORTED_MODELS = {
|
|
|
30
30
|
supportsWebSearch: false, // Codex accesses files directly, not web
|
|
31
31
|
timeout: 600000, // 10 minutes
|
|
32
32
|
description:
|
|
33
|
-
'OpenAI Codex agentic coding assistant with local file access and tool execution (GPT-5.
|
|
33
|
+
'OpenAI Codex agentic coding assistant with local file access and tool execution (GPT-5.6)',
|
|
34
34
|
aliases: [
|
|
35
35
|
'gpt-5-codex',
|
|
36
36
|
'gpt5-codex',
|
|
@@ -39,6 +39,8 @@ const SUPPORTED_MODELS = {
|
|
|
39
39
|
'gpt5.3-codex',
|
|
40
40
|
'gpt-5.5',
|
|
41
41
|
'gpt5.5',
|
|
42
|
+
'gpt-5.6-codex',
|
|
43
|
+
'gpt5.6-codex',
|
|
42
44
|
],
|
|
43
45
|
},
|
|
44
46
|
};
|
package/src/providers/copilot.js
CHANGED
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
* - Requires GitHub CLI authenticated (gh auth login) with active Copilot subscription
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import { existsSync } from 'node:fs';
|
|
16
|
+
import { delimiter, dirname, join } from 'node:path';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
15
18
|
import { debugLog, debugError } from '../utils/console.js';
|
|
16
19
|
import { ProviderError, ErrorCodes, StopReasons } from './interface.js';
|
|
17
20
|
|
|
@@ -321,8 +324,10 @@ function isCopilotSDKAvailable() {
|
|
|
321
324
|
*/
|
|
322
325
|
async function getCopilotSDK() {
|
|
323
326
|
try {
|
|
324
|
-
const { CopilotClient } = await import(
|
|
325
|
-
|
|
327
|
+
const { CopilotClient, RuntimeConnection } = await import(
|
|
328
|
+
'@github/copilot-sdk'
|
|
329
|
+
);
|
|
330
|
+
return { CopilotClient, RuntimeConnection };
|
|
326
331
|
} catch (error) {
|
|
327
332
|
throw new CopilotProviderError(
|
|
328
333
|
`Copilot SDK import failed: ${error.message}`,
|
|
@@ -332,6 +337,78 @@ async function getCopilotSDK() {
|
|
|
332
337
|
}
|
|
333
338
|
}
|
|
334
339
|
|
|
340
|
+
/**
|
|
341
|
+
* Locate a runnable `copilot` executable on PATH (e.g. a winget or global
|
|
342
|
+
* install). On Windows only real executables (.exe/.com) qualify — .cmd/.bat
|
|
343
|
+
* shims can't be spawned without a shell, and the SDK spawns the CLI without
|
|
344
|
+
* one, so handing it a shim would fail.
|
|
345
|
+
*/
|
|
346
|
+
function findCopilotBinaryOnPath() {
|
|
347
|
+
const pathDirs = (process.env.PATH || process.env.Path || '')
|
|
348
|
+
.split(delimiter)
|
|
349
|
+
.filter(Boolean);
|
|
350
|
+
const exts = process.platform === 'win32' ? ['.exe', '.com'] : [''];
|
|
351
|
+
for (const dir of pathDirs) {
|
|
352
|
+
for (const ext of exts) {
|
|
353
|
+
const candidate = join(dir, `copilot${ext}`);
|
|
354
|
+
if (existsSync(candidate)) return candidate;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return null;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Resolve the Copilot CLI runtime path deterministically.
|
|
362
|
+
*
|
|
363
|
+
* The SDK's built-in resolver (getBundledCliPath) reconstructs
|
|
364
|
+
* `<@github/copilot root>/index.js` from the package's `./sdk` export. That
|
|
365
|
+
* assumption breaks across layouts — pnpm stores with multiple versions, global
|
|
366
|
+
* installs, and loader-style `@github/copilot` variants that ship no root
|
|
367
|
+
* `index.js` — and there is no escape hatch wired up, so a wrong/missing
|
|
368
|
+
* bundled copy takes down the whole provider (the "Copilot CLI not found at
|
|
369
|
+
* ...@github\index.js" failure). We own discovery here and hand the SDK an
|
|
370
|
+
* explicit, verified path so that entire class of resolution failures can't
|
|
371
|
+
* occur.
|
|
372
|
+
*
|
|
373
|
+
* Precedence: explicit override → bundled npm CLI (index.js, run via node) →
|
|
374
|
+
* `copilot` on PATH. Returns null to let the SDK fall back to its own
|
|
375
|
+
* resolution as a last resort (preserves behavior on flat installs).
|
|
376
|
+
*/
|
|
377
|
+
function resolveCopilotCliPath(config) {
|
|
378
|
+
// 1. Explicit override (COPILOT_CLI_PATH via config or env)
|
|
379
|
+
const override =
|
|
380
|
+
config?.providers?.copilotclipath || process.env.COPILOT_CLI_PATH;
|
|
381
|
+
if (override && existsSync(override)) {
|
|
382
|
+
debugLog('[Copilot SDK] Using configured CLI path: %s', override);
|
|
383
|
+
return override;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// 2. Bundled npm CLI: resolve the @github/copilot/sdk export, walk to the
|
|
387
|
+
// package root, and use its index.js. A .js path is spawned via `node`, which
|
|
388
|
+
// also sidesteps Windows .cmd/.bat shim issues.
|
|
389
|
+
try {
|
|
390
|
+
const sdkEntry = fileURLToPath(import.meta.resolve('@github/copilot/sdk'));
|
|
391
|
+
const candidate = join(dirname(dirname(sdkEntry)), 'index.js');
|
|
392
|
+
if (existsSync(candidate)) {
|
|
393
|
+
debugLog('[Copilot SDK] Using bundled CLI: %s', candidate);
|
|
394
|
+
return candidate;
|
|
395
|
+
}
|
|
396
|
+
} catch {
|
|
397
|
+
// @github/copilot not resolvable from here — fall through.
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// 3. Standalone `copilot` binary on PATH.
|
|
401
|
+
const binary = findCopilotBinaryOnPath();
|
|
402
|
+
if (binary) {
|
|
403
|
+
debugLog('[Copilot SDK] Using copilot binary from PATH: %s', binary);
|
|
404
|
+
return binary;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// 4. Nothing found — defer to the SDK's own resolution.
|
|
408
|
+
debugLog('[Copilot SDK] No CLI path resolved — deferring to SDK default');
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
|
|
335
412
|
// Module-level singleton client
|
|
336
413
|
let clientInstance = null;
|
|
337
414
|
let clientInitPromise = null;
|
|
@@ -340,7 +417,7 @@ let clientInitPromise = null;
|
|
|
340
417
|
* Get or create the singleton CopilotClient
|
|
341
418
|
* The client manages the CLI process lifecycle via JSON-RPC
|
|
342
419
|
*/
|
|
343
|
-
async function getCopilotClient(cwd) {
|
|
420
|
+
async function getCopilotClient(cwd, config) {
|
|
344
421
|
if (clientInstance) {
|
|
345
422
|
return clientInstance;
|
|
346
423
|
}
|
|
@@ -350,12 +427,19 @@ async function getCopilotClient(cwd) {
|
|
|
350
427
|
}
|
|
351
428
|
|
|
352
429
|
clientInitPromise = (async () => {
|
|
353
|
-
const CopilotClient = await getCopilotSDK();
|
|
430
|
+
const { CopilotClient, RuntimeConnection } = await getCopilotSDK();
|
|
354
431
|
const workingDirectory = cwd || process.cwd();
|
|
355
|
-
|
|
432
|
+
const clientOptions = {
|
|
356
433
|
useLoggedInUser: true,
|
|
357
434
|
workingDirectory,
|
|
358
|
-
}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
const cliPath = resolveCopilotCliPath(config);
|
|
438
|
+
if (cliPath) {
|
|
439
|
+
clientOptions.connection = RuntimeConnection.forStdio({ path: cliPath });
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
clientInstance = new CopilotClient(clientOptions);
|
|
359
443
|
await clientInstance.start();
|
|
360
444
|
debugLog('[Copilot SDK] Client started (cwd: %s)', workingDirectory);
|
|
361
445
|
return clientInstance;
|
|
@@ -795,7 +879,7 @@ async function* createStreamingGenerator(client, prompt, options, signal, config
|
|
|
795
879
|
}
|
|
796
880
|
}
|
|
797
881
|
|
|
798
|
-
export { resolveModelAlias, resolveSessionModel };
|
|
882
|
+
export { resolveModelAlias, resolveSessionModel, resolveCopilotCliPath };
|
|
799
883
|
|
|
800
884
|
/**
|
|
801
885
|
* Copilot SDK Provider Implementation
|
|
@@ -831,7 +915,7 @@ export const copilotProvider = {
|
|
|
831
915
|
}
|
|
832
916
|
try {
|
|
833
917
|
const cwd = config.server?.client_cwd || process.cwd();
|
|
834
|
-
const client = await getCopilotClient(cwd);
|
|
918
|
+
const client = await getCopilotClient(cwd, config);
|
|
835
919
|
const prompt = convertMessagesToPrompt(messages);
|
|
836
920
|
|
|
837
921
|
const sessionModel = resolveSessionModel(model, config);
|
package/src/providers/openai.js
CHANGED
|
@@ -10,6 +10,64 @@ import { debugLog, debugError } from '../utils/console.js';
|
|
|
10
10
|
|
|
11
11
|
// Define supported models with their capabilities
|
|
12
12
|
const SUPPORTED_MODELS = {
|
|
13
|
+
'gpt-5.6-sol': {
|
|
14
|
+
modelName: 'gpt-5.6-sol',
|
|
15
|
+
friendlyName: 'OpenAI (GPT-5.6 Sol)',
|
|
16
|
+
contextWindow: 1000000,
|
|
17
|
+
maxOutputTokens: 128000,
|
|
18
|
+
supportsStreaming: true,
|
|
19
|
+
supportsImages: true,
|
|
20
|
+
supportsTemperature: false,
|
|
21
|
+
supportsWebSearch: true,
|
|
22
|
+
supportsResponsesAPI: true,
|
|
23
|
+
supportsNoneReasoningEffort: true,
|
|
24
|
+
timeout: 3600000, // 1 hour
|
|
25
|
+
description:
|
|
26
|
+
'Flagship GPT-5.6 model (1M context, 128K output) - Frontier reasoning, coding, agentic workflows. Most token-efficient flagship',
|
|
27
|
+
aliases: [
|
|
28
|
+
'gpt-5.6',
|
|
29
|
+
'gpt5.6',
|
|
30
|
+
'gpt 5.6',
|
|
31
|
+
'gpt-5',
|
|
32
|
+
'gpt5',
|
|
33
|
+
'gpt 5',
|
|
34
|
+
'sol',
|
|
35
|
+
'gpt-5.6sol',
|
|
36
|
+
'gpt 5.6 sol',
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
'gpt-5.6-terra': {
|
|
40
|
+
modelName: 'gpt-5.6-terra',
|
|
41
|
+
friendlyName: 'OpenAI (GPT-5.6 Terra)',
|
|
42
|
+
contextWindow: 400000,
|
|
43
|
+
maxOutputTokens: 128000,
|
|
44
|
+
supportsStreaming: true,
|
|
45
|
+
supportsImages: true,
|
|
46
|
+
supportsTemperature: false,
|
|
47
|
+
supportsWebSearch: true,
|
|
48
|
+
supportsResponsesAPI: true,
|
|
49
|
+
supportsNoneReasoningEffort: true,
|
|
50
|
+
timeout: 1800000, // 30 minutes
|
|
51
|
+
description:
|
|
52
|
+
'Lower-cost GPT-5.6 (400K context, 128K output) - Performance competitive with GPT-5.5 at half the flagship price',
|
|
53
|
+
aliases: ['gpt5.6-terra', 'gpt-5.6terra', 'gpt 5.6 terra', 'terra'],
|
|
54
|
+
},
|
|
55
|
+
'gpt-5.6-luna': {
|
|
56
|
+
modelName: 'gpt-5.6-luna',
|
|
57
|
+
friendlyName: 'OpenAI (GPT-5.6 Luna)',
|
|
58
|
+
contextWindow: 400000,
|
|
59
|
+
maxOutputTokens: 128000,
|
|
60
|
+
supportsStreaming: true,
|
|
61
|
+
supportsImages: true,
|
|
62
|
+
supportsTemperature: false,
|
|
63
|
+
supportsWebSearch: true,
|
|
64
|
+
supportsResponsesAPI: true,
|
|
65
|
+
supportsNoneReasoningEffort: true,
|
|
66
|
+
timeout: 600000, // 10 minutes
|
|
67
|
+
description:
|
|
68
|
+
'Fastest, most affordable GPT-5.6 (400K context, 128K output) - High-volume, latency-sensitive workloads',
|
|
69
|
+
aliases: ['gpt5.6-luna', 'gpt-5.6luna', 'gpt 5.6 luna', 'luna'],
|
|
70
|
+
},
|
|
13
71
|
'gpt-5.4': {
|
|
14
72
|
modelName: 'gpt-5.4',
|
|
15
73
|
friendlyName: 'OpenAI (GPT-5.4)',
|
|
@@ -25,9 +83,6 @@ const SUPPORTED_MODELS = {
|
|
|
25
83
|
description:
|
|
26
84
|
'Latest flagship model (1M context, 128K output) - Superior reasoning, coding, agentic workflows, computer use. Most token-efficient reasoning model',
|
|
27
85
|
aliases: [
|
|
28
|
-
'gpt-5',
|
|
29
|
-
'gpt5',
|
|
30
|
-
'gpt 5',
|
|
31
86
|
'gpt5.4',
|
|
32
87
|
'gpt 5.4',
|
|
33
88
|
],
|
|
@@ -270,6 +325,22 @@ function resolveModelName(modelName) {
|
|
|
270
325
|
return modelName;
|
|
271
326
|
}
|
|
272
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Resolve the reasoning effort actually sent to the API for a given model.
|
|
330
|
+
* GPT-5 Pro models only accept 'high'. GPT-5.6 models dropped 'minimal'
|
|
331
|
+
* (supported efforts: none, low, medium, high, xhigh, max), so 'minimal'
|
|
332
|
+
* maps to the closest supported value.
|
|
333
|
+
*/
|
|
334
|
+
function resolveReasoningEffort(resolvedModel, reasoningEffort) {
|
|
335
|
+
if (resolvedModel.endsWith('-pro') && resolvedModel.startsWith('gpt-5')) {
|
|
336
|
+
return 'high';
|
|
337
|
+
}
|
|
338
|
+
if (resolvedModel.startsWith('gpt-5.6') && reasoningEffort === 'minimal') {
|
|
339
|
+
return 'low';
|
|
340
|
+
}
|
|
341
|
+
return reasoningEffort;
|
|
342
|
+
}
|
|
343
|
+
|
|
273
344
|
/**
|
|
274
345
|
* Validate OpenAI API key format
|
|
275
346
|
*/
|
|
@@ -393,7 +464,7 @@ export const openaiProvider = {
|
|
|
393
464
|
*/
|
|
394
465
|
async invoke(messages, options = {}) {
|
|
395
466
|
const {
|
|
396
|
-
model = 'gpt-
|
|
467
|
+
model = 'gpt-5.6',
|
|
397
468
|
temperature = 0.7,
|
|
398
469
|
maxTokens = null,
|
|
399
470
|
stream = false,
|
|
@@ -470,11 +541,8 @@ export const openaiProvider = {
|
|
|
470
541
|
(resolvedModel.startsWith('o3') || resolvedModel.startsWith('gpt-5')) &&
|
|
471
542
|
reasoning_effort
|
|
472
543
|
) {
|
|
473
|
-
// GPT-5 Pro only supports 'high' reasoning effort
|
|
474
|
-
const effectiveEffort =
|
|
475
|
-
resolvedModel.endsWith('-pro') && resolvedModel.startsWith('gpt-5') ? 'high' : reasoning_effort;
|
|
476
544
|
requestPayload.reasoning = {
|
|
477
|
-
effort:
|
|
545
|
+
effort: resolveReasoningEffort(resolvedModel, reasoning_effort),
|
|
478
546
|
summary: 'auto', // Enable reasoning summaries
|
|
479
547
|
};
|
|
480
548
|
}
|
|
@@ -510,10 +578,10 @@ export const openaiProvider = {
|
|
|
510
578
|
(resolvedModel.startsWith('o3') || resolvedModel.startsWith('gpt-5')) &&
|
|
511
579
|
reasoning_effort
|
|
512
580
|
) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
581
|
+
requestPayload.reasoning_effort = resolveReasoningEffort(
|
|
582
|
+
resolvedModel,
|
|
583
|
+
reasoning_effort,
|
|
584
|
+
);
|
|
517
585
|
}
|
|
518
586
|
|
|
519
587
|
// Add verbosity for GPT-5 models
|
|
@@ -18,7 +18,7 @@ export function getDefaultModelForProvider(providerName) {
|
|
|
18
18
|
'gemini-cli': 'gemini',
|
|
19
19
|
claude: 'claude',
|
|
20
20
|
copilot: 'copilot',
|
|
21
|
-
openai: 'gpt-5',
|
|
21
|
+
openai: 'gpt-5.6',
|
|
22
22
|
xai: 'grok-4-0709',
|
|
23
23
|
google: 'gemini-pro',
|
|
24
24
|
anthropic: 'claude-sonnet-4-20250514',
|
|
@@ -27,7 +27,7 @@ export function getDefaultModelForProvider(providerName) {
|
|
|
27
27
|
openrouter: 'qwen/qwen3-coder',
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
return defaults[providerName] || 'gpt-5';
|
|
30
|
+
return defaults[providerName] || 'gpt-5.6';
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|