converse-mcp-server 3.7.1 → 4.0.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 +17 -3
- package/README.md +67 -49
- package/docs/API.md +55 -18
- package/docs/EXAMPLES.md +38 -0
- package/docs/PROVIDERS.md +92 -52
- package/package.json +1 -1
- package/src/config.js +29 -5
- package/src/prompts/helpPrompt.js +27 -2
- package/src/providers/anthropic.js +5 -1
- package/src/providers/claude.js +39 -88
- package/src/providers/codex.js +73 -144
- package/src/providers/copilot.js +42 -149
- package/src/providers/deepseek.js +1 -0
- package/src/providers/gemini-cli.js +64 -97
- package/src/providers/google.js +5 -1
- package/src/providers/mistral.js +5 -1
- package/src/providers/openai-compatible.js +4 -1
- package/src/providers/openai.js +5 -1
- package/src/providers/openrouter.js +1 -0
- package/src/providers/xai.js +5 -1
- package/src/services/summarizationService.js +45 -49
- package/src/tools/chat.js +56 -52
- package/src/tools/modes/roundtable.js +60 -49
- package/src/utils/localProviderAuth.js +63 -0
- package/src/utils/modelCatalog.js +38 -0
- package/src/utils/modelRouting.js +580 -343
package/.env.example
CHANGED
|
@@ -80,9 +80,23 @@ OPENROUTER_API_KEY=your_openrouter_api_key_here
|
|
|
80
80
|
# WARNING: Interactive policies may cause hangs in server/headless mode
|
|
81
81
|
# CODEX_APPROVAL_POLICY=never
|
|
82
82
|
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
83
|
+
# ============================================
|
|
84
|
+
# Per-provider Default Models
|
|
85
|
+
# ============================================
|
|
86
|
+
# The model a bare provider name ("codex", "openai", ...) and "auto" use.
|
|
87
|
+
# Each must be a model ID or alias from that provider's catalog; startup fails
|
|
88
|
+
# with "did you mean" suggestions otherwise. Per request, use "provider:model".
|
|
89
|
+
# CODEX_DEFAULT_MODEL=gpt-6-sol # gpt-6-sol, gpt-6-luna, gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.3-codex-spark (CODEX_MODEL is the legacy name)
|
|
90
|
+
# CLAUDE_DEFAULT_MODEL=claude-opus-5-5
|
|
91
|
+
# AGY_DEFAULT_MODEL=gemini-3.8-flash # Antigravity CLI: gemini-3.8-flash, gemini-3.1-pro-preview
|
|
92
|
+
# COPILOT_DEFAULT_MODEL=gpt-6-sol # COPILOT_MODEL is the legacy name
|
|
93
|
+
# OPENAI_DEFAULT_MODEL=gpt-6-sol
|
|
94
|
+
# GOOGLE_DEFAULT_MODEL=gemini-3.1-pro-preview
|
|
95
|
+
# XAI_DEFAULT_MODEL=grok-4.5
|
|
96
|
+
# ANTHROPIC_DEFAULT_MODEL=claude-opus-5-5
|
|
97
|
+
# MISTRAL_DEFAULT_MODEL=mistral-medium-3-5
|
|
98
|
+
# DEEPSEEK_DEFAULT_MODEL=deepseek-v4-pro
|
|
99
|
+
# OPENROUTER_DEFAULT_MODEL=z-ai/glm-5.2 # any vendor/model slug
|
|
86
100
|
|
|
87
101
|
# ============================================
|
|
88
102
|
# Server Configuration
|
package/README.md
CHANGED
|
@@ -242,11 +242,11 @@ SUMMARIZATION_MODEL=gpt-5-nano # Default: gpt-5-nano
|
|
|
242
242
|
- **gemini-2.5-flash** (alias: `flash`): Ultra-fast (1M context, 65K output)
|
|
243
243
|
- **gemini-2.5-flash-lite** (alias: `flash-lite`): Lightweight fast model (1M context, 65K output)
|
|
244
244
|
|
|
245
|
-
**Note**: The
|
|
245
|
+
**Note**: The Antigravity CLI provider serves `gemini-3.8-flash` and `gemini-3.1-pro-preview` under the same names and aliases, so bare `pro`, `gemini-pro`, `flash` and those IDs go to Antigravity first when it is installed (see [Model Selection](#model-selection)). Use `google:<model>` to always use the Google API.
|
|
246
246
|
|
|
247
247
|
### X.AI/Grok Models
|
|
248
248
|
|
|
249
|
-
- **grok-4.5** (default; aliases: `grok`, `grok-4.5-latest`, `grok-build-latest`): Flagship model with image input, reasoning content, and native web/X search (500K context). Reasoning maps to `low`/`medium`/`high` and cannot be disabled; web search is automatic.
|
|
249
|
+
- **grok-4.5** (default; aliases: `grok`, `grok-4.5-latest`, `grok-build-latest`): Flagship model with image input, reasoning content, and native web/X search (500K context). Reasoning maps to `low`/`medium`/`high` and cannot be disabled; web search is automatic.
|
|
250
250
|
|
|
251
251
|
### Anthropic Models
|
|
252
252
|
|
|
@@ -285,8 +285,10 @@ Any other model works via its full `provider/model` slug or the `openrouter:` na
|
|
|
285
285
|
|
|
286
286
|
### Codex Models
|
|
287
287
|
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
OpenAI Codex agentic coding assistant. `codex` uses its default model (GPT-6 Sol, or `CODEX_DEFAULT_MODEL`); `codex:<model>` picks one (e.g. `codex:luna`, `codex:astra`, `codex:gpt-5.6-terra`):
|
|
289
|
+
|
|
290
|
+
- **gpt-6-sol** (default; aliases: `sol`, `gpt-6`), **gpt-6-luna** (`luna`), **gpt-6-astra** (`astra`)
|
|
291
|
+
- **gpt-5.6-sol** (`gpt-5.6`), **gpt-5.6-terra** (`terra`), **gpt-5.6-luna**, **gpt-5.5**, **gpt-5.3-codex-spark** (`spark`)
|
|
290
292
|
- `reasoning_effort` maps onto the tiers the chosen backend accepts (Sol/Luna: `none` through `max`; GPT-6 Astra: `low` through `max`, no `none`)
|
|
291
293
|
- Thread-based sessions with persistent context
|
|
292
294
|
- Direct filesystem access from working directory
|
|
@@ -296,20 +298,20 @@ Any other model works via its full `provider/model` slug or the `openrouter:` na
|
|
|
296
298
|
|
|
297
299
|
### Claude Agent SDK Models
|
|
298
300
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
Claude via the Claude Agent SDK. `claude` uses its default model (Opus 5.5, or `CLAUDE_DEFAULT_MODEL`); `claude:<model>` picks one:
|
|
302
|
+
|
|
303
|
+
- **claude-opus-5-5** (default; aliases: `opus`, `claude-opus`, `opus-5.5`), **claude-opus-5** (`opus-5`)
|
|
304
|
+
- **claude-fable-5-1** (aliases: `fable`, `claude-fable`, `fable-5.1`), **claude-fable-5** (`fable-5`)
|
|
305
|
+
- Uses Claude Code CLI authentication (`claude login`) - no API key needed
|
|
306
|
+
- Direct filesystem access from working directory
|
|
304
307
|
|
|
305
308
|
### GitHub Copilot SDK Models
|
|
306
309
|
|
|
307
|
-
Reach these with the `copilot:` namespace (e.g. `copilot:gpt-6-sol`)
|
|
310
|
+
Reach these only with the `copilot:` namespace (e.g. `copilot:gpt-6-sol`) — Copilot never serves bare model names. `copilot` alone uses GPT-6 Sol, or `COPILOT_DEFAULT_MODEL`. Uses your GitHub Copilot subscription (`gh auth login`) - no API key needed:
|
|
308
311
|
|
|
309
312
|
- **OpenAI**: `gpt-6-sol` (aliases: `gpt-6`, `gpt-5`, `sol`), `gpt-6-luna` (alias: `luna`), `gpt-5.6-sol` (alias: `gpt-5.6`), `gpt-5.6-terra`, `gpt-5.6-luna` (all support `reasoning_effort`)
|
|
310
313
|
- **Anthropic**: `claude-opus-5.5` (aliases: `opus`, `claude`), `claude-fable-5` (alias: `fable`), `claude-sonnet-5` (alias: `sonnet`), `claude-opus-5`, `claude-opus-4.8`
|
|
311
314
|
- **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`)
|
|
312
|
-
- Any other `copilot:<id>` is forwarded to the Copilot backend verbatim
|
|
313
315
|
|
|
314
316
|
## 📚 Help & Documentation
|
|
315
317
|
|
|
@@ -363,7 +365,21 @@ CODEX_API_KEY=your_codex_api_key_here # Optional if ChatGPT login availabl
|
|
|
363
365
|
CODEX_SANDBOX_MODE=read-only # read-only (default), workspace-write, danger-full-access
|
|
364
366
|
CODEX_SKIP_GIT_CHECK=true # true (default), false
|
|
365
367
|
CODEX_APPROVAL_POLICY=never # never (default), untrusted, on-failure, on-request
|
|
366
|
-
|
|
368
|
+
|
|
369
|
+
# Optional: per-provider default model, used for a bare provider name (`codex`,
|
|
370
|
+
# `openai`, ...) and for "auto". Must be a model or alias from that provider's
|
|
371
|
+
# list; startup fails with suggestions otherwise.
|
|
372
|
+
CODEX_DEFAULT_MODEL=gpt-6-sol # CODEX_MODEL still works as a fallback
|
|
373
|
+
CLAUDE_DEFAULT_MODEL=claude-opus-5-5
|
|
374
|
+
AGY_DEFAULT_MODEL=gemini-3.8-flash # Antigravity CLI (gemini)
|
|
375
|
+
COPILOT_DEFAULT_MODEL=gpt-6-sol # COPILOT_MODEL still works as a fallback
|
|
376
|
+
OPENAI_DEFAULT_MODEL=gpt-6-sol
|
|
377
|
+
GOOGLE_DEFAULT_MODEL=gemini-3.1-pro-preview
|
|
378
|
+
XAI_DEFAULT_MODEL=grok-4.5
|
|
379
|
+
ANTHROPIC_DEFAULT_MODEL=claude-opus-5-5
|
|
380
|
+
MISTRAL_DEFAULT_MODEL=mistral-medium-3-5
|
|
381
|
+
DEEPSEEK_DEFAULT_MODEL=deepseek-v4-pro
|
|
382
|
+
OPENROUTER_DEFAULT_MODEL=z-ai/glm-5.2 # any vendor/model slug is accepted
|
|
367
383
|
```
|
|
368
384
|
|
|
369
385
|
### Configuration Options
|
|
@@ -417,57 +433,59 @@ tool_timeout_sec = 3600 # default 300 kills long calls at 5 minutes
|
|
|
417
433
|
|
|
418
434
|
### Model Selection
|
|
419
435
|
|
|
420
|
-
|
|
436
|
+
Every entry in `models` takes one of four forms:
|
|
421
437
|
|
|
422
438
|
```javascript
|
|
423
|
-
// Auto-selection (recommended)
|
|
439
|
+
// Auto-selection (recommended): the first available provider's default model
|
|
424
440
|
"auto";
|
|
425
441
|
|
|
426
|
-
//
|
|
427
|
-
"
|
|
428
|
-
"gpt-5.6";
|
|
429
|
-
"grok-4.5";
|
|
430
|
-
"z-ai/glm-5.2"; // -> OpenRouter (full slug)
|
|
431
|
-
"z-ai/glm-5.2:online"; // -> OpenRouter with web search opt-in
|
|
432
|
-
|
|
433
|
-
// Using aliases
|
|
434
|
-
"flash"; // -> gemini-2.5-flash
|
|
435
|
-
"pro"; // -> gemini-3.1-pro-preview
|
|
436
|
-
"grok"; // -> grok-4.5
|
|
437
|
-
"deepseek"; // -> deepseek-v4-pro
|
|
438
|
-
"mistral"; // -> mistral-medium-3-5
|
|
439
|
-
"fable"; // -> claude-fable-5 (Anthropic API)
|
|
440
|
-
"opus"; // -> claude-opus-5-5 (Anthropic API)
|
|
441
|
-
|
|
442
|
-
// SDK providers (subscription-based, no API key)
|
|
442
|
+
// A provider: its default model (hardcoded, or <PROVIDER>_DEFAULT_MODEL)
|
|
443
|
+
"codex"; // -> Codex (GPT-6 Sol)
|
|
443
444
|
"claude"; // -> Claude Agent SDK (Claude Opus 5.5)
|
|
444
|
-
"
|
|
445
|
-
"
|
|
446
|
-
|
|
445
|
+
"gemini"; // -> Antigravity CLI (Gemini 3.8 Flash); `agy` works too
|
|
446
|
+
"openai"; // -> OpenAI API (GPT-6 Sol)
|
|
447
|
+
|
|
448
|
+
// provider:model — that model on that provider only
|
|
449
|
+
"codex:astra"; // -> Codex (GPT-6 Astra)
|
|
450
|
+
"openai:gpt-6-astra"; // -> OpenAI API, even when Codex is available
|
|
451
|
+
"gemini:pro"; // -> Antigravity CLI (Gemini 3.1 Pro)
|
|
452
|
+
"google:gemini-3.1-pro-preview"; // -> Google API
|
|
453
|
+
"copilot:sonnet"; // -> GitHub Copilot (Claude Sonnet 5)
|
|
454
|
+
"openrouter:z-ai/glm-5.2:online"; // -> OpenRouter with web search opt-in
|
|
455
|
+
|
|
456
|
+
// A bare model ID or alias — the first configured provider that offers it
|
|
457
|
+
"gpt-6-astra"; // -> Codex, else OpenAI API
|
|
458
|
+
"opus"; // -> Claude Agent SDK, else Anthropic API
|
|
459
|
+
"pro"; // -> Antigravity CLI, else Google API
|
|
460
|
+
"grok"; // -> grok-4.5 (XAI)
|
|
461
|
+
"z-ai/glm-5.2"; // -> OpenRouter (any vendor/model slug)
|
|
447
462
|
```
|
|
448
463
|
|
|
464
|
+
**Bare model names** go to the first provider, in the order below, whose model list contains the name and that is set up (API key present; for Codex and Claude, a login file or token; for Antigravity, the `agy` binary). If that provider then fails with an authentication or availability error, the next provider that serves **the same model** takes over — a provider whose alias of that name points at a different model is never substituted (bare `fable` is Fable 5.1 on the Claude Agent SDK and Fable 5 on the Anthropic API, so it does not fail over between them). Copilot is never picked for bare names; use `copilot:<model>`.
|
|
465
|
+
|
|
466
|
+
**Unknown names are rejected**, never guessed: a typo or an unlisted model returns an error with up to three close matches, e.g. `Unknown model "gtp-6-astra". Did you mean: gpt-6-astra?` or `Unknown openai model "spark" in "openai:spark". Did you mean: codex:spark?`. OpenRouter is the exception for full `vendor/model` slugs, which are checked against OpenRouter's live catalog.
|
|
467
|
+
|
|
449
468
|
**Auto Model Behavior:**
|
|
450
469
|
|
|
451
|
-
- **chat mode**: `["auto"]` selects the first available provider and uses its default model
|
|
470
|
+
- **chat mode**: `["auto"]` selects the first available provider and uses its default model, failing over down the list
|
|
452
471
|
- **consensus mode**: `["auto"]` automatically expands to the first 3 available providers
|
|
472
|
+
- **roundtable mode**: `["auto"]` uses the first available provider
|
|
453
473
|
|
|
454
|
-
Provider priority order (subscription-based
|
|
474
|
+
Provider priority order (subscription-based local providers first, then API-key providers), used by both `auto` and bare model names:
|
|
455
475
|
|
|
456
476
|
1. Codex (`codex` → GPT-6 Sol)
|
|
457
|
-
2. Gemini via Antigravity CLI (`gemini` → Gemini 3.8 Flash
|
|
477
|
+
2. Gemini via Antigravity CLI (`gemini` / `agy` → Gemini 3.8 Flash)
|
|
458
478
|
3. Claude Agent SDK (`claude` → Claude Opus 5.5)
|
|
459
|
-
4. Copilot (`copilot`)
|
|
460
|
-
5. OpenAI (`
|
|
461
|
-
6. Google (`
|
|
462
|
-
7. XAI (`
|
|
463
|
-
8. Anthropic (`
|
|
464
|
-
9. Mistral (`mistral
|
|
465
|
-
10. DeepSeek (`deepseek
|
|
466
|
-
11. OpenRouter (`
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
**Antigravity CLI permissions:** The `gemini`, `gemini:flash`, and `gemini:pro` aliases launch `agy` with `--dangerously-skip-permissions` because headless calls cannot prompt for tool approval. All tool permission requests are auto-approved, including shell commands and file writes; a read-only prompt is not an enforced security boundary. Use this provider only with trusted prompts and context. This also applies when `auto` selects it. The Google API provider is unaffected.
|
|
479
|
+
4. Copilot (`copilot` → GPT-6 Sol; `auto` only, never bare names)
|
|
480
|
+
5. OpenAI (`openai` → GPT-6 Sol)
|
|
481
|
+
6. Google (`google` → Gemini 3.1 Pro)
|
|
482
|
+
7. XAI (`xai` → Grok 4.5)
|
|
483
|
+
8. Anthropic (`anthropic` → Claude Opus 5.5)
|
|
484
|
+
9. Mistral (`mistral` → Mistral Medium 3.5)
|
|
485
|
+
10. DeepSeek (`deepseek` → DeepSeek V4 Pro)
|
|
486
|
+
11. OpenRouter (`openrouter` → GLM 5.2)
|
|
487
|
+
|
|
488
|
+
**Local agent permissions:** Bare model names and `auto` reach the local agent providers whenever they are set up, not only when named explicitly. The Antigravity CLI runs `agy` with `--dangerously-skip-permissions` because headless calls cannot prompt for tool approval — every tool request is auto-approved, including shell commands and file writes. The Claude Agent SDK runs with `bypassPermissions`. Codex uses `CODEX_SANDBOX_MODE` (read-only by default). A read-only prompt is not an enforced security boundary for these providers, so use them only with trusted prompts and context. To keep a request on a plain API, name the provider: `google:pro`, `anthropic:opus`, `openai:gpt-6-astra`.
|
|
471
489
|
|
|
472
490
|
### Advanced Configuration
|
|
473
491
|
|
package/docs/API.md
CHANGED
|
@@ -368,7 +368,7 @@ Only jobs in a `queued` or `running` state can be cancelled; already-completed,
|
|
|
368
368
|
|
|
369
369
|
## Supported Models
|
|
370
370
|
|
|
371
|
-
Provide models as plain name strings in the `models` array.
|
|
371
|
+
Provide models as plain name strings in the `models` array. Each entry is `auto`, a provider name (its default model), `provider:model` (that model on that provider only), or a bare model ID/alias (the first set-up provider that offers it). Names that match no provider's list are rejected with suggestions. See [Model Selection](#model-selection) for the full rules.
|
|
372
372
|
|
|
373
373
|
### OpenAI Models
|
|
374
374
|
|
|
@@ -399,7 +399,7 @@ Provide models as plain name strings in the `models` array. Bare names and alias
|
|
|
399
399
|
| `gemini-2.5-flash` | `flash` | 1M | 65K | Ultra-fast |
|
|
400
400
|
| `gemini-2.5-flash-lite` | `flash-lite` | 1M | 65K | Lightweight fast model |
|
|
401
401
|
|
|
402
|
-
**Note:** The
|
|
402
|
+
**Note:** The **Antigravity CLI** provider (`agy`, OAuth-based) serves `gemini-3.8-flash` and `gemini-3.1-pro-preview` under the same IDs and aliases, so bare `pro`, `gemini-pro`, `flash` and those IDs go to Antigravity first when `agy` is installed; the bare name `gemini` is the Antigravity namespace. Use `google:<model>` (e.g. `google:pro`) to always use the Google API.
|
|
403
403
|
|
|
404
404
|
### X.AI / Grok Models
|
|
405
405
|
|
|
@@ -460,8 +460,9 @@ Any other model works via its full `provider/model` slug (e.g. `anthropic/claude
|
|
|
460
460
|
|
|
461
461
|
**Codex** is an agentic coding assistant with direct filesystem access:
|
|
462
462
|
|
|
463
|
-
- **Model**: `codex` (underlying model: GPT-6 Sol by default)
|
|
464
|
-
- **Backend selection**: `codex:<model>` per request (e.g. `codex:luna`, `codex:astra`, `codex:gpt-5.6-terra`)
|
|
463
|
+
- **Model**: `codex` (underlying model: GPT-6 Sol by default, or `CODEX_DEFAULT_MODEL`)
|
|
464
|
+
- **Backend selection**: `codex:<model>` per request (e.g. `codex:luna`, `codex:astra`, `codex:gpt-5.6-terra`) from the Codex catalog: `gpt-6-sol` (`sol`, `gpt-6`), `gpt-6-luna` (`luna`), `gpt-6-astra` (`astra`), `gpt-5.6-sol` (`gpt-5.6`), `gpt-5.6-terra` (`terra`), `gpt-5.6-luna`, `gpt-5.5`, `gpt-5.3-codex-spark` (`spark`). Other names are rejected with suggestions. Bare IDs from this list (e.g. `gpt-6-astra`) go to Codex first, then the OpenAI API.
|
|
465
|
+
- **Availability**: the Codex SDK is installed and `~/.codex/auth.json` exists (`$CODEX_HOME/auth.json` when set) or `CODEX_API_KEY` is set
|
|
465
466
|
- **Thread-based sessions**: persistent conversation history via `continuation_id` in `chat` mode
|
|
466
467
|
- **Direct file access**: reads files from the working directory (paths relative to `CLIENT_CWD`)
|
|
467
468
|
- **Response times**: 6-20 seconds typical (complex tasks may take minutes)
|
|
@@ -472,9 +473,11 @@ Any other model works via its full `provider/model` slug (e.g. `anthropic/claude
|
|
|
472
473
|
|
|
473
474
|
**Claude** is available through the Claude Agent SDK, using Claude Code CLI authentication instead of an API key:
|
|
474
475
|
|
|
475
|
-
- **Model**: `claude` (
|
|
476
|
-
- **Model selection**: `claude
|
|
476
|
+
- **Model**: `claude` (namespaces: `claude`, `claude-code`, `claude-sdk`) — defaults to Claude Opus 5.5 (`claude-opus-5-5`), or `CLAUDE_DEFAULT_MODEL`
|
|
477
|
+
- **Model selection**: `claude-opus-5-5` (`opus`, `claude-opus`, `opus-5.5`), `claude-opus-5` (`opus-5`), `claude-fable-5-1` (`fable`, `claude-fable`, `fable-5.1`), `claude-fable-5` (`fable-5`), e.g. `claude:opus`, `claude:fable`. Other names are rejected with suggestions.
|
|
477
478
|
- **Authentication**: `claude login` — no `ANTHROPIC_API_KEY` needed
|
|
479
|
+
- **Availability**: the Claude Agent SDK is installed and `~/.claude/.credentials.json` exists (`$CLAUDE_CONFIG_DIR` when set), or `CLAUDE_CODE_OAUTH_TOKEN`/`ANTHROPIC_API_KEY` is in the environment; on macOS the Keychain login is assumed. An expired login is caught at call time and bare-name/`auto` routing fails over.
|
|
480
|
+
- **Permissions**: runs with `bypassPermissions`
|
|
478
481
|
- **Direct file access**: reads files from the working directory
|
|
479
482
|
- **Reasoning effort**: `reasoning_effort` maps to the SDK's `effort` option: `low`, `medium`, `high`, `xhigh`, or `max`; `none` and `minimal` become `low`. Omitting it retains the SDK default.
|
|
480
483
|
- **Turn limit**: SDK requests allow up to 100 turns (`maxTurns: 100`).
|
|
@@ -484,7 +487,10 @@ Any other model works via its full `provider/model` slug (e.g. `anthropic/claude
|
|
|
484
487
|
|
|
485
488
|
The **Antigravity CLI** (`agy`) provides subscription-based access to Gemini models through Google OAuth:
|
|
486
489
|
|
|
487
|
-
- **Models** (text-only): `gemini` (
|
|
490
|
+
- **Models** (text-only): `gemini-3.8-flash` (`flash`, `gemini-3.8`, `flash-3.8`, ...; default, `gemini` = `gemini:flash`), `gemini-3.1-pro-preview` (`pro`, `gemini-pro`, `gemini-3.1-pro`, ...; `gemini:pro`). Default override: `AGY_DEFAULT_MODEL`.
|
|
491
|
+
- **Namespaces**: `gemini`, `agy`, `antigravity`, `gemini-cli`
|
|
492
|
+
- **Availability**: the `agy` binary is found on PATH or at the platform install location
|
|
493
|
+
- **Permissions**: `agy` runs with `--dangerously-skip-permissions`, so every tool request is auto-approved
|
|
488
494
|
- **Authentication**: Google OAuth via `agy` (one-time interactive login)
|
|
489
495
|
- **Setup**: install the Antigravity CLI and run `agy` once to log in
|
|
490
496
|
- **Billing**: uses your Antigravity subscription/compute allowance instead of API credits
|
|
@@ -506,28 +512,39 @@ agy
|
|
|
506
512
|
|
|
507
513
|
### GitHub Copilot SDK (subscription)
|
|
508
514
|
|
|
509
|
-
Reach these with the `copilot:` namespace (e.g. `copilot:gpt-6-sol`); uses your GitHub Copilot subscription (`gh auth login`) — no API key needed:
|
|
515
|
+
Reach these only with the `copilot:` namespace (also `github-copilot:`, `copilot-sdk:`; e.g. `copilot:gpt-6-sol`) — Copilot never serves bare model names. `copilot` alone uses GPT-6 Sol, or `COPILOT_DEFAULT_MODEL`. Available when the Copilot SDK is installed; uses your GitHub Copilot subscription (`gh auth login`) — no API key needed:
|
|
510
516
|
|
|
511
517
|
- **OpenAI**: `gpt-6-sol` (aliases: `gpt-6`, `gpt-5`, `sol`), `gpt-6-luna` (alias: `luna`), `gpt-5.6-sol` (alias: `gpt-5.6`), `gpt-5.6-terra`, `gpt-5.6-luna` (all accept `reasoning_effort`)
|
|
512
518
|
- **Anthropic**: `claude-opus-5.5` (aliases: `opus`, `claude`), `claude-fable-5` (alias: `fable`), `claude-sonnet-5` (alias: `sonnet`), `claude-opus-5`, `claude-opus-4.8`
|
|
513
519
|
- **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`)
|
|
514
|
-
- Any other `copilot:<id>` is
|
|
520
|
+
- Any other `copilot:<id>` is rejected with suggestions
|
|
515
521
|
|
|
516
522
|
### Model Selection
|
|
517
523
|
|
|
518
|
-
|
|
524
|
+
Every entry in `models` takes one of four forms:
|
|
525
|
+
|
|
526
|
+
- **`auto`** — the first available provider's default model.
|
|
527
|
+
- **`provider`** — that provider's default model (hardcoded, or `<PROVIDER>_DEFAULT_MODEL`). Namespaces: `codex`; `gemini`/`agy`/`antigravity`/`gemini-cli` (Antigravity CLI); `claude`/`claude-code`/`claude-sdk` (Claude Agent SDK); `copilot`/`github-copilot`/`copilot-sdk`; `openai`; `google`; `xai`; `anthropic`; `mistral`; `deepseek`; `openrouter`.
|
|
528
|
+
- **`provider:model`** — that model on that provider only; the model must be in that provider's list.
|
|
529
|
+
- **Bare `model`** — the first provider, in the order `codex`, `gemini-cli`, `claude`, `openai`, `google`, `xai`, `anthropic`, `mistral`, `deepseek`, `openrouter`, whose list contains the ID or alias and that is set up (API key for API providers; SDK plus login for Codex and the Claude Agent SDK; the `agy` binary for Antigravity). On an authentication or availability error, the next set-up provider serving **the same model** takes over; a provider whose alias points at a different model is never substituted (bare `fable` is Fable 5.1 on the Claude Agent SDK and Fable 5 on the Anthropic API). Copilot never serves bare names.
|
|
530
|
+
|
|
531
|
+
**Unknown names are rejected**, never forwarded: the error lists up to three close matches, e.g. `Unknown model "gtp-6-astra". Did you mean: gpt-6-astra?` or `Unknown openai model "spark" in "openai:spark". Did you mean: codex:spark?`. The exception is OpenRouter: a full `vendor/model` slug (bare or `openrouter:`) is validated against OpenRouter's live catalog.
|
|
519
532
|
|
|
520
533
|
```text
|
|
521
534
|
"auto" // First available provider (chat); first 3 (consensus)
|
|
522
|
-
"gpt-6" //
|
|
535
|
+
"gpt-6" // Codex (-> gpt-6-sol), else OpenAI API
|
|
536
|
+
"openai:gpt-6" // OpenAI API only
|
|
523
537
|
"gemini-2.5-flash" // Google API
|
|
538
|
+
"pro" // Antigravity CLI (-> gemini-3.1-pro-preview), else Google API
|
|
539
|
+
"google:pro" // Google API only
|
|
524
540
|
"grok-4.5" // X.AI
|
|
525
541
|
"deepseek" // DeepSeek (-> deepseek-v4-pro)
|
|
526
542
|
"mistral" // Mistral (-> mistral-medium-3-5)
|
|
527
543
|
"z-ai/glm-5.2" // OpenRouter (full slug)
|
|
528
544
|
"z-ai/glm-5.2:online" // OpenRouter with web search opt-in
|
|
529
|
-
"fable" // Anthropic API (-> claude-fable-5)
|
|
530
|
-
"opus" //
|
|
545
|
+
"fable" // Claude Agent SDK (-> claude-fable-5-1) when set up, otherwise Anthropic API (-> claude-fable-5)
|
|
546
|
+
"opus" // Claude Agent SDK (-> claude-opus-5-5), else Anthropic API
|
|
547
|
+
"anthropic:opus" // Anthropic API only
|
|
531
548
|
"claude" // Claude Agent SDK (-> Claude Opus 5.5)
|
|
532
549
|
"claude:fable" // Claude Agent SDK (Claude Fable 5.1)
|
|
533
550
|
"codex:luna" // Codex (GPT-6 Luna)
|
|
@@ -535,6 +552,8 @@ Use `"auto"` for automatic selection, or specify exact models:
|
|
|
535
552
|
"copilot:gpt-6-sol" // GitHub Copilot SDK
|
|
536
553
|
```
|
|
537
554
|
|
|
555
|
+
**Local agent permissions:** bare names and `auto` reach the local agent providers whenever they are set up. The Antigravity CLI auto-approves every tool request and the Claude Agent SDK runs with `bypassPermissions`, so a read-only prompt is not an enforced boundary there. Name the API provider (`google:pro`, `anthropic:opus`, `openai:gpt-6-astra`) to keep a request on a plain API.
|
|
556
|
+
|
|
538
557
|
**Auto behavior:**
|
|
539
558
|
- **chat mode**: `["auto"]` selects the first available provider and uses its default model, with failover to the next provider on error.
|
|
540
559
|
- **consensus mode**: `["auto"]` expands to the first 3 available providers.
|
|
@@ -559,7 +578,7 @@ Control Codex behavior through environment variables:
|
|
|
559
578
|
- **`CODEX_SANDBOX_MODE`** — filesystem access: `read-only` (default), `workspace-write`, `danger-full-access` (containers only)
|
|
560
579
|
- **`CODEX_SKIP_GIT_CHECK`** — `true` (default) works in any directory; `false` requires a Git repository
|
|
561
580
|
- **`CODEX_APPROVAL_POLICY`** — `never` (default, recommended for servers), `untrusted`, `on-failure`, `on-request`
|
|
562
|
-
- **`
|
|
581
|
+
- **`CODEX_DEFAULT_MODEL`** — model used for `codex` and `auto` (default: `gpt-6-sol`); the legacy name `CODEX_MODEL` is honored when it is unset
|
|
563
582
|
- **`CODEX_API_KEY`** — optional API key for headless deployments (alternative to ChatGPT login)
|
|
564
583
|
|
|
565
584
|
**Example (.env):**
|
|
@@ -568,7 +587,25 @@ CODEX_API_KEY=your_codex_api_key_here
|
|
|
568
587
|
CODEX_SANDBOX_MODE=read-only
|
|
569
588
|
CODEX_SKIP_GIT_CHECK=true
|
|
570
589
|
CODEX_APPROVAL_POLICY=never
|
|
571
|
-
|
|
590
|
+
CODEX_DEFAULT_MODEL=gpt-6-sol
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
### Default Models
|
|
594
|
+
|
|
595
|
+
Each provider's default model (used for its bare provider name and for `auto`) can be set with `<PROVIDER>_DEFAULT_MODEL`. The value must be a model ID or alias from that provider's list; startup fails with "Did you mean" suggestions otherwise (OpenRouter also accepts any `vendor/model` slug).
|
|
596
|
+
|
|
597
|
+
```bash
|
|
598
|
+
CODEX_DEFAULT_MODEL=gpt-6-sol # CODEX_MODEL is honored as a legacy fallback
|
|
599
|
+
CLAUDE_DEFAULT_MODEL=claude-opus-5-5
|
|
600
|
+
AGY_DEFAULT_MODEL=gemini-3.8-flash # Antigravity CLI (gemini)
|
|
601
|
+
COPILOT_DEFAULT_MODEL=gpt-6-sol # COPILOT_MODEL is honored as a legacy fallback
|
|
602
|
+
OPENAI_DEFAULT_MODEL=gpt-6-sol
|
|
603
|
+
GOOGLE_DEFAULT_MODEL=gemini-3.1-pro-preview
|
|
604
|
+
XAI_DEFAULT_MODEL=grok-4.5
|
|
605
|
+
ANTHROPIC_DEFAULT_MODEL=claude-opus-5-5
|
|
606
|
+
MISTRAL_DEFAULT_MODEL=mistral-medium-3-5
|
|
607
|
+
DEEPSEEK_DEFAULT_MODEL=deepseek-v4-pro
|
|
608
|
+
OPENROUTER_DEFAULT_MODEL=z-ai/glm-5.2 # any vendor/model slug is accepted
|
|
572
609
|
```
|
|
573
610
|
|
|
574
611
|
## Context Processing
|
|
@@ -656,12 +693,12 @@ Set `async: true` on a chat request for long-running work:
|
|
|
656
693
|
|
|
657
694
|
**Missing API key / unavailable provider:**
|
|
658
695
|
```json
|
|
659
|
-
{ "error": "Provider openai is not available
|
|
696
|
+
{ "error": "Provider openai is not available: set OPENAI_API_KEY." }
|
|
660
697
|
```
|
|
661
698
|
|
|
662
|
-
**Invalid model
|
|
699
|
+
**Invalid model** (unknown names are rejected with up to three suggestions):
|
|
663
700
|
```json
|
|
664
|
-
{ "error": "
|
|
701
|
+
{ "error": "Unknown model \"gtp-6-astra\". Did you mean: gpt-6-astra?" }
|
|
665
702
|
```
|
|
666
703
|
|
|
667
704
|
**All models failed (multi-model chat):** the error lists each model and its failure. In consensus/roundtable, individual model/turn failures are recorded in the result (`failed` entries and trailing failure details) rather than aborting the whole request.
|
package/docs/EXAMPLES.md
CHANGED
|
@@ -74,6 +74,24 @@ I'd be happy to help you understand JavaScript promises! Promises are objects th
|
|
|
74
74
|
}
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
A bare model name goes to the first set-up provider that offers it (here Codex, then the OpenAI API), failing over only to providers serving the same model. Unknown names are rejected with "Did you mean" suggestions.
|
|
78
|
+
|
|
79
|
+
### Pinning a provider
|
|
80
|
+
|
|
81
|
+
Use `provider:model` to run a model on one provider only, or a provider name alone for its default model:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"tool": "chat",
|
|
86
|
+
"arguments": {
|
|
87
|
+
"prompt": "Compare these two approaches to request batching",
|
|
88
|
+
"models": ["openai:gpt-6-astra", "google:pro", "anthropic:opus", "codex:luna", "copilot:sonnet"]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Naming the API provider (`google:pro`, `anthropic:opus`) keeps the request off the local agent providers (Antigravity CLI, Claude Agent SDK), which bare names and `auto` otherwise reach first when they are set up.
|
|
94
|
+
|
|
77
95
|
### Fast responses with a lightweight model
|
|
78
96
|
|
|
79
97
|
```json
|
|
@@ -426,6 +444,26 @@ Codex maintains conversation history through threads in `chat` mode:
|
|
|
426
444
|
}
|
|
427
445
|
```
|
|
428
446
|
|
|
447
|
+
### Choosing the Codex Model
|
|
448
|
+
|
|
449
|
+
`codex` uses GPT-6 Sol (or `CODEX_DEFAULT_MODEL`); `codex:<model>` picks another model from the Codex list:
|
|
450
|
+
|
|
451
|
+
```json
|
|
452
|
+
{
|
|
453
|
+
"tool": "chat",
|
|
454
|
+
"arguments": {
|
|
455
|
+
"prompt": "Find the race condition in the job scheduler",
|
|
456
|
+
"models": ["codex:astra"],
|
|
457
|
+
"files": ["/path/to/src/scheduler.js"]
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
# Default model for "codex" and "auto" (CODEX_MODEL is honored as a legacy fallback)
|
|
464
|
+
CODEX_DEFAULT_MODEL=gpt-6-luna
|
|
465
|
+
```
|
|
466
|
+
|
|
429
467
|
### Sandbox Modes
|
|
430
468
|
|
|
431
469
|
Control filesystem access through `CODEX_SANDBOX_MODE`:
|