converse-mcp-server 3.2.3 → 3.3.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 +39 -7
- package/docs/API.md +4 -3
- package/docs/PROVIDERS.md +4 -3
- package/package.json +16 -16
- package/src/async/jobRunner.js +2 -2
- package/src/config.js +3 -3
- package/src/providers/anthropic.js +12 -12
- package/src/providers/claude.js +2 -2
- package/src/providers/codex.js +1 -1
- package/src/providers/copilot.js +11 -11
- package/src/providers/deepseek.js +2 -2
- package/src/providers/gemini-cli.js +29 -30
- package/src/providers/google.js +41 -8
- package/src/providers/mistral.js +3 -3
- package/src/providers/openai.js +15 -15
- package/src/providers/openrouter-discovery.js +1 -1
- package/src/providers/openrouter.js +9 -9
- package/src/providers/xai.js +1 -1
- package/src/transport/httpTransport.js +1 -1
package/README.md
CHANGED
|
@@ -234,6 +234,7 @@ SUMMARIZATION_MODEL=gpt-5-nano # Default: gpt-5-nano
|
|
|
234
234
|
|
|
235
235
|
- **gemini-3.1-pro-preview** (aliases: `pro`, `gemini-pro`): Most advanced reasoning with expanded thinking levels (1M context, 64K output)
|
|
236
236
|
- **gemini-3.5-flash** (aliases: `gemini-3.5`, `flash-3.5`): Frontier-level agentic and coding performance at Flash speed (1M context, 65K output)
|
|
237
|
+
- **gemini-3.8-flash** (aliases: `gemini-3.8`, `flash-3.8`): Current-generation Flash with stronger long-horizon agentic performance (1M context, 65K output; thinking levels low/medium/high — no minimal)
|
|
237
238
|
- **gemini-2.5-pro** (alias: `pro 2.5`): Deep reasoning with thinking budget (1M context, 65K output)
|
|
238
239
|
- **gemini-2.5-flash** (alias: `flash`): Ultra-fast (1M context, 65K output)
|
|
239
240
|
- **gemini-2.5-flash-lite** (alias: `flash-lite`): Lightweight fast model (1M context, 65K output)
|
|
@@ -301,7 +302,7 @@ Reach these with the `copilot:` namespace (e.g. `copilot:gpt-5.6-terra`); uses y
|
|
|
301
302
|
|
|
302
303
|
- **OpenAI**: `gpt-5.6-sol` (aliases: `gpt-5.6`, `gpt-5`), `gpt-5.6-terra`, `gpt-5.6-luna` (all support `reasoning_effort`)
|
|
303
304
|
- **Anthropic**: `claude-fable-5` (alias: `fable`), `claude-sonnet-5` (alias: `sonnet`), `claude-opus-4.8` (aliases: `opus`, `claude`)
|
|
304
|
-
- **Google**: `gemini-3.1-pro-preview` (aliases: `gemini`, `gemini-3.1-pro`), `gemini-3.5-flash` (alias: `gemini-flash`)
|
|
305
|
+
- **Google**: `gemini-3.1-pro-preview` (aliases: `gemini`, `gemini-3.1-pro`), `gemini-3.8-flash` (aliases: `gemini-3.8`, `flash-3.8`), `gemini-3.5-flash` (alias: `gemini-flash`)
|
|
305
306
|
- Any other `copilot:<id>` is forwarded to the Copilot backend verbatim
|
|
306
307
|
|
|
307
308
|
## 📚 Help & Documentation
|
|
@@ -371,18 +372,42 @@ CODEX_APPROVAL_POLICY=never # never (default), untrusted, on-fa
|
|
|
371
372
|
|
|
372
373
|
These must be set in your system environment or when launching Claude Code, NOT in the project .env file:
|
|
373
374
|
|
|
374
|
-
| Variable
|
|
375
|
-
|
|
|
376
|
-
| `MAX_MCP_OUTPUT_TOKENS`
|
|
377
|
-
| `MCP_TOOL_TIMEOUT`
|
|
375
|
+
| Variable | Description | Default | Example |
|
|
376
|
+
| ------------------------------------ | ----------------------------------------------------------------------- | ------------------------------- | --------------------------- |
|
|
377
|
+
| `MAX_MCP_OUTPUT_TOKENS` | Token response limit | `25000` | `200000` |
|
|
378
|
+
| `MCP_TOOL_TIMEOUT` | Wall-clock limit per tool call (ms) | ~28 hours when unset | `7200000` (2 h) |
|
|
379
|
+
| `CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT` | Idle window (ms) — aborts a call that produces no output for this long | 30 min (stdio) / 5 min (HTTP) | `3600000` (60 min) |
|
|
378
380
|
|
|
379
381
|
```bash
|
|
380
382
|
# Example: Set globally before starting Claude Code
|
|
381
383
|
export MAX_MCP_OUTPUT_TOKENS=200000
|
|
382
|
-
export
|
|
384
|
+
export CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT=3600000 # 60 min for long silent agentic calls
|
|
383
385
|
claude # Then start Claude Code
|
|
384
386
|
```
|
|
385
387
|
|
|
388
|
+
Or persist them in `~/.claude/settings.json`:
|
|
389
|
+
|
|
390
|
+
```json
|
|
391
|
+
{
|
|
392
|
+
"env": {
|
|
393
|
+
"MAX_MCP_OUTPUT_TOKENS": "200000",
|
|
394
|
+
"CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT": "3600000"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**The idle timeout is usually what kills long calls.** Agentic models (Codex, Claude Agent SDK) can work silently for 30+ minutes; Converse holds one MCP request open the whole time, and Claude Code aborts it after the idle window with an error like _"failed after 30 minutes of silence. The idle timeout aborted it."_ Progress-notification heartbeats can't prevent this — Claude Code doesn't send a `progressToken` on `tools/call`, so an MCP server has no spec-compliant way to emit them ([claude-code#58687](https://github.com/anthropics/claude-code/issues/58687)). Raising the idle window is the only fix.
|
|
400
|
+
|
|
401
|
+
#### Codex CLI Tool Timeout
|
|
402
|
+
|
|
403
|
+
If you register Converse in OpenAI's Codex CLI, note that Codex enforces its own **hard 300-second default** per MCP tool call (`tool_timeout_sec`, undocumented — it exists only in Codex's config schema). Progress notifications don't extend it. Raise it in `~/.codex/config.toml`:
|
|
404
|
+
|
|
405
|
+
```toml
|
|
406
|
+
[mcp_servers.converse]
|
|
407
|
+
# ... command/env ...
|
|
408
|
+
tool_timeout_sec = 3600 # default 300 kills long calls at 5 minutes
|
|
409
|
+
```
|
|
410
|
+
|
|
386
411
|
### Model Selection
|
|
387
412
|
|
|
388
413
|
Use `"auto"` for automatic model selection, or specify exact models:
|
|
@@ -421,7 +446,7 @@ Use `"auto"` for automatic model selection, or specify exact models:
|
|
|
421
446
|
Provider priority order (subscription-based SDK providers first, then API-key providers):
|
|
422
447
|
|
|
423
448
|
1. Codex (`codex`)
|
|
424
|
-
2. Gemini via Antigravity CLI (`gemini
|
|
449
|
+
2. Gemini via Antigravity CLI (`gemini` → Gemini 3.8 Flash, `gemini:pro`)
|
|
425
450
|
3. Claude Agent SDK (`claude` → Claude Fable 5)
|
|
426
451
|
4. Copilot (`copilot`)
|
|
427
452
|
5. OpenAI (`gpt-5.6`)
|
|
@@ -532,6 +557,13 @@ For development setup, see the [Development](#-development) section below.
|
|
|
532
557
|
|
|
533
558
|
- Clear cache and reinstall: `npm run clean`
|
|
534
559
|
|
|
560
|
+
**Long tool calls aborted mid-run (idle/timeout errors):**
|
|
561
|
+
|
|
562
|
+
- The abort almost always comes from the MCP _client_, not Converse — Converse's own limits are 30 min per provider call and 90 min per async job.
|
|
563
|
+
- Claude Code: raise `CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT` (idle window, default 30 min stdio / 5 min HTTP) and check `MCP_TOOL_TIMEOUT` (wall-clock). See [Claude Code Environment Variables](#claude-code-environment-variables-systemglobal).
|
|
564
|
+
- Codex CLI: set `tool_timeout_sec` under `[mcp_servers.converse]` in `~/.codex/config.toml` — the undocumented default is 300 seconds.
|
|
565
|
+
- Immune alternative: run the call with `async: true` and poll `check_status` — each poll is a fresh short request, so no client timeout applies.
|
|
566
|
+
|
|
535
567
|
### Debug Mode
|
|
536
568
|
|
|
537
569
|
```bash
|
package/docs/API.md
CHANGED
|
@@ -391,6 +391,7 @@ Provide models as plain name strings in the `models` array. Bare names and alias
|
|
|
391
391
|
|-------|---------|---------|--------|-------|
|
|
392
392
|
| `gemini-3.1-pro-preview` | `pro`, `gemini-pro` | 1M | 64K | Most advanced reasoning, expanded thinking levels |
|
|
393
393
|
| `gemini-3.5-flash` | `gemini-3.5`, `flash-3.5` | 1M | 65K | Frontier agentic/coding at Flash speed |
|
|
394
|
+
| `gemini-3.8-flash` | `gemini-3.8`, `flash-3.8` | 1M | 65K | Current-generation Flash; thinking low/medium/high only |
|
|
394
395
|
| `gemini-2.5-pro` | `pro 2.5` | 1M | 65K | Deep reasoning with thinking budget |
|
|
395
396
|
| `gemini-2.5-flash` | `flash` | 1M | 65K | Ultra-fast |
|
|
396
397
|
| `gemini-2.5-flash-lite` | `flash-lite` | 1M | 65K | Lightweight fast model |
|
|
@@ -476,7 +477,7 @@ Any other model works via its full `provider/model` slug (e.g. `anthropic/claude
|
|
|
476
477
|
|
|
477
478
|
The **Antigravity CLI** (`agy`) provides subscription-based access to Gemini models through Google OAuth:
|
|
478
479
|
|
|
479
|
-
- **Models** (text-only): `gemini` (= `gemini:
|
|
480
|
+
- **Models** (text-only): `gemini` (= `gemini:flash`, Gemini 3.8 Flash), `gemini:pro` (Gemini 3.1 Pro)
|
|
480
481
|
- **Authentication**: Google OAuth via `agy` (one-time interactive login)
|
|
481
482
|
- **Setup**: install the Antigravity CLI and run `agy` once to log in
|
|
482
483
|
- **Billing**: uses your Antigravity subscription/compute allowance instead of API credits
|
|
@@ -502,7 +503,7 @@ Reach these with the `copilot:` namespace (e.g. `copilot:gpt-5.6-terra`); uses y
|
|
|
502
503
|
|
|
503
504
|
- **OpenAI**: `gpt-5.6-sol` (aliases: `gpt-5.6`, `gpt-5`), `gpt-5.6-terra`, `gpt-5.6-luna` (all accept `reasoning_effort`)
|
|
504
505
|
- **Anthropic**: `claude-fable-5` (alias: `fable`), `claude-sonnet-5` (alias: `sonnet`), `claude-opus-5` (aliases: `opus`, `claude`), `claude-opus-4.8`
|
|
505
|
-
- **Google**: `gemini-3.1-pro-preview` (aliases: `gemini`, `gemini-3.1-pro`), `gemini-3.5-flash` (alias: `gemini-flash`)
|
|
506
|
+
- **Google**: `gemini-3.1-pro-preview` (aliases: `gemini`, `gemini-3.1-pro`), `gemini-3.8-flash` (aliases: `gemini-3.8`, `flash-3.8`), `gemini-3.5-flash` (alias: `gemini-flash`)
|
|
506
507
|
- Any other `copilot:<id>` is forwarded to the Copilot backend verbatim
|
|
507
508
|
|
|
508
509
|
### Model Selection
|
|
@@ -522,7 +523,7 @@ Use `"auto"` for automatic selection, or specify exact models:
|
|
|
522
523
|
"opus" // Anthropic API (-> claude-opus-5)
|
|
523
524
|
"claude" // Claude Agent SDK (-> Claude Fable 5)
|
|
524
525
|
"claude:opus" // Claude Agent SDK (Claude Opus 5)
|
|
525
|
-
"gemini" // Antigravity CLI (Gemini 3.
|
|
526
|
+
"gemini" // Antigravity CLI (Gemini 3.8 Flash)
|
|
526
527
|
"copilot:gpt-5.6-terra" // GitHub Copilot SDK
|
|
527
528
|
```
|
|
528
529
|
|
package/docs/PROVIDERS.md
CHANGED
|
@@ -24,6 +24,7 @@ This guide documents all supported AI providers in the Converse MCP Server and t
|
|
|
24
24
|
- **Supported Models**:
|
|
25
25
|
- `gemini-3.1-pro-preview` (aliases: `pro`, `gemini-pro`) - Most advanced reasoning with expanded thinking levels (1M context, 64K output)
|
|
26
26
|
- `gemini-3.5-flash` (aliases: `gemini-3.5`, `flash-3.5`) - Frontier-level agentic and coding performance at Flash speed (1M context, 65K output)
|
|
27
|
+
- `gemini-3.8-flash` (aliases: `gemini-3.8`, `flash-3.8`) - Current-generation Flash with stronger long-horizon agentic performance (1M context, 65K output; thinking levels low/medium/high — no minimal)
|
|
27
28
|
- `gemini-2.5-pro` (alias: `pro 2.5`) - Deep reasoning with thinking budget (1M context, 65K output)
|
|
28
29
|
- `gemini-2.5-flash` (alias: `flash`) - Ultra-fast model with thinking budget (1M context, 65K output)
|
|
29
30
|
- `gemini-2.5-flash-lite` (alias: `flash-lite`) - Lightweight fast model (1M context, 65K output)
|
|
@@ -129,8 +130,8 @@ This guide documents all supported AI providers in the Converse MCP Server and t
|
|
|
129
130
|
2. Authenticate: run `agy` once interactively and complete the Google OAuth login. This also establishes workspace trust for your home directory (the provider spawns each call in a per-call subdirectory under `~/.converse/agy-runs`).
|
|
130
131
|
- **Environment Variables**: None (the provider detects the `agy` binary on PATH or at the platform install location)
|
|
131
132
|
- **Supported Models** (text-only — print mode has no image input channel):
|
|
132
|
-
- `gemini` (= `gemini:
|
|
133
|
-
- `gemini:
|
|
133
|
+
- `gemini` (= `gemini:flash`) - Gemini 3.8 Flash (default)
|
|
134
|
+
- `gemini:pro` - Gemini 3.1 Pro
|
|
134
135
|
- `reasoning_effort` selects the variant: `low` → (Low), `medium` → (Medium) for Flash / (High) for Pro, `high`/`max` → (High); unset defaults to (High)
|
|
135
136
|
|
|
136
137
|
**Key Features:**
|
|
@@ -216,7 +217,7 @@ agy
|
|
|
216
217
|
- `copilot` - Uses Copilot's default or env-configured model
|
|
217
218
|
- OpenAI: `gpt-5.6-sol` (aliases: bare `gpt-5.6`, `gpt-5`), `gpt-5.6-terra` (recommended balanced tier), `gpt-5.6-luna`
|
|
218
219
|
- Anthropic: `claude-fable-5` (alias: `fable`), `claude-sonnet-5` (alias: `sonnet`), `claude-opus-5` (aliases: `opus`, `claude`), `claude-opus-4.8`
|
|
219
|
-
- Google: `gemini-3.1-pro-preview` (aliases: `gemini`, `gemini-3.1-pro`), `gemini-3.5-flash` (alias: `gemini-flash`)
|
|
220
|
+
- Google: `gemini-3.1-pro-preview` (aliases: `gemini`, `gemini-3.1-pro`), `gemini-3.8-flash` (aliases: `gemini-3.8`, `flash-3.8`), `gemini-3.5-flash` (alias: `gemini-flash`)
|
|
220
221
|
- **Reasoning**: The `gpt-5.6-sol`/`terra`/`luna` tiers accept `reasoning_effort`.
|
|
221
222
|
- **Explicit pass-through**: Any other `copilot:<id>` model string is forwarded to the Copilot backend verbatim, so IDs outside the curated list still work while the backend accepts them.
|
|
222
223
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "converse-mcp-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.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,28 +93,28 @@
|
|
|
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.
|
|
100
|
-
"@lydell/node-pty": "1.2.0-beta.
|
|
101
|
-
"@mistralai/mistralai": "^2.
|
|
102
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
103
|
-
"@openai/codex-sdk": "^0.
|
|
96
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.258",
|
|
97
|
+
"@anthropic-ai/sdk": "^0.123.0",
|
|
98
|
+
"@github/copilot-sdk": "^1.0.11",
|
|
99
|
+
"@google/genai": "^2.20.0",
|
|
100
|
+
"@lydell/node-pty": "1.2.0-beta.15",
|
|
101
|
+
"@mistralai/mistralai": "^2.6.4",
|
|
102
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
103
|
+
"@openai/codex-sdk": "^0.152.1",
|
|
104
104
|
"cors": "^2.8.6",
|
|
105
105
|
"dotenv": "^17.4.2",
|
|
106
106
|
"express": "^5.2.1",
|
|
107
107
|
"lru-cache": "^11.5.2",
|
|
108
|
-
"nanoid": "^6.0.
|
|
109
|
-
"openai": "^
|
|
110
|
-
"p-limit": "^7.3.
|
|
111
|
-
"vite": "^8.
|
|
108
|
+
"nanoid": "^6.0.1",
|
|
109
|
+
"openai": "^7.9.0",
|
|
110
|
+
"p-limit": "^7.3.2",
|
|
111
|
+
"vite": "^8.2.2"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@vitest/coverage-v8": "^4.1.
|
|
114
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
115
115
|
"cross-env": "^10.1.0",
|
|
116
|
-
"eslint": "^10.
|
|
116
|
+
"eslint": "^10.9.1",
|
|
117
117
|
"rimraf": "^6.1.3",
|
|
118
|
-
"vitest": "^4.1.
|
|
118
|
+
"vitest": "^4.1.11"
|
|
119
119
|
}
|
|
120
120
|
}
|
package/src/async/jobRunner.js
CHANGED
|
@@ -35,7 +35,7 @@ export class JobRunner extends EventEmitter {
|
|
|
35
35
|
* @param {object} dependencies.eventBus - EventBus instance (optional, uses global if not provided)
|
|
36
36
|
* @param {object} options - Configuration options
|
|
37
37
|
* @param {number} options.concurrency - Maximum concurrent jobs (default: 10)
|
|
38
|
-
* @param {number} options.defaultTimeout - Default job timeout in ms (default:
|
|
38
|
+
* @param {number} options.defaultTimeout - Default job timeout in ms (default: 90 minutes)
|
|
39
39
|
*/
|
|
40
40
|
constructor(dependencies, options = {}) {
|
|
41
41
|
super();
|
|
@@ -54,7 +54,7 @@ export class JobRunner extends EventEmitter {
|
|
|
54
54
|
|
|
55
55
|
// Configuration
|
|
56
56
|
this.concurrency = options.concurrency || 10;
|
|
57
|
-
this.defaultTimeout = options.defaultTimeout ||
|
|
57
|
+
this.defaultTimeout = options.defaultTimeout || 90 * 60 * 1000; // 90 minutes
|
|
58
58
|
|
|
59
59
|
// Create bounded concurrency limiter
|
|
60
60
|
this.limiter = pLimit(this.concurrency);
|
package/src/config.js
CHANGED
|
@@ -78,8 +78,8 @@ const CONFIG_SCHEMA = {
|
|
|
78
78
|
},
|
|
79
79
|
HTTP_REQUEST_TIMEOUT: {
|
|
80
80
|
type: 'number',
|
|
81
|
-
default:
|
|
82
|
-
description: 'HTTP request timeout in milliseconds (
|
|
81
|
+
default: 900000,
|
|
82
|
+
description: 'HTTP request timeout in milliseconds (15 minutes)',
|
|
83
83
|
},
|
|
84
84
|
HTTP_MAX_REQUEST_SIZE: {
|
|
85
85
|
type: 'string',
|
|
@@ -768,7 +768,7 @@ export function getHttpTransportConfig(config) {
|
|
|
768
768
|
// Server settings
|
|
769
769
|
port: transport.port || 3157,
|
|
770
770
|
host: transport.host || 'localhost',
|
|
771
|
-
requestTimeout: transport.requesttimeout ||
|
|
771
|
+
requestTimeout: transport.requesttimeout || 900000,
|
|
772
772
|
maxRequestSize: transport.maxrequestsize || '10mb',
|
|
773
773
|
|
|
774
774
|
// Session management
|
|
@@ -23,7 +23,7 @@ const SUPPORTED_MODELS = {
|
|
|
23
23
|
supportsWebSearch: false,
|
|
24
24
|
supportsThinking: true,
|
|
25
25
|
supportsAdaptiveThinking: true, // Adaptive thinking is the only thinking mode
|
|
26
|
-
timeout:
|
|
26
|
+
timeout: 1800000,
|
|
27
27
|
supportsEffort: true,
|
|
28
28
|
effortGA: true,
|
|
29
29
|
supportsCompaction: true,
|
|
@@ -48,7 +48,7 @@ const SUPPORTED_MODELS = {
|
|
|
48
48
|
supportsWebSearch: false,
|
|
49
49
|
supportsThinking: true,
|
|
50
50
|
supportsAdaptiveThinking: true, // Thinking is on by default; adaptive is the only on-mode
|
|
51
|
-
timeout:
|
|
51
|
+
timeout: 1800000,
|
|
52
52
|
supportsEffort: true,
|
|
53
53
|
effortGA: true,
|
|
54
54
|
supportsCompaction: true,
|
|
@@ -76,7 +76,7 @@ const SUPPORTED_MODELS = {
|
|
|
76
76
|
supportsAdaptiveThinking: true,
|
|
77
77
|
minThinkingTokens: 1024,
|
|
78
78
|
maxThinkingTokens: 128000,
|
|
79
|
-
timeout:
|
|
79
|
+
timeout: 1800000,
|
|
80
80
|
supportsEffort: true,
|
|
81
81
|
effortGA: true,
|
|
82
82
|
supports1MContext: true,
|
|
@@ -106,7 +106,7 @@ const SUPPORTED_MODELS = {
|
|
|
106
106
|
supportsAdaptiveThinking: true,
|
|
107
107
|
minThinkingTokens: 1024,
|
|
108
108
|
maxThinkingTokens: 128000,
|
|
109
|
-
timeout:
|
|
109
|
+
timeout: 1800000,
|
|
110
110
|
supportsEffort: true,
|
|
111
111
|
effortGA: true,
|
|
112
112
|
supports1MContext: true,
|
|
@@ -136,7 +136,7 @@ const SUPPORTED_MODELS = {
|
|
|
136
136
|
supportsAdaptiveThinking: true,
|
|
137
137
|
minThinkingTokens: 1024,
|
|
138
138
|
maxThinkingTokens: 128000,
|
|
139
|
-
timeout:
|
|
139
|
+
timeout: 1800000,
|
|
140
140
|
supportsEffort: true,
|
|
141
141
|
effortGA: true,
|
|
142
142
|
supports1MContext: true,
|
|
@@ -165,7 +165,7 @@ const SUPPORTED_MODELS = {
|
|
|
165
165
|
supportsThinking: true,
|
|
166
166
|
minThinkingTokens: 1024,
|
|
167
167
|
maxThinkingTokens: 64000,
|
|
168
|
-
timeout:
|
|
168
|
+
timeout: 900000,
|
|
169
169
|
supportsEffort: true, // Opus 4.5 effort parameter (requires beta header)
|
|
170
170
|
description:
|
|
171
171
|
'Claude Opus 4.5 - Previous most intelligent model combining maximum capability with practical performance',
|
|
@@ -191,7 +191,7 @@ const SUPPORTED_MODELS = {
|
|
|
191
191
|
supportsThinking: true,
|
|
192
192
|
minThinkingTokens: 1024,
|
|
193
193
|
maxThinkingTokens: 32000,
|
|
194
|
-
timeout:
|
|
194
|
+
timeout: 900000,
|
|
195
195
|
description:
|
|
196
196
|
'Claude Opus 4.1 - Highest level of intelligence and capability with extended thinking',
|
|
197
197
|
aliases: [
|
|
@@ -220,7 +220,7 @@ const SUPPORTED_MODELS = {
|
|
|
220
220
|
supportsAdaptiveThinking: true, // Sonnet 4.6: thinking: {type: "adaptive"} recommended
|
|
221
221
|
minThinkingTokens: 1024,
|
|
222
222
|
maxThinkingTokens: 64000,
|
|
223
|
-
timeout:
|
|
223
|
+
timeout: 900000,
|
|
224
224
|
supportsEffort: true,
|
|
225
225
|
effortGA: true, // Effort is generally available, no beta header required
|
|
226
226
|
supports1MContext: true, // Beta 1M context support
|
|
@@ -251,7 +251,7 @@ const SUPPORTED_MODELS = {
|
|
|
251
251
|
supportsThinking: true,
|
|
252
252
|
minThinkingTokens: 1024,
|
|
253
253
|
maxThinkingTokens: 64000,
|
|
254
|
-
timeout:
|
|
254
|
+
timeout: 900000,
|
|
255
255
|
supports1MContext: true, // Beta 1M context support
|
|
256
256
|
deprecated: true,
|
|
257
257
|
description:
|
|
@@ -275,7 +275,7 @@ const SUPPORTED_MODELS = {
|
|
|
275
275
|
supportsThinking: true,
|
|
276
276
|
minThinkingTokens: 1024,
|
|
277
277
|
maxThinkingTokens: 64000,
|
|
278
|
-
timeout:
|
|
278
|
+
timeout: 900000,
|
|
279
279
|
description:
|
|
280
280
|
'Claude Haiku 4.5 - Fast and intelligent model with extended thinking',
|
|
281
281
|
aliases: [
|
|
@@ -598,8 +598,8 @@ export const anthropicProvider = {
|
|
|
598
598
|
// Initialize Anthropic client
|
|
599
599
|
const anthropic = new Anthropic({
|
|
600
600
|
apiKey: config.apiKeys.anthropic,
|
|
601
|
-
// Increase timeout to
|
|
602
|
-
timeout:
|
|
601
|
+
// Increase timeout to 60 minutes for thinking models that may take longer
|
|
602
|
+
timeout: 60 * 60 * 1000,
|
|
603
603
|
});
|
|
604
604
|
|
|
605
605
|
// Build beta features array for the request
|
package/src/providers/claude.js
CHANGED
|
@@ -29,7 +29,7 @@ const SUPPORTED_MODELS = {
|
|
|
29
29
|
supportsStreaming: true,
|
|
30
30
|
supportsImages: true, // Supported via streaming input mode
|
|
31
31
|
supportsWebSearch: false, // SDK accesses files directly, not web
|
|
32
|
-
timeout:
|
|
32
|
+
timeout: 1800000, // 30 minutes
|
|
33
33
|
description:
|
|
34
34
|
'Claude Fable 5 via Agent SDK (default) - requires claude login authentication',
|
|
35
35
|
aliases: [
|
|
@@ -50,7 +50,7 @@ const SUPPORTED_MODELS = {
|
|
|
50
50
|
supportsStreaming: true,
|
|
51
51
|
supportsImages: true, // Supported via streaming input mode
|
|
52
52
|
supportsWebSearch: false, // SDK accesses files directly, not web
|
|
53
|
-
timeout:
|
|
53
|
+
timeout: 1800000, // 30 minutes
|
|
54
54
|
description:
|
|
55
55
|
'Claude Opus 5 via Agent SDK - requires claude login authentication',
|
|
56
56
|
aliases: ['claude:opus', 'claude-opus-5'],
|
package/src/providers/codex.js
CHANGED
|
@@ -32,7 +32,7 @@ const SUPPORTED_MODELS = {
|
|
|
32
32
|
// still advertises the pre-5.6 set — the backend is the authority, so the
|
|
33
33
|
// accepted tiers are declared per model and requests are clamped onto them.
|
|
34
34
|
supportedEfforts: ['none', 'low', 'medium', 'high', 'xhigh'],
|
|
35
|
-
timeout:
|
|
35
|
+
timeout: 1800000, // 30 minutes
|
|
36
36
|
description:
|
|
37
37
|
'OpenAI Codex agentic coding assistant with local file access and tool execution (GPT-5.6)',
|
|
38
38
|
aliases: [
|
package/src/providers/copilot.js
CHANGED
|
@@ -27,7 +27,7 @@ const SUPPORTED_MODELS = {
|
|
|
27
27
|
supportsStreaming: true,
|
|
28
28
|
supportsImages: false,
|
|
29
29
|
supportsWebSearch: false,
|
|
30
|
-
timeout:
|
|
30
|
+
timeout: 1800000,
|
|
31
31
|
description:
|
|
32
32
|
'GitHub Copilot via CLI SDK - uses default or env-configured model',
|
|
33
33
|
aliases: ['copilot-sdk', 'github-copilot'],
|
|
@@ -48,7 +48,7 @@ const SUPPORTED_MODELS = {
|
|
|
48
48
|
supportsImages: false,
|
|
49
49
|
supportsWebSearch: false,
|
|
50
50
|
supportsReasoningEffort: true,
|
|
51
|
-
timeout:
|
|
51
|
+
timeout: 1800000,
|
|
52
52
|
description: 'OpenAI GPT-5.6 Sol via Copilot subscription',
|
|
53
53
|
aliases: ['gpt-5.6', 'gpt-5', 'gpt', 'codex'],
|
|
54
54
|
},
|
|
@@ -61,7 +61,7 @@ const SUPPORTED_MODELS = {
|
|
|
61
61
|
supportsImages: false,
|
|
62
62
|
supportsWebSearch: false,
|
|
63
63
|
supportsReasoningEffort: true,
|
|
64
|
-
timeout:
|
|
64
|
+
timeout: 1800000,
|
|
65
65
|
description: 'OpenAI GPT-5.6 Terra via Copilot subscription',
|
|
66
66
|
aliases: [],
|
|
67
67
|
},
|
|
@@ -74,7 +74,7 @@ const SUPPORTED_MODELS = {
|
|
|
74
74
|
supportsImages: false,
|
|
75
75
|
supportsWebSearch: false,
|
|
76
76
|
supportsReasoningEffort: true,
|
|
77
|
-
timeout:
|
|
77
|
+
timeout: 1800000,
|
|
78
78
|
description: 'OpenAI GPT-5.6 Luna via Copilot subscription',
|
|
79
79
|
aliases: [],
|
|
80
80
|
},
|
|
@@ -88,7 +88,7 @@ const SUPPORTED_MODELS = {
|
|
|
88
88
|
supportsStreaming: true,
|
|
89
89
|
supportsImages: false,
|
|
90
90
|
supportsWebSearch: false,
|
|
91
|
-
timeout:
|
|
91
|
+
timeout: 1800000,
|
|
92
92
|
description: 'Anthropic Claude Fable 5 via Copilot subscription',
|
|
93
93
|
aliases: ['fable'],
|
|
94
94
|
},
|
|
@@ -100,7 +100,7 @@ const SUPPORTED_MODELS = {
|
|
|
100
100
|
supportsStreaming: true,
|
|
101
101
|
supportsImages: false,
|
|
102
102
|
supportsWebSearch: false,
|
|
103
|
-
timeout:
|
|
103
|
+
timeout: 1800000,
|
|
104
104
|
description: 'Anthropic Claude Sonnet 5 via Copilot subscription',
|
|
105
105
|
aliases: ['sonnet'],
|
|
106
106
|
},
|
|
@@ -112,7 +112,7 @@ const SUPPORTED_MODELS = {
|
|
|
112
112
|
supportsStreaming: true,
|
|
113
113
|
supportsImages: false,
|
|
114
114
|
supportsWebSearch: false,
|
|
115
|
-
timeout:
|
|
115
|
+
timeout: 1800000,
|
|
116
116
|
description: 'Anthropic Claude Opus 5 via Copilot subscription',
|
|
117
117
|
aliases: ['opus', 'claude'],
|
|
118
118
|
},
|
|
@@ -124,7 +124,7 @@ const SUPPORTED_MODELS = {
|
|
|
124
124
|
supportsStreaming: true,
|
|
125
125
|
supportsImages: false,
|
|
126
126
|
supportsWebSearch: false,
|
|
127
|
-
timeout:
|
|
127
|
+
timeout: 1800000,
|
|
128
128
|
description: 'Anthropic Claude Opus 4.8 via Copilot subscription',
|
|
129
129
|
aliases: [],
|
|
130
130
|
},
|
|
@@ -139,7 +139,7 @@ const SUPPORTED_MODELS = {
|
|
|
139
139
|
supportsStreaming: true,
|
|
140
140
|
supportsImages: false,
|
|
141
141
|
supportsWebSearch: false,
|
|
142
|
-
timeout:
|
|
142
|
+
timeout: 1800000,
|
|
143
143
|
description: 'Google Gemini 3.1 Pro Preview via Copilot subscription',
|
|
144
144
|
aliases: ['gemini', 'gemini-3.1-pro'],
|
|
145
145
|
},
|
|
@@ -151,7 +151,7 @@ const SUPPORTED_MODELS = {
|
|
|
151
151
|
supportsStreaming: true,
|
|
152
152
|
supportsImages: false,
|
|
153
153
|
supportsWebSearch: false,
|
|
154
|
-
timeout:
|
|
154
|
+
timeout: 1800000,
|
|
155
155
|
description: 'Google Gemini 3.5 Flash via Copilot subscription',
|
|
156
156
|
aliases: ['gemini-flash'],
|
|
157
157
|
},
|
|
@@ -553,7 +553,7 @@ async function checkReasoningSupport(client, modelId) {
|
|
|
553
553
|
}
|
|
554
554
|
|
|
555
555
|
async function* createStreamingGenerator(client, prompt, options, signal, config) {
|
|
556
|
-
const { model, timeout =
|
|
556
|
+
const { model, timeout = 1800000, reasoning_effort } = options;
|
|
557
557
|
|
|
558
558
|
const sessionModel = resolveSessionModel(model, config);
|
|
559
559
|
const accessLevel = getToolAccessLevel(config);
|
|
@@ -29,7 +29,7 @@ const SUPPORTED_MODELS = {
|
|
|
29
29
|
supportsReasoning: true,
|
|
30
30
|
supportsJsonOutput: true,
|
|
31
31
|
supportsFunctionCalling: true,
|
|
32
|
-
timeout:
|
|
32
|
+
timeout: 1800000, // Longer timeout for reasoning
|
|
33
33
|
description:
|
|
34
34
|
'DeepSeek V4 Pro - flagship MoE model with 1M context and thinking mode',
|
|
35
35
|
aliases: ['deepseek', 'deepseek-pro'],
|
|
@@ -46,7 +46,7 @@ const SUPPORTED_MODELS = {
|
|
|
46
46
|
supportsReasoning: true,
|
|
47
47
|
supportsJsonOutput: true,
|
|
48
48
|
supportsFunctionCalling: true,
|
|
49
|
-
timeout:
|
|
49
|
+
timeout: 1800000, // Longer timeout for reasoning
|
|
50
50
|
description:
|
|
51
51
|
'DeepSeek V4 Flash - faster, lower-cost V4 tier with 1M context and thinking mode',
|
|
52
52
|
aliases: ['deepseek-flash'],
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
* The provider registry key remains 'gemini-cli' and the user-facing alias
|
|
22
22
|
* remains 'gemini' for routing/normalization stability. Only three user-facing
|
|
23
|
-
* model names are exposed: gemini (= gemini:
|
|
23
|
+
* model names are exposed: gemini (= gemini:flash), gemini:flash, gemini:pro.
|
|
24
|
+
* Flash is the default: Gemini 3.8 Flash is the current-generation model agy
|
|
25
|
+
* lists first, while 3.1 Pro remains the only Pro tier Antigravity offers.
|
|
24
26
|
*/
|
|
25
27
|
|
|
26
28
|
import { existsSync, mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
@@ -37,7 +39,7 @@ import { ProviderError, ErrorCodes, StopReasons } from './interface.js';
|
|
|
37
39
|
const ARGV_PROMPT_LIMIT = 24000;
|
|
38
40
|
|
|
39
41
|
// Default print timeout (ms) when the tool layer passes none.
|
|
40
|
-
const DEFAULT_TIMEOUT_MS =
|
|
42
|
+
const DEFAULT_TIMEOUT_MS = 1800000;
|
|
41
43
|
|
|
42
44
|
// Extra wall-clock grace before the JS-side hard kill fires (ms).
|
|
43
45
|
const HARD_KILL_GRACE_MS = 15000;
|
|
@@ -57,7 +59,7 @@ const PTY_COLS = 1000;
|
|
|
57
59
|
const SUPPORTED_MODELS = {
|
|
58
60
|
gemini: {
|
|
59
61
|
modelName: 'gemini',
|
|
60
|
-
friendlyName: 'Gemini 3.
|
|
62
|
+
friendlyName: 'Gemini 3.8 Flash (via Antigravity CLI)',
|
|
61
63
|
contextWindow: 1048576,
|
|
62
64
|
maxOutputTokens: 65536,
|
|
63
65
|
supportsStreaming: true,
|
|
@@ -66,14 +68,14 @@ const SUPPORTED_MODELS = {
|
|
|
66
68
|
supportsThinking: true,
|
|
67
69
|
timeout: DEFAULT_TIMEOUT_MS,
|
|
68
70
|
description:
|
|
69
|
-
'Gemini 3.
|
|
71
|
+
'Gemini 3.8 Flash via Antigravity CLI (agy) - requires Antigravity Google OAuth login',
|
|
70
72
|
aliases: ['gemini-cli'],
|
|
71
73
|
// agy display-name base; reasoning_effort selects the parenthesized variant
|
|
72
|
-
agyModelBase: 'Gemini 3.
|
|
74
|
+
agyModelBase: 'Gemini 3.8 Flash',
|
|
73
75
|
},
|
|
74
|
-
'gemini:
|
|
75
|
-
modelName: 'gemini:
|
|
76
|
-
friendlyName: 'Gemini 3.
|
|
76
|
+
'gemini:flash': {
|
|
77
|
+
modelName: 'gemini:flash',
|
|
78
|
+
friendlyName: 'Gemini 3.8 Flash (via Antigravity CLI)',
|
|
77
79
|
contextWindow: 1048576,
|
|
78
80
|
maxOutputTokens: 65536,
|
|
79
81
|
supportsStreaming: true,
|
|
@@ -82,13 +84,13 @@ const SUPPORTED_MODELS = {
|
|
|
82
84
|
supportsThinking: true,
|
|
83
85
|
timeout: DEFAULT_TIMEOUT_MS,
|
|
84
86
|
description:
|
|
85
|
-
'Gemini 3.
|
|
86
|
-
aliases: [],
|
|
87
|
-
agyModelBase: 'Gemini 3.
|
|
87
|
+
'Gemini 3.8 Flash via Antigravity CLI (agy) - explicit alias of `gemini`',
|
|
88
|
+
aliases: ['flash'],
|
|
89
|
+
agyModelBase: 'Gemini 3.8 Flash',
|
|
88
90
|
},
|
|
89
|
-
'gemini:
|
|
90
|
-
modelName: 'gemini:
|
|
91
|
-
friendlyName: 'Gemini 3.
|
|
91
|
+
'gemini:pro': {
|
|
92
|
+
modelName: 'gemini:pro',
|
|
93
|
+
friendlyName: 'Gemini 3.1 Pro (via Antigravity CLI)',
|
|
92
94
|
contextWindow: 1048576,
|
|
93
95
|
maxOutputTokens: 65536,
|
|
94
96
|
supportsStreaming: true,
|
|
@@ -97,9 +99,9 @@ const SUPPORTED_MODELS = {
|
|
|
97
99
|
supportsThinking: true,
|
|
98
100
|
timeout: DEFAULT_TIMEOUT_MS,
|
|
99
101
|
description:
|
|
100
|
-
'Gemini 3.
|
|
101
|
-
aliases: ['
|
|
102
|
-
agyModelBase: 'Gemini 3.
|
|
102
|
+
'Gemini 3.1 Pro via Antigravity CLI (agy) - requires Antigravity Google OAuth login',
|
|
103
|
+
aliases: ['pro'],
|
|
104
|
+
agyModelBase: 'Gemini 3.1 Pro',
|
|
103
105
|
},
|
|
104
106
|
};
|
|
105
107
|
|
|
@@ -175,7 +177,7 @@ export function findAgyBinary() {
|
|
|
175
177
|
/**
|
|
176
178
|
* Map a reasoning_effort value to the agy parenthesized variant suffix.
|
|
177
179
|
* Flash supports Low/Medium/High; Pro supports Low/High (no Medium).
|
|
178
|
-
* @param {string} base - agy model base ('Gemini 3.
|
|
180
|
+
* @param {string} base - agy model base ('Gemini 3.8 Flash' / 'Gemini 3.1 Pro')
|
|
179
181
|
* @param {string} [reasoningEffort]
|
|
180
182
|
* @returns {string} e.g. '(Low)', '(Medium)', '(High)'
|
|
181
183
|
*/
|
|
@@ -207,7 +209,7 @@ function effortSuffix(base, reasoningEffort) {
|
|
|
207
209
|
* verbatim so power users aren't blocked.
|
|
208
210
|
* @param {string} model - e.g. 'gemini', 'gemini:flash', or a full agy name
|
|
209
211
|
* @param {string} [reasoningEffort]
|
|
210
|
-
* @returns {string} agy --model value, e.g. 'Gemini 3.
|
|
212
|
+
* @returns {string} agy --model value, e.g. 'Gemini 3.8 Flash (High)'
|
|
211
213
|
*/
|
|
212
214
|
export function resolveAgyModel(model, reasoningEffort) {
|
|
213
215
|
const raw = typeof model === 'string' ? model.trim() : '';
|
|
@@ -230,11 +232,11 @@ export function resolveAgyModel(model, reasoningEffort) {
|
|
|
230
232
|
!nameLower ||
|
|
231
233
|
nameLower === 'gemini' ||
|
|
232
234
|
nameLower === 'gemini-cli' ||
|
|
233
|
-
nameLower === '
|
|
235
|
+
nameLower === 'flash'
|
|
234
236
|
) {
|
|
235
237
|
base = SUPPORTED_MODELS.gemini.agyModelBase;
|
|
236
|
-
} else if (nameLower === '
|
|
237
|
-
base = SUPPORTED_MODELS['gemini:
|
|
238
|
+
} else if (nameLower === 'pro') {
|
|
239
|
+
base = SUPPORTED_MODELS['gemini:pro'].agyModelBase;
|
|
238
240
|
} else {
|
|
239
241
|
// Unknown suffix: pass through verbatim (power-user agy display name)
|
|
240
242
|
return raw;
|
|
@@ -762,19 +764,16 @@ export const geminiCliProvider = {
|
|
|
762
764
|
|
|
763
765
|
const name = modelName.toLowerCase().trim();
|
|
764
766
|
|
|
765
|
-
// Full agy display-name passthrough → matching
|
|
766
|
-
|
|
767
|
+
// Full agy display-name passthrough → matching tier config. Any 3.x Flash
|
|
768
|
+
// (agy also lists 3.6/3.7) shares the Flash config; any 3.x Pro the Pro one.
|
|
769
|
+
if (/gemini 3\.\d+ flash/i.test(modelName)) {
|
|
767
770
|
return SUPPORTED_MODELS['gemini:flash'];
|
|
768
771
|
}
|
|
769
|
-
if (/gemini 3
|
|
770
|
-
return SUPPORTED_MODELS.gemini;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
if (name === 'pro') {
|
|
772
|
+
if (/gemini 3\.\d+ pro/i.test(modelName)) {
|
|
774
773
|
return SUPPORTED_MODELS['gemini:pro'];
|
|
775
774
|
}
|
|
776
775
|
|
|
777
|
-
// Exact key match (gemini, gemini:
|
|
776
|
+
// Exact key match (gemini, gemini:flash, gemini:pro)
|
|
778
777
|
if (SUPPORTED_MODELS[name]) {
|
|
779
778
|
return SUPPORTED_MODELS[name];
|
|
780
779
|
}
|
package/src/providers/google.js
CHANGED
|
@@ -20,7 +20,7 @@ const SUPPORTED_MODELS = {
|
|
|
20
20
|
supportsThinking: true,
|
|
21
21
|
supportsWebSearch: true,
|
|
22
22
|
maxThinkingTokens: 24576,
|
|
23
|
-
timeout:
|
|
23
|
+
timeout: 900000,
|
|
24
24
|
description:
|
|
25
25
|
'Ultra-fast (1M context) - Quick analysis, simple queries, rapid iterations with grounding',
|
|
26
26
|
aliases: [
|
|
@@ -45,7 +45,7 @@ const SUPPORTED_MODELS = {
|
|
|
45
45
|
supportsThinking: true,
|
|
46
46
|
supportsWebSearch: true,
|
|
47
47
|
maxThinkingTokens: 24576,
|
|
48
|
-
timeout:
|
|
48
|
+
timeout: 900000,
|
|
49
49
|
description:
|
|
50
50
|
'Lightweight fast model (1M context) - Efficient quick responses with grounding',
|
|
51
51
|
aliases: [
|
|
@@ -68,7 +68,7 @@ const SUPPORTED_MODELS = {
|
|
|
68
68
|
supportsImages: true,
|
|
69
69
|
supportsThinking: true,
|
|
70
70
|
maxThinkingTokens: 32768,
|
|
71
|
-
timeout:
|
|
71
|
+
timeout: 900000,
|
|
72
72
|
description:
|
|
73
73
|
'Deep reasoning + thinking mode (1M context) - Complex problems, architecture, deep analysis',
|
|
74
74
|
aliases: ['pro 2.5', 'gemini pro 2.5', 'gemini-2.5-pro-latest'],
|
|
@@ -84,7 +84,7 @@ const SUPPORTED_MODELS = {
|
|
|
84
84
|
supportsWebSearch: true,
|
|
85
85
|
thinkingMode: 'level',
|
|
86
86
|
thinkingLevels: ['minimal', 'low', 'medium', 'high'],
|
|
87
|
-
timeout:
|
|
87
|
+
timeout: 900000,
|
|
88
88
|
description:
|
|
89
89
|
'Gemini 3.1 Pro - Most advanced reasoning with expanded thinking levels (1M context)',
|
|
90
90
|
aliases: [
|
|
@@ -113,7 +113,7 @@ const SUPPORTED_MODELS = {
|
|
|
113
113
|
supportsWebSearch: true,
|
|
114
114
|
thinkingMode: 'level',
|
|
115
115
|
thinkingLevels: ['minimal', 'low', 'medium', 'high'],
|
|
116
|
-
timeout:
|
|
116
|
+
timeout: 900000,
|
|
117
117
|
description:
|
|
118
118
|
'Gemini 3.5 Flash - Frontier-level agentic and coding performance at Flash speed (1M context)',
|
|
119
119
|
aliases: [
|
|
@@ -127,6 +127,32 @@ const SUPPORTED_MODELS = {
|
|
|
127
127
|
'3.5-flash',
|
|
128
128
|
],
|
|
129
129
|
},
|
|
130
|
+
'gemini-3.8-flash': {
|
|
131
|
+
modelName: 'gemini-3.8-flash',
|
|
132
|
+
friendlyName: 'Gemini (Flash 3.8)',
|
|
133
|
+
contextWindow: 1048576, // 1M tokens
|
|
134
|
+
maxOutputTokens: 65536,
|
|
135
|
+
supportsStreaming: true,
|
|
136
|
+
supportsImages: true,
|
|
137
|
+
supportsThinking: true,
|
|
138
|
+
supportsWebSearch: true,
|
|
139
|
+
thinkingMode: 'level',
|
|
140
|
+
// 3.8 Flash rejects thinkingLevel "minimal" outright (API error), unlike 3.5.
|
|
141
|
+
thinkingLevels: ['low', 'medium', 'high'],
|
|
142
|
+
timeout: 900000,
|
|
143
|
+
description:
|
|
144
|
+
'Gemini 3.8 Flash - Current-generation Flash with stronger long-horizon agentic performance (1M context)',
|
|
145
|
+
aliases: [
|
|
146
|
+
'gemini-3.8',
|
|
147
|
+
'gemini3.8',
|
|
148
|
+
'gemini-3.8-flash-latest',
|
|
149
|
+
'flash-3.8',
|
|
150
|
+
'flash3.8',
|
|
151
|
+
'gemini-flash-3.8',
|
|
152
|
+
'gemini flash 3.8',
|
|
153
|
+
'3.8-flash',
|
|
154
|
+
],
|
|
155
|
+
},
|
|
130
156
|
};
|
|
131
157
|
|
|
132
158
|
// Thinking mode budget percentages
|
|
@@ -514,10 +540,17 @@ export const googleProvider = {
|
|
|
514
540
|
};
|
|
515
541
|
thinkingLevel = levelMap[reasoning_effort] || 'high';
|
|
516
542
|
if (!modelConfig.thinkingLevels.includes(thinkingLevel)) {
|
|
543
|
+
// Clamp to the nearest supported level: a request below the
|
|
544
|
+
// model's floor (e.g. minimal on 3.8 Flash) takes the lowest
|
|
545
|
+
// level, anything else the highest.
|
|
546
|
+
const rank = ['minimal', 'low', 'medium', 'high'];
|
|
547
|
+
const [lowest] = modelConfig.thinkingLevels;
|
|
517
548
|
thinkingLevel =
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
549
|
+
rank.indexOf(thinkingLevel) < rank.indexOf(lowest)
|
|
550
|
+
? lowest
|
|
551
|
+
: modelConfig.thinkingLevels[
|
|
552
|
+
modelConfig.thinkingLevels.length - 1
|
|
553
|
+
];
|
|
521
554
|
}
|
|
522
555
|
} else {
|
|
523
556
|
// Binary levels only (Gemini 3.0 Pro: low/high)
|
package/src/providers/mistral.js
CHANGED
|
@@ -21,7 +21,7 @@ const SUPPORTED_MODELS = {
|
|
|
21
21
|
supportsImages: true,
|
|
22
22
|
supportsWebSearch: false,
|
|
23
23
|
supportsReasoning: true,
|
|
24
|
-
timeout:
|
|
24
|
+
timeout: 900000,
|
|
25
25
|
description:
|
|
26
26
|
'Mistral Medium 3.5 - Frontier-class multimodal model with adjustable reasoning',
|
|
27
27
|
aliases: [
|
|
@@ -40,7 +40,7 @@ const SUPPORTED_MODELS = {
|
|
|
40
40
|
supportsImages: true,
|
|
41
41
|
supportsWebSearch: false,
|
|
42
42
|
supportsReasoning: true,
|
|
43
|
-
timeout:
|
|
43
|
+
timeout: 540000,
|
|
44
44
|
description:
|
|
45
45
|
'Mistral Small 4 - Hybrid multimodal model unifying instruct, reasoning, and coding',
|
|
46
46
|
aliases: ['mistral-small', 'mistral-small-latest'],
|
|
@@ -54,7 +54,7 @@ const SUPPORTED_MODELS = {
|
|
|
54
54
|
supportsImages: true,
|
|
55
55
|
supportsWebSearch: false,
|
|
56
56
|
supportsReasoning: false,
|
|
57
|
-
timeout:
|
|
57
|
+
timeout: 900000,
|
|
58
58
|
description:
|
|
59
59
|
'Mistral Large 3 - Open-weight MoE flagship (no adjustable reasoning)',
|
|
60
60
|
aliases: ['mistral-large', 'mistral-large-latest'],
|
package/src/providers/openai.js
CHANGED
|
@@ -20,7 +20,7 @@ const SUPPORTED_MODELS = {
|
|
|
20
20
|
supportsWebSearch: true,
|
|
21
21
|
supportsResponsesAPI: true,
|
|
22
22
|
supportsNoneReasoningEffort: true,
|
|
23
|
-
timeout:
|
|
23
|
+
timeout: 10800000, // 3 hours
|
|
24
24
|
description:
|
|
25
25
|
'Flagship GPT-5.6 model (1M context, 128K output) - Frontier reasoning, coding, agentic workflows. Most token-efficient flagship',
|
|
26
26
|
aliases: [
|
|
@@ -45,7 +45,7 @@ const SUPPORTED_MODELS = {
|
|
|
45
45
|
supportsWebSearch: true,
|
|
46
46
|
supportsResponsesAPI: true,
|
|
47
47
|
supportsNoneReasoningEffort: true,
|
|
48
|
-
timeout:
|
|
48
|
+
timeout: 5400000, // 90 minutes
|
|
49
49
|
description:
|
|
50
50
|
'Lower-cost GPT-5.6 (400K context, 128K output) - Performance competitive with GPT-5.5 at half the flagship price',
|
|
51
51
|
aliases: ['gpt5.6-terra', 'gpt-5.6terra', 'gpt 5.6 terra', 'terra'],
|
|
@@ -60,7 +60,7 @@ const SUPPORTED_MODELS = {
|
|
|
60
60
|
supportsWebSearch: true,
|
|
61
61
|
supportsResponsesAPI: true,
|
|
62
62
|
supportsNoneReasoningEffort: true,
|
|
63
|
-
timeout:
|
|
63
|
+
timeout: 1800000, // 30 minutes
|
|
64
64
|
description:
|
|
65
65
|
'Fastest, most affordable GPT-5.6 (400K context, 128K output) - High-volume, latency-sensitive workloads',
|
|
66
66
|
aliases: ['gpt5.6-luna', 'gpt-5.6luna', 'gpt 5.6 luna', 'luna'],
|
|
@@ -75,7 +75,7 @@ const SUPPORTED_MODELS = {
|
|
|
75
75
|
supportsWebSearch: true,
|
|
76
76
|
supportsResponsesAPI: true,
|
|
77
77
|
supportsNoneReasoningEffort: true,
|
|
78
|
-
timeout:
|
|
78
|
+
timeout: 10800000, // 3 hours
|
|
79
79
|
description:
|
|
80
80
|
'Latest flagship model (1M context, 128K output) - Superior reasoning, coding, agentic workflows, computer use. Most token-efficient reasoning model',
|
|
81
81
|
aliases: [
|
|
@@ -92,7 +92,7 @@ const SUPPORTED_MODELS = {
|
|
|
92
92
|
supportsImages: true,
|
|
93
93
|
supportsWebSearch: true,
|
|
94
94
|
supportsResponsesAPI: true,
|
|
95
|
-
timeout:
|
|
95
|
+
timeout: 5400000, // 90 minutes
|
|
96
96
|
description:
|
|
97
97
|
'Faster, cost-efficient GPT-5 (400K context, 128K output) - Well-defined tasks, precise prompts',
|
|
98
98
|
aliases: ['gpt5-mini', 'gpt-5mini', 'gpt 5 mini', 'gpt-5-mini-2025-08-07'],
|
|
@@ -106,7 +106,7 @@ const SUPPORTED_MODELS = {
|
|
|
106
106
|
supportsImages: true,
|
|
107
107
|
supportsWebSearch: false, // GPT-5-nano doesn't support web search
|
|
108
108
|
supportsResponsesAPI: true,
|
|
109
|
-
timeout:
|
|
109
|
+
timeout: 1800000, // 30 minutes
|
|
110
110
|
description:
|
|
111
111
|
'Fastest, most cost-efficient GPT-5 (400K context, 128K output) - Summarization, classification',
|
|
112
112
|
aliases: ['gpt5-nano', 'gpt-5nano', 'gpt 5 nano', 'gpt-5-nano-2025-08-07'],
|
|
@@ -120,7 +120,7 @@ const SUPPORTED_MODELS = {
|
|
|
120
120
|
supportsImages: true,
|
|
121
121
|
supportsWebSearch: true,
|
|
122
122
|
supportsResponsesAPI: true,
|
|
123
|
-
timeout:
|
|
123
|
+
timeout: 5400000, // 90 minutes
|
|
124
124
|
description:
|
|
125
125
|
'Fast, efficient GPT-5.4 (400K context, 128K output) - Coding, subagents, computer use, tool use. 2x faster than GPT-5 mini',
|
|
126
126
|
aliases: [
|
|
@@ -139,7 +139,7 @@ const SUPPORTED_MODELS = {
|
|
|
139
139
|
supportsImages: true,
|
|
140
140
|
supportsWebSearch: false,
|
|
141
141
|
supportsResponsesAPI: true,
|
|
142
|
-
timeout:
|
|
142
|
+
timeout: 1800000, // 30 minutes
|
|
143
143
|
description:
|
|
144
144
|
'Smallest, cheapest GPT-5.4 (400K context, 128K output) - Classification, data extraction, ranking, coding subagents',
|
|
145
145
|
aliases: [
|
|
@@ -159,7 +159,7 @@ const SUPPORTED_MODELS = {
|
|
|
159
159
|
supportsWebSearch: true,
|
|
160
160
|
supportsResponsesAPI: true,
|
|
161
161
|
supportsDeepResearch: false,
|
|
162
|
-
timeout:
|
|
162
|
+
timeout: 10800000, // 180 minutes
|
|
163
163
|
description:
|
|
164
164
|
'Maximum performance reasoning model (1M context, 272K output) - Most complex tasks, extended compute time (EXPENSIVE)',
|
|
165
165
|
aliases: [
|
|
@@ -179,7 +179,7 @@ const SUPPORTED_MODELS = {
|
|
|
179
179
|
supportsImages: true,
|
|
180
180
|
supportsWebSearch: true,
|
|
181
181
|
supportsResponsesAPI: true,
|
|
182
|
-
timeout:
|
|
182
|
+
timeout: 1800000, // 30 minutes
|
|
183
183
|
description:
|
|
184
184
|
'Strong reasoning (200K context) - Logical problems, code generation, systematic analysis',
|
|
185
185
|
aliases: ['o3-2025-01-31'],
|
|
@@ -193,7 +193,7 @@ const SUPPORTED_MODELS = {
|
|
|
193
193
|
supportsImages: true,
|
|
194
194
|
supportsWebSearch: true,
|
|
195
195
|
supportsResponsesAPI: true,
|
|
196
|
-
timeout:
|
|
196
|
+
timeout: 10800000, // 180 minutes
|
|
197
197
|
description:
|
|
198
198
|
'Professional-grade reasoning (200K context) - EXTREMELY EXPENSIVE: Only for the most complex problems',
|
|
199
199
|
aliases: ['o3-pro', 'o3pro', 'o3 pro'],
|
|
@@ -207,7 +207,7 @@ const SUPPORTED_MODELS = {
|
|
|
207
207
|
supportsImages: true,
|
|
208
208
|
supportsWebSearch: true,
|
|
209
209
|
supportsResponsesAPI: true,
|
|
210
|
-
timeout:
|
|
210
|
+
timeout: 540000, // 9 minutes
|
|
211
211
|
description:
|
|
212
212
|
'Latest reasoning model (200K context) - Optimized for shorter contexts, rapid reasoning',
|
|
213
213
|
aliases: ['o4mini', 'o4', 'o4 mini', 'o4-mini-2025-01-30'],
|
|
@@ -221,7 +221,7 @@ const SUPPORTED_MODELS = {
|
|
|
221
221
|
supportsImages: true,
|
|
222
222
|
supportsWebSearch: true,
|
|
223
223
|
supportsResponsesAPI: true,
|
|
224
|
-
timeout:
|
|
224
|
+
timeout: 900000,
|
|
225
225
|
description:
|
|
226
226
|
'GPT-4.1 (1M context) - Advanced reasoning model with large context window',
|
|
227
227
|
aliases: ['gpt4.1', 'gpt-4.1', 'gpt 4.1', 'gpt-4.1-latest'],
|
|
@@ -236,7 +236,7 @@ const SUPPORTED_MODELS = {
|
|
|
236
236
|
supportsWebSearch: true,
|
|
237
237
|
supportsResponsesAPI: true,
|
|
238
238
|
supportsDeepResearch: true,
|
|
239
|
-
timeout:
|
|
239
|
+
timeout: 21600000, // 360 minutes for deep research
|
|
240
240
|
description:
|
|
241
241
|
'Deep research model (200K context) - In-depth synthesis, comprehensive reports, multi-source analysis (30-90 min runtime)',
|
|
242
242
|
aliases: [
|
|
@@ -256,7 +256,7 @@ const SUPPORTED_MODELS = {
|
|
|
256
256
|
supportsWebSearch: true,
|
|
257
257
|
supportsResponsesAPI: true,
|
|
258
258
|
supportsDeepResearch: true,
|
|
259
|
-
timeout:
|
|
259
|
+
timeout: 10800000, // 180 minutes for faster deep research
|
|
260
260
|
description:
|
|
261
261
|
'Fast deep research model (200K context) - Lightweight research, faster results, latency-sensitive analysis (15-60 min runtime)',
|
|
262
262
|
aliases: [
|
|
@@ -54,7 +54,7 @@ const SUPPORTED_MODELS = {
|
|
|
54
54
|
supported_efforts: ['xhigh', 'high'],
|
|
55
55
|
default_effort: 'high',
|
|
56
56
|
},
|
|
57
|
-
timeout:
|
|
57
|
+
timeout: 900000,
|
|
58
58
|
description:
|
|
59
59
|
'Z.ai GLM 5.2 — large-scale reasoning model with a 1M-token context',
|
|
60
60
|
aliases: ['glm-5.2', 'glm5.2', 'glm'],
|
|
@@ -74,7 +74,7 @@ const SUPPORTED_MODELS = {
|
|
|
74
74
|
supported_efforts: ['xhigh', 'high'],
|
|
75
75
|
default_effort: 'high',
|
|
76
76
|
},
|
|
77
|
-
timeout:
|
|
77
|
+
timeout: 900000,
|
|
78
78
|
description: 'DeepSeek V4 Pro reasoning model (via OpenRouter)',
|
|
79
79
|
aliases: [],
|
|
80
80
|
},
|
|
@@ -93,7 +93,7 @@ const SUPPORTED_MODELS = {
|
|
|
93
93
|
supported_efforts: ['xhigh', 'high'],
|
|
94
94
|
default_effort: 'high',
|
|
95
95
|
},
|
|
96
|
-
timeout:
|
|
96
|
+
timeout: 900000,
|
|
97
97
|
description: 'DeepSeek V4 Flash — faster, lower-cost DeepSeek V4 tier',
|
|
98
98
|
aliases: [],
|
|
99
99
|
},
|
|
@@ -108,7 +108,7 @@ const SUPPORTED_MODELS = {
|
|
|
108
108
|
supportsReasoning: true,
|
|
109
109
|
// Enable/disable-only — no effort tiers exposed.
|
|
110
110
|
reasoning: { mandatory: false, default_enabled: true },
|
|
111
|
-
timeout:
|
|
111
|
+
timeout: 900000,
|
|
112
112
|
description: 'Qwen3.7 Max — flagship Qwen with a 1M-token context',
|
|
113
113
|
aliases: ['qwen3.7-max'],
|
|
114
114
|
},
|
|
@@ -123,7 +123,7 @@ const SUPPORTED_MODELS = {
|
|
|
123
123
|
supportsReasoning: true,
|
|
124
124
|
// Enable/disable-only — no effort tiers exposed.
|
|
125
125
|
reasoning: { mandatory: false, default_enabled: true },
|
|
126
|
-
timeout:
|
|
126
|
+
timeout: 900000,
|
|
127
127
|
description: 'Qwen3.7 Plus — image-capable Qwen with a 1M-token context',
|
|
128
128
|
aliases: ['qwen3.7-plus'],
|
|
129
129
|
},
|
|
@@ -138,7 +138,7 @@ const SUPPORTED_MODELS = {
|
|
|
138
138
|
supportsReasoning: true,
|
|
139
139
|
// Mandatory reasoning — cannot be disabled.
|
|
140
140
|
reasoning: { mandatory: true, default_enabled: true },
|
|
141
|
-
timeout:
|
|
141
|
+
timeout: 900000,
|
|
142
142
|
description: 'Moonshot Kimi K2.7 Code — coding model with mandatory reasoning',
|
|
143
143
|
aliases: ['kimi-k2.7-code'],
|
|
144
144
|
},
|
|
@@ -153,7 +153,7 @@ const SUPPORTED_MODELS = {
|
|
|
153
153
|
supportsReasoning: true,
|
|
154
154
|
// Enable/disable-only — no effort tiers exposed.
|
|
155
155
|
reasoning: { mandatory: false, default_enabled: true },
|
|
156
|
-
timeout:
|
|
156
|
+
timeout: 900000,
|
|
157
157
|
description: 'Moonshot Kimi K2.6 — image-capable general model',
|
|
158
158
|
aliases: ['kimi-k2.6'],
|
|
159
159
|
},
|
|
@@ -169,7 +169,7 @@ const SUPPORTED_MODELS = {
|
|
|
169
169
|
// Router selects the underlying model (and its effort) — do not fabricate a
|
|
170
170
|
// reasoning field.
|
|
171
171
|
reasoning: { passthrough: true },
|
|
172
|
-
timeout:
|
|
172
|
+
timeout: 900000,
|
|
173
173
|
description: 'Auto-selects the best model for your prompt via OpenRouter',
|
|
174
174
|
aliases: ['auto-router', 'openrouter-auto'],
|
|
175
175
|
},
|
|
@@ -489,7 +489,7 @@ function createConservativeModelConfig(modelName) {
|
|
|
489
489
|
maxOutputTokens: 8192,
|
|
490
490
|
supportsStreaming: true,
|
|
491
491
|
supportsWebSearch: false,
|
|
492
|
-
timeout:
|
|
492
|
+
timeout: 900000,
|
|
493
493
|
isDynamic: true,
|
|
494
494
|
};
|
|
495
495
|
}
|
package/src/providers/xai.js
CHANGED
|
@@ -36,7 +36,7 @@ const SUPPORTED_MODELS = {
|
|
|
36
36
|
supportsImages: true,
|
|
37
37
|
supportsWebSearch: true,
|
|
38
38
|
supportsReasoning: true,
|
|
39
|
-
timeout:
|
|
39
|
+
timeout: 900000, // 15 minutes
|
|
40
40
|
description:
|
|
41
41
|
'Grok 4.5 (500K context) - Flagship X.AI model with image input, reasoning content, and native web/X search via Agent Tools',
|
|
42
42
|
aliases: ['grok', 'grok-4.5', 'grok-4.5-latest', 'grok-build-latest'],
|
|
@@ -28,7 +28,7 @@ export class HTTPTransportServer {
|
|
|
28
28
|
// Server settings
|
|
29
29
|
port: config.port || 3157,
|
|
30
30
|
host: config.host || 'localhost',
|
|
31
|
-
requestTimeout: config.requestTimeout ||
|
|
31
|
+
requestTimeout: config.requestTimeout || 900000,
|
|
32
32
|
maxRequestSize: config.maxRequestSize || '10mb',
|
|
33
33
|
|
|
34
34
|
// Session management
|