autopilot-ai 1.25.0 → 1.26.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 +63 -11
- package/dist/index.js +8884 -5755
- package/dist/index.js.map +1 -1
- package/dist/sdk/index.d.ts +333 -251
- package/dist/sdk/index.js +5852 -3274
- package/dist/sdk/index.js.map +1 -1
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -11,17 +11,19 @@
|
|
|
11
11
|
<a href="https://github.com/sinameraji/autopilot/blob/main/LICENSE"><img src="https://img.shields.io/github/license/sinameraji/autopilot?style=flat-square&color=2ea44f" alt="license"></a>
|
|
12
12
|
<img src="https://img.shields.io/badge/node-%3E%3D20-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js >= 20">
|
|
13
13
|
<img src="https://img.shields.io/badge/typescript-5.7-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
|
|
14
|
-
<
|
|
14
|
+
<img src="https://img.shields.io/badge/runs%20on-OpenRouter%20·%20OpenAI%20·%20DeepSeek%20·%20Ollama%20·%20…-6566f1?style=flat-square" alt="Runs on OpenRouter, OpenAI, DeepSeek, Ollama and more">
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
<p align="center">
|
|
18
|
-
<strong>A terminal coding agent that runs
|
|
19
|
-
|
|
18
|
+
<strong>A terminal coding agent that runs on your own provider key.</strong><br>
|
|
19
|
+
OpenRouter (400+ models, per-turn billed cost), OpenAI, DeepSeek, Kimi, Z.ai, local Ollama / LM Studio, or any OpenAI-compatible endpoint.
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
## How it works
|
|
23
23
|
|
|
24
|
-
autopilot sends every model call to **
|
|
24
|
+
autopilot sends every model call to **the provider you choose** using **your own key** — bring-your-own-key, nothing proxied, nothing marked up. On first run you pick a provider, connect it once (the key is checked before it's saved) and pick a model. That's the whole setup. [OpenRouter](https://openrouter.ai) is the recommended default; see [Providers](#providers) for the rest.
|
|
25
|
+
|
|
26
|
+
On OpenRouter you also get:
|
|
25
27
|
|
|
26
28
|
- **Any model, one key.** The model picker is OpenRouter's live catalog — Claude, GPT, Gemini, Grok, Qwen, GLM, Kimi, DeepSeek, free models and more — opening on the best & latest by benchmark score, with fuzzy search over everything. Switch any time with `/model`.
|
|
27
29
|
- **Real cost, per turn.** OpenRouter reports what each generation actually cost; the status bar shows it (a local estimate marked `≈$` only until the billed number arrives). `/cost` totals it by session, day, month and all time.
|
|
@@ -81,6 +83,53 @@ npx autopilot-ai
|
|
|
81
83
|
|
|
82
84
|
Requires Node.js ≥ 20.
|
|
83
85
|
|
|
86
|
+
### Providers
|
|
87
|
+
|
|
88
|
+
| Provider | id | Key | Notes |
|
|
89
|
+
|---|---|---|---|
|
|
90
|
+
| [OpenRouter](https://openrouter.ai) (default) | `openrouter` | `OPENROUTER_API_KEY` or browser sign-in | 400+ models, billed cost per turn, sticky routing, subagents, Jev checks |
|
|
91
|
+
| Anthropic | `anthropic` | `ANTHROPIC_API_KEY` | native Messages API: extended/adaptive thinking, explicit prompt caching (API keys only — Claude Pro/Max sign-in isn't permitted for third-party tools) |
|
|
92
|
+
| OpenAI | `openai` | `OPENAI_API_KEY` | Responses API: reasoning carries across tool loops (encrypted, stateless), codex models |
|
|
93
|
+
| Google Gemini | `gemini` | `GEMINI_API_KEY` / `GOOGLE_API_KEY` | OpenAI-compatible endpoint; Gemini 3 thought signatures are kept with each tool call |
|
|
94
|
+
| ChatGPT (Plus/Pro/Team plan) | `chatgpt` | `autopilot auth chatgpt` (browser sign-in with token sharing) | your plan's GPT models over the Responses API; tokens refresh automatically; usage counts against your plan. Uses OpenAI's official token-sharing sign-in, not the Codex backend |
|
|
95
|
+
| GitHub Copilot | `copilot` | `autopilot auth copilot` (GitHub device login; `--enterprise <domain>`) | your Copilot plan's models — Claude over Messages, GPT over Responses; usage counts as premium requests. Not a documented public API, so GitHub may change it |
|
|
96
|
+
| Google Vertex AI | `vertex` | Google credentials (`gcloud auth application-default login`, a service-account key in `GOOGLE_APPLICATION_CREDENTIALS`, or `GOOGLE_VERTEX_ACCESS_TOKEN`) + `GOOGLE_VERTEX_PROJECT` (or `autopilot auth vertex --project …`) | Gemini and partner models through Vertex's OpenAI-compatible endpoint, Claude through Anthropic's Messages API on Vertex; location `GOOGLE_VERTEX_LOCATION` (default `global`) |
|
|
97
|
+
| Amazon Bedrock | `bedrock` | `AWS_BEARER_TOKEN_BEDROCK` (Bedrock API key), or AWS credentials (env or `~/.aws/credentials` / `AWS_PROFILE`; for SSO, `eval "$(aws configure export-credentials --format env)"`); region `AWS_REGION` | Converse API with SigV4 signing; Claude thinking and prompt caching; inference-profile ids like `global.anthropic.claude-sonnet-5-5` |
|
|
98
|
+
| DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` | |
|
|
99
|
+
| MiniMax | `minimax` | `MINIMAX_API_KEY` | OpenAI-compatible endpoint with split reasoning (`<think>` tags are separated out if they appear) |
|
|
100
|
+
| Moonshot AI (Kimi) | `moonshot` | `MOONSHOT_API_KEY` | |
|
|
101
|
+
| Kimi Code (subscription) | `kimi-code` | `KIMI_API_KEY` | |
|
|
102
|
+
| Z.ai (GLM) | `zai` | `ZHIPU_API_KEY` | |
|
|
103
|
+
| Z.ai GLM Coding Plan | `zai-coding` | `ZHIPU_API_KEY` | |
|
|
104
|
+
| xAI | `xai` | `XAI_API_KEY` | Grok over the Responses API |
|
|
105
|
+
| Mistral | `mistral` | `MISTRAL_API_KEY` | tool-call ids adapted to Mistral's format; `mistral-embed` |
|
|
106
|
+
| Groq · Cerebras · Together AI · Fireworks AI · DeepInfra | `groq` · `cerebras` · `together` · `fireworks` · `deepinfra` | `GROQ_API_KEY` · `CEREBRAS_API_KEY` · `TOGETHER_API_KEY` · `FIREWORKS_API_KEY` · `DEEPINFRA_API_KEY` | fast / open-model hosts |
|
|
107
|
+
| Vercel AI Gateway | `vercel` | `AI_GATEWAY_API_KEY` | many vendors with one key |
|
|
108
|
+
| Cloudflare Workers AI | `cloudflare` | `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` (or `autopilot auth cloudflare --account-id …`) | Cloudflare-era kimiflare configs reuse their credentials, and memory stays on `bge-base-en-v1.5`. For **AI Gateway**, use its OpenAI-compatible URL as a `custom` endpoint |
|
|
109
|
+
| Azure OpenAI | `azure` | `AZURE_API_KEY` + `AZURE_RESOURCE_NAME` (or `autopilot auth azure --resource <name>`) | v1 API over Responses; model ids are your deployment names, discovered from the resource. Entra ID sign-in isn't supported yet — use a key |
|
|
110
|
+
| Ollama (local) | `ollama` | none | installed models are discovered; `providers.ollama.baseUrl` for another host |
|
|
111
|
+
| LM Studio (local) | `lmstudio` | none | |
|
|
112
|
+
| Requesty | `requesty` | `REQUESTY_API_KEY` | |
|
|
113
|
+
| Any OpenAI-compatible endpoint | `custom` | `KIMIFLARE_API_KEY` (optional) | `KIMIFLARE_BASE_URL` — LiteLLM, vLLM, llama.cpp, a company gateway |
|
|
114
|
+
|
|
115
|
+
- **First run** asks which provider to use; providers with a key already in your environment are offered first and used without saving the key.
|
|
116
|
+
- **Switch any time** with `/provider <id> [key]` (`/provider` lists them and where each key comes from), or from the CLI: `autopilot auth <id>` (saves a key and makes it active), `autopilot auth use <id>`, `autopilot auth status`. For one run, set `AUTOPILOT_PROVIDER=<id>`.
|
|
117
|
+
- **Everything follows the provider**: chat, compaction and memory side-calls, memory/skill embeddings, the model picker (each provider's own catalog — models.dev for hosted providers, live discovery for Ollama and LM Studio), pricing, error messages and the status page link. Nothing is sent to OpenRouter while another provider is active.
|
|
118
|
+
- **OpenRouter-only features** switch off on other providers: billed-cost confirmation (elsewhere `/cost` shows estimates from the provider's published prices), Hotcell subagents, and the Jev completion/triage checks.
|
|
119
|
+
- **Embeddings**: providers without an embeddings API (Anthropic, DeepSeek, Moonshot, Kimi Code, the Coding Plan, LM Studio) keep memory working through text and topic-key recall. To keep vector recall, set `"embeddingProvider": "openai"` (or `AUTOPILOT_EMBEDDING_PROVIDER`) with that provider's key, or `memoryEmbeddingModel`.
|
|
120
|
+
|
|
121
|
+
Config file shape (keys can live here instead of the environment):
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"provider": "deepseek",
|
|
126
|
+
"providers": {
|
|
127
|
+
"deepseek": { "apiKey": "sk-…", "model": "deepseek-v4-pro" },
|
|
128
|
+
"ollama": { "baseUrl": "http://gpu-box:11434/v1" }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
84
133
|
### Your OpenRouter key
|
|
85
134
|
|
|
86
135
|
Three ways to provide it — the first one found wins:
|
|
@@ -99,7 +148,7 @@ Earlier kimiflare versions ran on Cloudflare Workers AI / AI Gateway. On the fir
|
|
|
99
148
|
|
|
100
149
|
- Your settings (theme, MCP/LSP servers, hooks, memory, sessions, cost history) carry over.
|
|
101
150
|
- Model ids are migrated (`@cf/moonshotai/kimi-k2.6` → `moonshotai/kimi-k2.6`, and so on), and the retired Cloudflare fields (OAuth login, gateway, Unified Billing, provider keys) are removed from `config.json`.
|
|
102
|
-
- Memory keeps working unchanged: embeddings use the same `bge-base-en-v1.5` model
|
|
151
|
+
- Memory keeps working unchanged: on OpenRouter, embeddings use the same `bge-base-en-v1.5` model Workers AI served.
|
|
103
152
|
- `/gateway`, `autopilot auth cloudflare`, `--cloud` and the Cloud-only commands are gone. `/multi-agent` (Commute) is retired; subagents now run locally through Hotcell.
|
|
104
153
|
|
|
105
154
|
### Subagents
|
|
@@ -224,9 +273,11 @@ session.dispose();
|
|
|
224
273
|
|
|
225
274
|
#### SDK Authentication
|
|
226
275
|
|
|
227
|
-
The SDK
|
|
228
|
-
|
|
229
|
-
|
|
276
|
+
The SDK uses the active [provider](#providers) — `provider` in `config` (or `AUTOPILOT_PROVIDER`),
|
|
277
|
+
else OpenRouter — and needs its key: `providers.<id>.apiKey` in `config` or the provider's env var
|
|
278
|
+
(`OPENAI_API_KEY`, `DEEPSEEK_API_KEY`, …). A [custom gateway endpoint](#custom-gateway-endpoint)
|
|
279
|
+
(`baseUrl` / `apiKey` in `config`, or `KIMIFLARE_BASE_URL` / `KIMIFLARE_API_KEY`) needs no other key.
|
|
280
|
+
For OpenRouter, the key is resolved in this priority order:
|
|
230
281
|
|
|
231
282
|
1. **Explicit `config` object** (`openrouterApiKey`) — recommended for apps
|
|
232
283
|
2. **Environment variables**: `OPENROUTER_API_KEY` / `KIMIFLARE_OPENROUTER_KEY`
|
|
@@ -314,12 +365,13 @@ autopilot
|
|
|
314
365
|
| `/memory` | Show memory stats and search |
|
|
315
366
|
| `/mcp list` / `/mcp reload` | Manage MCP servers |
|
|
316
367
|
| `/reasoning` | Toggle chain-of-thought display |
|
|
317
|
-
| `/model` | Pick a model from
|
|
368
|
+
| `/model` | Pick a model from the active provider's catalog (or `/model <id>`, `/model list [filter]`) |
|
|
369
|
+
| `/provider` | List providers, or switch with `/provider <id> [key]` (see [Providers](#providers)) |
|
|
318
370
|
| `/jev` | Ask Jev for a typed, scoped one-shot decision |
|
|
319
371
|
| `/subagents` | List running subagents; `/subagents cancel <n>\|all` stops them; `/subagents off\|suggest\|auto` sets the delegation policy (default: `auto`) |
|
|
320
372
|
| `/now` | Run your latest queued message now instead of after the current turn (also `Ctrl+G` in Ink) |
|
|
321
|
-
| `/key` | Show
|
|
322
|
-
| `/cost` | Show
|
|
373
|
+
| `/key` | Show the active provider's key — on OpenRouter with spend and credit (`/key set <key>`, `/key clear`) |
|
|
374
|
+
| `/cost` | Show cost by session, day, month and all time (OpenRouter-confirmed, or estimated from the provider's prices) |
|
|
323
375
|
| `/update` | Check for updates |
|
|
324
376
|
| `/help` | List all commands |
|
|
325
377
|
|