tabby-ai-tools 0.3.1 → 0.4.1
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 +16 -3
- package/README.zh-CN.md +15 -2
- package/VALIDATION.md +31 -0
- package/dist/index.js +1 -1
- package/docs/assets/overview.png +0 -0
- package/docs/assets/overview.svg +57 -36
- package/docs/claude-code.md +57 -0
- package/docs/coding-plans.md +39 -0
- package/docs/development.md +22 -2
- package/docs/guide.md +56 -15
- package/docs/multi-provider-agent.md +25 -4
- package/docs/provider-roadmap.md +162 -0
- package/docs/releases/0.3.2.md +13 -0
- package/docs/releases/0.4.0.md +3 -0
- package/docs/releases/0.4.1.md +21 -0
- package/docs/releases/unreleased.md +3 -0
- package/package.json +6 -3
- package/skills/tabby/SKILL.md +4 -2
- package/skills/tabby/references/operations.md +13 -3
package/docs/assets/overview.png
CHANGED
|
Binary file
|
package/docs/assets/overview.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1800" height="
|
|
2
|
-
<title id="title">Tabby AI Tools
|
|
3
|
-
<desc id="desc">Interface illustration, not a running screenshot. The assistant sidebar coordinates example staging database and application terminals. Scheduled tasks, provider connections, startup opening enabled by default and twelve interface languages are shown below.</desc>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1800" height="1440" viewBox="0 0 1800 1440" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">Tabby AI Tools v0.4.1 interface illustration — Claude Code local login, continuous goals, reasoning picker and custom OpenAI-compatible connections</title>
|
|
3
|
+
<desc id="desc">Interface illustration, not a running screenshot. The assistant sidebar coordinates example staging database and application terminals. Connection and model controls share one compact row. Scheduled tasks, provider connections, startup opening enabled by default and twelve interface languages and the Claude Code local-login connection are shown below. Active goals continue automatically by default. A Kimi Coding Plan reasoning picker and China/international presets for Kimi and Alibaba Coding Plan are illustrated. Custom OpenAI-compatible settings show an example Base URL, model, protocol and authentication. This is a version 0.4.1 interface example.</desc>
|
|
4
4
|
<defs>
|
|
5
5
|
<linearGradient id="background" x2="1" y2="1"><stop stop-color="#0c1622"/><stop offset="1" stop-color="#151729"/></linearGradient>
|
|
6
6
|
<linearGradient id="outline"><stop stop-color="#375d5d"/><stop offset="1" stop-color="#3b3d5c"/></linearGradient>
|
|
@@ -10,14 +10,14 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
|
|
|
10
10
|
.mono{font-family:"DejaVu Sans Mono",monospace}
|
|
11
11
|
</style>
|
|
12
12
|
|
|
13
|
-
<rect x="0" y="0" width="1800" height="
|
|
13
|
+
<rect x="0" y="0" width="1800" height="1440" rx="24" fill="url(#background)"/>
|
|
14
14
|
<rect x="48" y="38" width="42" height="38" rx="10" fill="#173a33" stroke="#306355"/>
|
|
15
15
|
<text x="56" y="65" font-size="23" font-weight="700" style="fill:#8ae6c2" class="mono">>_</text>
|
|
16
16
|
<text x="106" y="66" font-size="21" font-weight="700" style="fill:#a7b8cb">TABBY AI TOOLS</text>
|
|
17
17
|
<rect x="1534" y="44" width="218" height="28" rx="6" fill="#22313f"/>
|
|
18
|
-
<text x="1544" y="64" font-size="16" font-weight="600" style="fill:#8ae6c2">v0.
|
|
18
|
+
<text x="1544" y="64" font-size="16" font-weight="600" style="fill:#8ae6c2">v0.4.1 / 12 languages</text>
|
|
19
19
|
<text x="48" y="134" font-size="54" font-weight="700" style="fill:#f1f6ff">Your terminals. Working together.</text>
|
|
20
|
-
<text x="50" y="176" font-size="23" font-weight="400" style="fill:#a7b8cb">Codex +
|
|
20
|
+
<text x="50" y="176" font-size="23" font-weight="400" style="fill:#a7b8cb">Codex + Claude Code local login + APIs / Terminal tools / Scheduled AI tasks</text>
|
|
21
21
|
<rect x="48" y="210" width="1704" height="632" rx="14" fill="#0d1520" stroke="url(#outline)"/>
|
|
22
22
|
<rect x="49" y="211" width="1702" height="42" rx="13" fill="#1c2635"/>
|
|
23
23
|
<rect x="49" y="235" width="1702" height="18" rx="0" fill="#1c2635"/>
|
|
@@ -28,22 +28,23 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
|
|
|
28
28
|
<text x="1647" y="239" font-size="15" font-weight="400" style="fill:#a7b8cb">+ Settings</text>
|
|
29
29
|
<rect x="49" y="253" width="499" height="588" rx="0" fill="#172130"/>
|
|
30
30
|
<path d="M548 253L548 842" stroke="#3b4b60"/>
|
|
31
|
-
<text x="72" y="285" font-size="23" font-weight="700" style="fill:#eef4ff">
|
|
32
|
-
<text x="
|
|
31
|
+
<text x="72" y="285" font-size="23" font-weight="700" style="fill:#eef4ff">Claude Code</text>
|
|
32
|
+
<text x="248" y="284" font-size="16" font-weight="400" style="fill:#8ca0b8">workspace</text>
|
|
33
33
|
<rect x="368" y="263" width="62" height="28" rx="6" fill="#1a4a3a"/>
|
|
34
34
|
<text x="378" y="283" font-size="14" font-weight="600" style="fill:#8ae6c2">Linked</text>
|
|
35
35
|
<rect x="438" y="263" width="64" height="28" rx="6" fill="#253348"/>
|
|
36
36
|
<text x="448" y="283" font-size="14" font-weight="600" style="fill:#a7b8cb">Details</text>
|
|
37
37
|
<text x="519" y="285" font-size="22" font-weight="400" style="fill:#8ca0b8">×</text>
|
|
38
|
-
<rect x="72" y="302" width="
|
|
39
|
-
<text x="
|
|
40
|
-
<text x="
|
|
41
|
-
<rect x="
|
|
42
|
-
<text x="
|
|
43
|
-
<text x="
|
|
38
|
+
<rect x="72" y="302" width="196" height="33" rx="5" fill="#243247" stroke="#3a4c65"/>
|
|
39
|
+
<text x="82" y="325" font-size="15" style="fill:#e8eff9">Claude Code (local)</text>
|
|
40
|
+
<text x="246" y="325" font-size="20" style="fill:#a7b8cb">⌄</text>
|
|
41
|
+
<rect x="276" y="302" width="248" height="33" rx="5" fill="#202d40"/>
|
|
42
|
+
<text x="284" y="325" font-size="14" style="fill:#e8eff9">sonnet</text>
|
|
43
|
+
<text x="390" y="325" font-size="14" style="fill:#a7b8cb">reasoning: high</text>
|
|
44
|
+
<g transform="translate(0 -40)">
|
|
44
45
|
<rect x="72" y="384" width="88" height="28" rx="6" fill="#344132"/>
|
|
45
46
|
<text x="82" y="404" font-size="15" font-weight="600" style="fill:#d4e9a1">Running</text>
|
|
46
|
-
<text x="174" y="405" font-size="15" font-weight="400" style="fill:#a7b8cb">Context
|
|
47
|
+
<text x="174" y="405" font-size="15" font-weight="400" style="fill:#a7b8cb">Context —</text>
|
|
47
48
|
<text x="290" y="405" font-size="15" font-weight="400" style="fill:#8ae6c2">Control 2</text>
|
|
48
49
|
<text x="387" y="405" font-size="15" font-weight="600" style="fill:#8ae6c2">Release</text>
|
|
49
50
|
<text x="461" y="405" font-size="14" font-weight="400" style="fill:#a7b8cb">Fwd on</text>
|
|
@@ -54,19 +55,20 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
|
|
|
54
55
|
<rect x="72" y="509" width="452" height="80" rx="8" fill="#1b2839" stroke="#344458"/>
|
|
55
56
|
<text x="86" y="533" font-size="14" font-weight="600" style="fill:#8ae6c2">Assistant</text>
|
|
56
57
|
<text x="86" y="557" font-size="17" font-weight="400" style="fill:#e8eff9">Database step verified. Application next.</text>
|
|
57
|
-
<text x="86" y="578" font-size="17" font-weight="400" style="fill:#e8eff9">
|
|
58
|
+
<text x="86" y="578" font-size="17" font-weight="400" style="fill:#e8eff9">Goal active: continuing automatically.</text>
|
|
58
59
|
<text x="75" y="606" font-size="15" font-weight="600" style="fill:#a7b8cb">Workflows</text>
|
|
59
60
|
<text x="205" y="606" font-size="15" font-weight="600" style="fill:#8ae6c2">Scheduled tasks</text>
|
|
60
61
|
<rect x="72" y="619" width="452" height="92" rx="7" fill="#1a2938" stroke="#35534f"/>
|
|
61
62
|
<text x="85" y="644" font-size="18" font-weight="600" style="fill:#e5f3eb">Daily service health</text>
|
|
62
63
|
<text x="85" y="667" font-size="15" font-weight="400" style="fill:#a7b8cb">Enabled · Daily 09:00 (Asia/Shanghai)</text>
|
|
63
64
|
<text x="85" y="692" font-size="15" font-weight="400" style="fill:#8ae6c2">Run now Pause Run history</text>
|
|
64
|
-
|
|
65
|
-
<
|
|
66
|
-
<text x="85" y="
|
|
67
|
-
<text x="
|
|
65
|
+
</g>
|
|
66
|
+
<rect x="72" y="683" width="452" height="93" rx="7" fill="#101a27" stroke="#42546d"/>
|
|
67
|
+
<text x="85" y="707" font-size="16" font-weight="400" style="fill:#8ca0b8">/task1 — run the saved workflow</text>
|
|
68
|
+
<text x="85" y="728" font-size="12" font-weight="400" style="fill:#8ca0b8">Ctrl / Cmd + Enter to send</text>
|
|
69
|
+
<text x="73" y="812" font-size="14" font-weight="400" style="fill:#a7b8cb">Tools</text>
|
|
68
70
|
<rect x="115" y="792" width="159" height="28" rx="6" fill="#253348"/>
|
|
69
|
-
<text x="125" y="812" font-size="14" font-weight="600" style="fill:#a7b8cb">
|
|
71
|
+
<text x="125" y="812" font-size="14" font-weight="600" style="fill:#a7b8cb">Terminal tools</text>
|
|
70
72
|
<text x="286" y="812" font-size="13" font-weight="400" style="fill:#a7b8cb">Approval</text>
|
|
71
73
|
<rect x="352" y="792" width="97" height="28" rx="6" fill="#253348"/>
|
|
72
74
|
<text x="362" y="812" font-size="13" font-weight="600" style="fill:#a7b8cb">On request</text>
|
|
@@ -110,7 +112,7 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
|
|
|
110
112
|
<text x="72" y="915" font-size="24" font-weight="650" style="fill:#edf5ff">Settings / AI Tools</text>
|
|
111
113
|
<text x="72" y="952" font-size="18" font-weight="400" style="fill:#a7b8cb">Default connection</text>
|
|
112
114
|
<rect x="496" y="929" width="575" height="33" rx="6" fill="#233246" stroke="#3c5068"/>
|
|
113
|
-
<text x="512" y="952" font-size="17" font-weight="400" style="fill:#e8eff9">
|
|
115
|
+
<text x="512" y="952" font-size="17" font-weight="400" style="fill:#e8eff9">Claude Code (local login)</text>
|
|
114
116
|
<text x="1048" y="952" font-size="20" font-weight="400" style="fill:#a7b8cb">⌄</text>
|
|
115
117
|
<text x="72" y="993" font-size="18" font-weight="400" style="fill:#e8eff9">Open AI Tools when Tabby starts</text>
|
|
116
118
|
<text x="740" y="993" font-size="16" font-weight="500" style="fill:#8ae6c2">On by default</text>
|
|
@@ -122,19 +124,38 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
|
|
|
122
124
|
<text x="892" y="1035" font-size="15" font-weight="400" style="fill:#8ca0b8">12 languages</text>
|
|
123
125
|
<text x="1048" y="1035" font-size="20" font-weight="400" style="fill:#a7b8cb">⌄</text>
|
|
124
126
|
<path d="M72 1061H1071" stroke="#2b3a4d"/>
|
|
125
|
-
<text x="72" y="1086" font-size="
|
|
126
|
-
<text x="72" y="1115" font-size="14" style="fill:#a7b8cb">
|
|
127
|
+
<text x="72" y="1086" font-size="16" font-weight="500" style="fill:#8ae6c2">Codex · Claude Code · OpenAI · DeepSeek · GLM · Kimi API / Plan · Alibaba Plan · Claude API</text>
|
|
128
|
+
<text x="72" y="1115" font-size="14" style="fill:#a7b8cb">Goals continue automatically · Default tool-round limit: 0 (unlimited)</text>
|
|
127
129
|
<rect x="1122" y="878" width="630" height="254" rx="12" fill="#172130" stroke="#35475c"/>
|
|
128
|
-
<text x="1146" y="915" font-size="
|
|
129
|
-
<
|
|
130
|
-
<
|
|
131
|
-
<text x="
|
|
132
|
-
<
|
|
133
|
-
<text x="
|
|
134
|
-
<
|
|
135
|
-
<
|
|
136
|
-
<text x="
|
|
137
|
-
<
|
|
138
|
-
<text x="
|
|
139
|
-
<
|
|
130
|
+
<text x="1146" y="915" font-size="22" font-weight="650" style="fill:#edf5ff">Kimi Coding Plan / Step 2: reasoning</text>
|
|
131
|
+
<text x="1146" y="946" font-size="16" style="fill:#a7b8cb">Region: China mainland / International / Custom</text>
|
|
132
|
+
<rect x="1146" y="960" width="580" height="31" rx="5" fill="#233246"/>
|
|
133
|
+
<text x="1160" y="981" font-size="16">kimi-for-coding · reasoning: max</text>
|
|
134
|
+
<text x="1160" y="1015" font-size="16">low</text>
|
|
135
|
+
<text x="1315" y="1015" font-size="16">high</text>
|
|
136
|
+
<rect x="1475" y="997" width="251" height="28" rx="5" fill="#286a54"/>
|
|
137
|
+
<text x="1490" y="1016" font-size="16" style="fill:#e8fff5">max ✓</text>
|
|
138
|
+
<text x="1146" y="1052" font-size="15" style="fill:#a7b8cb">Custom effort (optional)</text>
|
|
139
|
+
<rect x="1146" y="1063" width="461" height="28" rx="5" fill="#233246"/>
|
|
140
|
+
<text x="1160" y="1083" font-size="14" style="fill:#a7b8cb">Provider default</text>
|
|
141
|
+
<rect x="1619" y="1063" width="107" height="28" rx="5" fill="#253348"/>
|
|
142
|
+
<text x="1648" y="1083" font-size="14">Apply</text>
|
|
143
|
+
<text x="1146" y="1116" font-size="15" style="fill:#8ae6c2">Alibaba Coding Plan also offers regional presets</text>
|
|
144
|
+
<rect x="48" y="1152" width="1704" height="204" rx="12" fill="#172130" stroke="#35475c"/>
|
|
145
|
+
<text x="72" y="1189" font-size="22" font-weight="650" style="fill:#edf5ff">Custom (OpenAI compatible) / Example connection settings</text>
|
|
146
|
+
<text x="72" y="1223" font-size="16" style="fill:#a7b8cb">API protocol</text>
|
|
147
|
+
<rect x="260" y="1201" width="580" height="33" rx="5" fill="#233246"/>
|
|
148
|
+
<text x="276" y="1224" font-size="16">Chat Completions (default) / Responses</text>
|
|
149
|
+
<text x="890" y="1223" font-size="16" style="fill:#a7b8cb">Key source</text>
|
|
150
|
+
<rect x="1080" y="1201" width="646" height="33" rx="5" fill="#233246"/>
|
|
151
|
+
<text x="1096" y="1224" font-size="16">Direct key / Environment variable / No API key</text>
|
|
152
|
+
<text x="72" y="1271" font-size="16" style="fill:#a7b8cb">Base URL</text>
|
|
153
|
+
<rect x="260" y="1249" width="580" height="33" rx="5" fill="#233246"/>
|
|
154
|
+
<text x="276" y="1272" font-size="16">https://gateway.example/v1</text>
|
|
155
|
+
<text x="890" y="1271" font-size="16" style="fill:#a7b8cb">Model ID</text>
|
|
156
|
+
<rect x="1080" y="1249" width="646" height="33" rx="5" fill="#233246"/>
|
|
157
|
+
<text x="1096" y="1272" font-size="16">your-model-id / Discover or enter manually</text>
|
|
158
|
+
<text x="72" y="1326" font-size="16" style="fill:#8ae6c2">Streaming + function tools required · localhost HTTP supported · Connection test available</text>
|
|
159
|
+
<text x="49" y="1393" font-size="16" font-weight="400" style="fill:#8ca0b8">INTERFACE ILLUSTRATION · Example connections and task output; not a running screenshot.</text>
|
|
160
|
+
<text x="49" y="1418" font-size="14" font-weight="400" style="fill:#8ca0b8">Appearance varies with your Tabby theme, window size and configured connections.</text>
|
|
140
161
|
</svg>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Claude Code local login
|
|
2
|
+
|
|
3
|
+
[README](../README.md) · [中文使用指南](guide.md)
|
|
4
|
+
|
|
5
|
+
Version 0.4.1 includes **Claude Code (local login)** alongside native Codex and the existing Claude API connection. It runs the user's installed, unmodified official CLI. Authentication, model access, subscription limits, and billing remain with Claude Code.
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
1. Install the [official Claude Code CLI](https://code.claude.com/docs/en/setup) on the computer running Tabby.
|
|
10
|
+
2. Run `claude auth login` in a local terminal and choose your Claude account to use an eligible subscription. Check `claude auth status` and confirm the intended authentication method. Existing API keys, API key helpers, or cloud-provider configuration may select separately billed usage; the plugin preserves the CLI's authentication options.
|
|
11
|
+
3. In **Settings → AI Tools → Claude Code**, set the executable path if discovery cannot find it. Select **Claude Code (local login)** in the sidebar or make it the default connection. The default alias is `sonnet`; `opus`, `haiku`, and full model IDs can also be configured. These are candidate aliases, not an account entitlement list.
|
|
12
|
+
4. Describe a task. Operations use the same Tabby tools, read-only restrictions, approvals, workflow checkpoints, and execution records as API connections. The host's operating system permissions still apply; this mode does not supply an OS sandbox.
|
|
13
|
+
|
|
14
|
+
The executable resolver checks PATH, the official `~/.local/bin` location, common Homebrew/npm directories, and the current executable's directory. Explicit paths, quoted paths, and `~/` paths are supported. A custom command name searches PATH only. Windows `.exe`, `.com`, `.cmd`, and `.bat` launchers are supported. Custom Node/npm prefixes outside these locations need an explicit path and a working Node environment.
|
|
15
|
+
|
|
16
|
+
Connecting checks `--help` and `auth status` without model inference. The CLI must support the integration flags, including `--system-prompt-snapshot`, `--append-system-prompt-file`, strict MCP configuration, and streaming partial messages. Update Claude Code if the connection reports a missing flag. No account credentials are read from files or saved by the plugin.
|
|
17
|
+
|
|
18
|
+
## Design decision and official sources
|
|
19
|
+
|
|
20
|
+
The [official authentication rules](https://code.claude.com/docs/en/legal-and-compliance#authentication-and-credential-use) distinguish running unmodified Claude Code with the user's own subscription from a third-party application's reuse of subscription credentials. The integration uses the former: the CLI completes Anthropic's own login flow and makes all model requests. The plugin neither implements a Claude.ai OAuth flow nor forwards subscription tokens to the Messages API. Existing Claude API connections remain separate.
|
|
21
|
+
|
|
22
|
+
The adapter uses the documented [programmatic CLI](https://code.claude.com/docs/en/headless), [CLI flags](https://code.claude.com/docs/en/cli-reference), and [HTTP MCP configuration](https://code.claude.com/docs/en/mcp). A TypeScript Agent SDK dependency is not needed. The default Claude Code system prompt is retained, with the bundled Tabby skill and current task instructions appended.
|
|
23
|
+
|
|
24
|
+
```mermaid
|
|
25
|
+
sequenceDiagram
|
|
26
|
+
participant User
|
|
27
|
+
participant Panel as Tabby sidebar
|
|
28
|
+
participant CLI as Official Claude Code CLI
|
|
29
|
+
participant MCP as Temporary loopback MCP bridge
|
|
30
|
+
participant Host as Tabby tool executor
|
|
31
|
+
User->>CLI: claude auth login (official flow)
|
|
32
|
+
User->>Panel: Task and selected local connection
|
|
33
|
+
Panel->>CLI: -p + stream-json + appended instructions
|
|
34
|
+
CLI-->>Panel: Streamed response and usage
|
|
35
|
+
CLI->>MCP: Authenticated tools/call
|
|
36
|
+
MCP->>Host: Existing tool validation and permissions
|
|
37
|
+
Host-->>Panel: Approval when required
|
|
38
|
+
Host-->>MCP: Recorded execution result
|
|
39
|
+
MCP-->>CLI: MCP tool result
|
|
40
|
+
CLI-->>Panel: Final result and native session ID
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Runtime boundaries
|
|
44
|
+
|
|
45
|
+
- Each invocation gets an HTTP MCP listener on `127.0.0.1` with a random port and a fresh 256-bit bearer secret. The listener checks the host and rejects browser origins. Calls are serialized before entering the existing executor; intent is saved before execution. The server and private temporary instruction/config files are removed when the invocation ends or stops.
|
|
46
|
+
- `--tools ""` disables built-in shell/file tools. `--strict-mcp-config` loads the Tabby bridge, and `--disable-slash-commands` disables CLI skills and commands for this invocation. `--settings '{"disableAllHooks":true}'` disables user/project/plugin hooks; administrator-managed hooks and enforced policy remain governed by Claude Code. Only user settings are loaded to retain the user's authentication helpers; project/local settings are excluded. These options apply to the launched session, without changing the user's settings files.
|
|
47
|
+
- MCP approval rules allow the bridge to reach the host executor. They do not waive the host's read-only checks, mutation approval, workflow sequencing, sudo authentication, or scheduled-task restrictions.
|
|
48
|
+
- The plugin stores portable conversation history and an opaque native session ID, not credentials. Successful continuations use `--resume` and send only new input. Model changes and provider switches import portable text and observed tool outcomes into a fresh session. On an interrupted or failed invocation, the next explicit request reconstructs from recorded history, with a warning to verify the terminal before acting. There is no automatic model retry or silent API fallback.
|
|
49
|
+
- Stop cancels pending host requests and terminates the owned CLI process tree before the turn finishes. Commands already submitted to a Tabby terminal may still run. Messages added while Claude Code is working are queued for a new invocation after the current one ends, rather than injected into an in-progress CLI request.
|
|
50
|
+
- Observed usage is counted once per native message and checked against the task budget before further operations. Token usage is not a subscription balance or price. Native context compaction belongs to Claude Code; imported plugin history has a 9 MiB input limit.
|
|
51
|
+
- Schedules can choose this connection. Existing scheduler isolation, logging, and unattended rules apply. An explicitly requested candidate-model test uses an isolated MCP confirmation tool and consumes model quota; normal connection/model-list checks do not.
|
|
52
|
+
|
|
53
|
+
## Validation limits
|
|
54
|
+
|
|
55
|
+
Offline tests use a real child process and authenticated HTTP MCP, with simulated Claude events. They cover streaming, native resume, migration, approvals, read-only mode, durable intent, cancellation, malformed/truncated output, failed results, token accounting/budgets, connection selection, and the scheduler's model probe. They make no model requests.
|
|
56
|
+
|
|
57
|
+
A real subscription end-to-end run still requires an installed CLI, an eligible user's official login, and real Tabby desktop testing. Passing the offline tests does not establish actual subscription entitlement, model quality, or Windows/macOS execution results.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Kimi API、Kimi Coding Plan 与阿里云百炼 Coding Plan
|
|
2
|
+
|
|
3
|
+
[返回使用指南](guide.md#api-密钥与切换模型)
|
|
4
|
+
|
|
5
|
+
v0.4.1 提供三个独立的供应商选项,均通过 Chat Completions 接入,无需安装模型厂商的 CLI。支持文本流式回复、思考接收进度、工具调用、目标续行及历史恢复。模型本身支持图片不代表插件已支持图片输入;当前输入仍为文本与终端内容。
|
|
6
|
+
|
|
7
|
+
## 国内与国际端点
|
|
8
|
+
|
|
9
|
+
在 **Settings → AI Tools → 添加 API 连接** 中选择供应商,然后选择 **服务区域 → 中国内地/国际**。区域切换自动填写 Base URL,并清除旧模型列表;模型 ID 和密钥草稿保留,请重新核对。手动修改 Base URL 后会显示“自定义地址”,不会自动覆盖代理配置。服务区域代表购买平台的接口,不是自动测速、故障转移或套餐互转。
|
|
10
|
+
|
|
11
|
+
| 供应商选项 | 中国内地 Base URL | 国际 Base URL | 默认环境变量 | 预填模型 ID |
|
|
12
|
+
| --- | --- | --- | --- | --- |
|
|
13
|
+
| Kimi API(开放平台,按量付费) | `https://api.moonshot.cn/v1` | `https://api.moonshot.ai/v1` | `MOONSHOT_API_KEY` | `kimi-k3.1-pro` |
|
|
14
|
+
| Kimi Coding Plan(Kimi Code 会员) | `https://api.kimi.com/coding/v1` | `https://api.kimi.ai/coding/v1` | `KIMI_API_KEY` | `kimi-for-coding` |
|
|
15
|
+
| 阿里云百炼 Coding Plan | `https://coding.dashscope.aliyuncs.com/v1` | `https://coding-intl.dashscope.aliyuncs.com/v1` | `BAILIAN_CODING_PLAN_API_KEY` | `qwen3.7-plus` |
|
|
16
|
+
|
|
17
|
+
默认选择中国内地。请求路径由插件拼接为 `/chat/completions`,无需手动附加。选择端点时,请使用购买平台、套餐及区域对应的 Key;国内与国际的可用模型、权益和配额应分别以对应控制台为准。
|
|
18
|
+
|
|
19
|
+
Kimi 的开放平台 Key 和 Kimi Code 会员 Key 是两套配置,不能混用。Kimi Code Key 在 [Kimi Code 控制台](https://www.kimi.com/code/console) 创建。官方端点与区别见 [Kimi Code API 接入](https://www.kimi.com/code/docs/#api-接入)和[常见问题](https://www.kimi.com/help/kimi-code/faq)。
|
|
20
|
+
|
|
21
|
+
阿里 Coding Plan 使用套餐页面创建的专用 Key(`sk-sp-`),不能使用普通百炼按量 API Key。两类地址与额度不互通,套餐额度耗尽不会自动回退至按量计费。国内说明见[百炼 Coding Plan](https://help.aliyun.com/zh/model-studio/coding-plan),国际接入见[Model Studio 第三方编程工具](https://www.alibabacloud.com/help/en/model-studio/more-tools)。Coding Plan 与 Token Plan 是不同产品,本选项预设的是 Coding Plan 地址。
|
|
22
|
+
|
|
23
|
+
## 模型、思考与工具调用
|
|
24
|
+
|
|
25
|
+
预填模型可手动修改,不代表账号已获得该模型权限。聚焦模型输入框或点击“获取模型”读取当前端点的 `/models`;服务端不提供模型列表时,保留手动输入。不要把 Kimi Code 的 `kimi-for-coding` 别名填入普通 Kimi API,也不要假定百炼支持所有 Kimi 直连模型。
|
|
26
|
+
|
|
27
|
+
新选择这三个供应商时,输出上限预填 `32768`,为思考和正文保留空间;可以在高级设置按模型上限调整。现有连接不会因为升级自动改写。
|
|
28
|
+
|
|
29
|
+
- **Kimi API**:K3/K3.1 Pro 通过 `reasoning_effort` 调整 `low`/`high`/`max`;已知仅支持思考的 K3、K3.1 Pro 和 K2.7 Code 模型不发送不兼容的 `thinking` 字段。关闭这些模型的思考会在发请求前提示修改配置。K2.6 等可切换模型仍可显式启用或关闭 Thinking。
|
|
30
|
+
- **Kimi Coding Plan**:根据服务端元数据或已知模型提供推理等级;`kimi-for-coding`、K3 和 K3.1 Pro 支持 `low`/`high`/`max`,高速模型不一概复用这些选项。K3.1 Pro 不能关闭思考。模型别名实际指向的版本及会员档位可能变化,见[官方模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)。
|
|
31
|
+
- **百炼 Coding Plan**:使用自己的 `enable_thinking` 布尔参数;即使模型名为 `kimi-k2.5` 或 GLM,也遵循百炼协议。默认不强加思考参数;手动推理强度只应填写该端点和模型明确支持的值。见[百炼思考模式配置](https://help.aliyun.com/zh/model-studio/coding-plan-faq)。
|
|
32
|
+
|
|
33
|
+
三个连接都会处理分片 `tool_calls` 和流式 usage;历史中的 `reasoning_content` 在所属会话里保存并回传,跨供应商只交接通用文本,不泄露或重放内部推理。Kimi 请求带会话级 `prompt_cache_key`,同一会话工具续轮、后续消息和重启恢复保持一致,新会话独立。协议依据:[Kimi Chat Completions](https://platform.kimi.ai/docs/api/chat)、[思考与工具调用](https://platform.kimi.ai/docs/guide/use-thinking-models)。
|
|
34
|
+
|
|
35
|
+
## 使用范围与验证边界
|
|
36
|
+
|
|
37
|
+
Kimi Code 会员和百炼 Coding Plan 用于个人交互式编程。无人值守定时任务、批量脚本或应用后端应使用适合该场景的普通按量 API。插件提示此限制,模型知识也会提示选用合适的连接;当前并未增加套餐用途的运行时强制拦截。请求使用真实的 `tabby-ai-tools` 客户端标识,不冒用官方客户端,也不伪装成其他工具。参见 [Kimi Code 社区倡议](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html)和[百炼使用须知](https://help.aliyun.com/zh/model-studio/coding-plan)。
|
|
38
|
+
|
|
39
|
+
本次使用本地 HTTP/SSE 夹具验证了协议、鉴权、区域切换、模型发现、流式回复、连续工具调用、思考参数、历史恢复和缓存标识;未调用收费模型,未用真实套餐账号核验厂商准入与额度扣减。点击设置中的“测试连接”会发送真实简短请求并消耗少量用量;HTTP 401 请核对 Key 与端点,403 请核对套餐、模型权限及工具准入,429 请检查额度与限流。错误不会自动改走其他计费端点。
|
package/docs/development.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
[← 返回 README](../README.md) · [使用指南](guide.md)
|
|
4
4
|
|
|
5
|
+
后续设置页的信息组织、Provider 定义和每周接入排期见 [Provider 配置改版与路线图](provider-roadmap.md)。该文档是待实施计划,功能与发布状态按每周验收记录更新。
|
|
6
|
+
|
|
7
|
+
v0.4.1 已优先加入 `provider: custom`:可选 `apiFormat: chat-completions | responses`,缺省为 Chat Completions。`apiPath` / `usesResponsesApi` 统一推理路径与工具结果格式;模型发现仍用 `/models`。`keySource: none` 仅限自定义连接,密钥服务返回空值且请求省略认证头。自定义协议加入历史指纹,既有供应商指纹不变;切换协议通过已有通用上下文导入路径处理。设置中变更协议、端点或密钥会取消并清除旧连接测试和模型列表,旧异步结果不能覆盖新状态。自定义接口不推断厂商 Thinking 参数,不硬编码模型能力。
|
|
8
|
+
|
|
9
|
+
`test/api-agent.test.js` 覆盖自定义 Chat Completions 的现有 Agent 回归、Responses 连续工具往返与恢复、协议切换、无密钥模型发现与流式回复、配置失效及原供应商指纹兼容。全部使用本地 HTTP/SSE 夹具;真实第三方服务和桌面端需另行验证。协议参考:[OpenAI Chat Completions](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)、[Responses 迁移与原生历史](https://developers.openai.com/api/docs/guides/migrate-to-responses)。
|
|
10
|
+
|
|
5
11
|
## 本地开发
|
|
6
12
|
|
|
7
13
|
```bash
|
|
@@ -35,7 +41,7 @@ Tabby 在应用内安装、升级插件后,已由[内置插件管理器](https
|
|
|
35
41
|
|
|
36
42
|
运行 `npm test`、`npm run typecheck` 和 `npm run build`。自动测试覆盖显式路径和命令名兼容、PATH 优先级、PATH 无 codex、大小写环境变量、哈希目录缺文件、按文件时间选择、升级后重新扫描、无效显式路径不降级,以及 JSONL 握手、进程重用、流式通知和 stderr。`test/executable.test.js` 在 Linux 上模拟 Windows 定位规则;`test/windows-launch.test.js` 仅在真实 Windows 上执行含空格 exe/cmd/bat 和无 PATH 自动定位管道测试,其他平台明确跳过。exe 夹具使用真正的 Node PE 可执行文件配合测试用 preload;它验证启动方式,不代替真实 Codex 测试。
|
|
37
43
|
|
|
38
|
-
`test/posix-discovery.test.js` 覆盖 Linux/macOS 定位规则、NVM_DIR、自定义命令及显式路径约定、Shell 启动输出隔离、输出上限、超时及失败后的扫描、查找与启动的 PATH 一致、关闭及切换配置时取消发现;并实际启动 `#!/usr/bin/env node` JSONL 夹具验证桌面 PATH 同时缺少 Codex 和 Node 的情况。新增回归覆盖 Codex 已在 PATH 而 Node 缺失、显式路径不切换安装、Shell 配置传递及父环境优先,以及 macOS ChatGPT.app 内置可执行文件发现、PATH 优先级和无执行权限时的拒绝。`test/process-lifecycle.test.js` 覆盖强制回收、等待旧服务退出、子进程清理和回收失败时阻止重启;Windows 专用测试验证空 PATH 下 cmd 启动器与常驻 Node 子进程的回收。CI 在 Ubuntu、macOS、Windows 上执行测试、类型检查和构建;本机 Linux 的规则模拟不代表 macOS/Windows 实测。
|
|
44
|
+
`test/posix-discovery.test.js` 覆盖 Linux/macOS 定位规则、NVM_DIR、自定义命令及显式路径约定、Shell 启动输出隔离、输出上限、超时及失败后的扫描、查找与启动的 PATH 一致、关闭及切换配置时取消发现;并实际启动 `#!/usr/bin/env node` JSONL 夹具验证桌面 PATH 同时缺少 Codex 和 Node 的情况。新增回归覆盖 Codex 已在 PATH 而 Node 缺失、显式路径不切换安装、Shell 配置传递及父环境优先,以及 macOS ChatGPT.app 内置可执行文件发现、PATH 优先级和无执行权限时的拒绝。`test/installations.test.js` 逐项覆盖 standalone 内部入口、新旧 macOS 桌面包、动态 Homebrew/npm prefix、Windows npm 目录、IDE OS/架构和版本筛选,以及无效输出、超时和取消。`test/windows-launch.test.js` 增加真实 npm.cmd prefix 查询并启动 codex.cmd 的回归;全量测试中的进程初始化检查等待实际进程出现,不依赖固定微任务数量。`test/process-lifecycle.test.js` 覆盖强制回收、等待旧服务退出、子进程清理和回收失败时阻止重启;Windows 专用测试验证空 PATH 下 cmd 启动器与常驻 Node 子进程的回收。CI 在 Ubuntu、macOS、Windows 上执行测试、类型检查和构建;本机 Linux 的规则模拟不代表 macOS/Windows 实测。
|
|
39
45
|
|
|
40
46
|
Windows 解压验证包后,用已安装 Node.js 20+ 的 PowerShell 运行(需联网安装 npm 依赖):
|
|
41
47
|
|
|
@@ -54,7 +60,7 @@ powershell -ExecutionPolicy Bypass -File .\scripts\validate-windows.ps1 -Executa
|
|
|
54
60
|
|
|
55
61
|
`test/api-agent.test.js` 使用本地 HTTP/SSE 夹具测试真实请求格式、按连接显示的测试进度、鉴权错误、取消、非 SSE 响应,以及在服务端延迟结束请求时首个正文片段已经触发视图刷新。还覆盖 API/Codex 往返迁移、分页历史导出、首次原生消息前的重启恢复和目标延迟激活。真实供应商连通性与 Tabby 桌面 UI 需单独验证。
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
模型列表测试覆盖 OpenAI、DeepSeek、GLM、Kimi API、Kimi Coding Plan、百炼 Coding Plan 与 Claude的 GET 鉴权、分页去重、错误脱敏、不跟随重定向、无模型配置时获取列表、刷新与配置变更失效,以及关闭连接时取消请求。实现遵循 [DeepSeek 模型列表](https://api-docs.deepseek.com/api/list-models/)与 [Claude 模型列表及分页](https://platform.claude.com/docs/en/api/models/list)的接口;不提供模型列表的端点保留手动输入模型 ID。
|
|
58
64
|
|
|
59
65
|
可运行 `npm run smoke:context`(或 `npm run smoke:context -- /path/to/codex`)验证本机真实 Codex 的上下文导入、恢复、历史导出及目标保留。该脚本不发送 `turn/start`,并检查导入不会自动启动回合;测试线程在退出时归档,不调用模型或执行工具。
|
|
60
66
|
|
|
@@ -91,3 +97,17 @@ npm run skill:check # 检查内嵌知识与 skill 文件是否一致
|
|
|
91
97
|
流程身份和验收采用结构化 `TaskStep.server/dependsOn/verification/verificationCommands`。`read_tab` 仅提取连接字段白名单和会话路径;`workflow_checkpoint` 由面板路由到 `TaskMemory`,使用同终端新观察和串行发送门禁。通用规则在 bundled skill,具体流程和约束由发送时隐藏提示注入。旧库字段可选保持兼容;新录制须有完整身份及逐步验收。不将单纯读取或发送回执作为成功证明,语义验收仍由模型判断。
|
|
92
98
|
|
|
93
99
|
终端接管由 `send_input` 自动处理,不再生成 `local/terminalTakeover` 请求。检测未知(SSH、无枚举接口、枚举异常)时不因检测能力缺失暂停,不盲发 Ctrl+C;已检测的无关进程需要 `foregroundTaskNeeded=false`,发送 Ctrl+C 并验证停止。保留任务所需进程、会话/所有权检查、取消与只读限制。
|
|
100
|
+
|
|
101
|
+
## Claude Code 本机引擎(开发版)
|
|
102
|
+
|
|
103
|
+
方案和官方依据见 [Claude Code 接入](claude-code.md)。`claude-code-profile.ts` 提供独立的内置连接与配置;`claude-code-client.ts` 负责发现、能力/登录检查和有界进程回收;`claude-code-mcp.ts` 提供单次运行的认证 loopback MCP;`claude-code-agent.ts` 将官方 CLI 适配到已有会话与面板端口。`ApiAgent.createAdapter` 是可替换推理入口,MCP 与 API 的工具调用共用验证、审批、执行前持久化和重复循环检查。不得把本机连接交给 HTTP API 或密钥服务。
|
|
104
|
+
|
|
105
|
+
`test/claude-code.test.js` 与 `test/fixtures/claude-cli.cjs` 使用真实子进程和 HTTP,所有模型输出均为夹具。新增代码不依赖 Agent SDK,也不下载或修改 Claude Code。常规验证不运行真实模型;跨平台桌面和真实订阅仍需要单独验证。
|
|
106
|
+
|
|
107
|
+
## 默认持续执行与统一 reasoning 选择
|
|
108
|
+
|
|
109
|
+
API / Claude Code 的 active Goal 在普通文本响应结束后由 `ApiAgent` 自动续行,保持同一个 turn、原生工具和推理历史、预算累计以及停止句柄。测试覆盖超过历史 20 轮、普通响应后的继续、完成/阻塞/显式暂停、文字空转检测与预算/中断。历史默认 20 迁移为 0;主动设置的限制带 `toolRoundLimitConfigured` 标记。
|
|
110
|
+
|
|
111
|
+
`model-reasoning.ts` 为缺少服务端能力元数据的已知模型提供保守等级,模型浮窗对 API / Claude Code 统一提供第二步、默认值与手动输入。离线 HTTP / CLI 测试覆盖选中后保存、下一次推理请求中的供应商原生参数、默认值清除及保存失败回滚。不以真实模型调用作为常规验证。
|
|
112
|
+
|
|
113
|
+
Kimi/百炼 Coding Plan 的实现与验证边界见 [配置说明](coding-plans.md)。本地夹具还验证区域端点预设、保留自定义代理和密钥草稿、切换区域取消旧模型发现、两套 Kimi Key 配置、持久缓存标识、仅思考模型参数和百炼 `enable_thinking`。没有运行收费模型或证明真实套餐准入;区域的可用模型与额度须以各平台控制台为准。
|
package/docs/guide.md
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
- 本机安装 [Tabby](https://github.com/Eugeny/tabby),并能访问所选 AI 服务。操作内网服务器时,本机还需能通过 Tabby 连接目标服务器。
|
|
14
14
|
- **ChatGPT 订阅/Codex 登录模式**:本机安装 Codex CLI,在本地终端执行 `codex login`,使用具备 Codex 权限的 ChatGPT 账号登录,再执行 `codex login status` 确认认证状态,无需在插件中填写 API Key。插件默认连接选 **Codex(本机登录)**;可用模型、用量和工作区权限以账号实际权益为准。见 [OpenAI 官方认证说明](https://learn.chatgpt.com/docs/auth)。CLI 需支持 `thread/goal/*`;已测试版本见[验证记录](../VALIDATION.md)。
|
|
15
|
-
- **
|
|
15
|
+
- **Claude 订阅/Claude Code 本机模式(开发版)**:本机安装官方 Claude Code,运行 `claude auth login`,用 `claude auth status` 核对账号与认证方式。在侧栏或默认连接中选择 **Claude Code(本机登录)**;无需在插件里配置订阅凭据。API Key/云平台可能使用独立计费。完整方案、权限、恢复机制与验证限制见 [Claude Code 接入](claude-code.md)。
|
|
16
|
+
- **API 模式**:准备 OpenAI、DeepSeek、GLM、Kimi、百炼 Coding Plan 或 Claude 对应的 Key,无需安装 Codex CLI。订阅登录与 API 连接是两种独立配置方式。
|
|
16
17
|
|
|
17
18
|
### 安装插件
|
|
18
19
|
|
|
@@ -40,24 +41,27 @@ npm run install:tabby -- "<Tabby 插件目录路径>"
|
|
|
40
41
|
### 开始第一个任务
|
|
41
42
|
|
|
42
43
|
1. 选择本地终端或已连接的目标服务器终端。
|
|
43
|
-
2. 启动 Tabby 后 AI Tools 侧栏默认自动打开,无需先进入设置;收起后可点击工具栏机器人图标重新打开。默认使用本机 Codex
|
|
44
|
+
2. 启动 Tabby 后 AI Tools 侧栏默认自动打开,无需先进入设置;收起后可点击工具栏机器人图标重新打开。默认使用本机 Codex;Claude Code 可直接在连接列表选择;使用 API 时先按下文添加连接并设为默认,或在侧栏选择连接。
|
|
44
45
|
3. 输入“读取当前终端的报错,先分析原因,再提出修复方案”,按 **Ctrl+Enter / Cmd+Enter** 发送。普通 Enter 换行。
|
|
45
46
|
4. 在侧栏查看回复、工具结果、提问与审批,在终端核对实际输出。执行中可追加要求,也可点击 **停止**;点击 **释放** 可取回终端输入权。
|
|
46
47
|
|
|
48
|
+
侧栏顶部的连接(Provider)与模型(Model)并排显示;长名称可悬停查看。状态详情等面板只滚动内容区,标题栏与关闭按钮始终保留在顶部。
|
|
49
|
+
|
|
47
50
|
## 基础配置
|
|
48
51
|
|
|
49
|
-
打开 **Settings → AI Tools
|
|
52
|
+
打开 **Settings → AI Tools**。配置自动保存;修改连接参数后,在侧栏点击连接图标应用。默认连接和当前正在编辑的连接分别选择,编辑连接不会自动把它设为默认。
|
|
50
53
|
|
|
51
54
|
| 配置 | 设置方法与作用 |
|
|
52
55
|
| --- | --- |
|
|
53
|
-
| 默认连接 | 选择本机 Codex 或已添加的 API 连接;也可在侧栏顶部切换,保留当前对话。 |
|
|
56
|
+
| 默认连接 | 选择本机 Codex、Claude Code 或已添加的 API 连接;也可在侧栏顶部切换,保留当前对话。 |
|
|
54
57
|
| Codex CLI 可执行文件 | 默认 `codex`,也可留空自动发现;指定时只填路径或命令名,不附参数。找不到时见[启动排查](#cli-自动发现与启动排查)。 |
|
|
58
|
+
| Claude Code CLI/模型 | 在连接列表选择 Claude Code,填写 CLI 路径(默认 `claude`)和模型别名/ID(默认 `sonnet`)。订阅登录通过官方 CLI 完成;推理强度可选。 |
|
|
55
59
|
| 固定工作目录 | 留空时读取当前本地终端目录,读取不到则使用用户主目录;可指定本机目录。远程终端目录不会自动成为本机工作目录。 |
|
|
56
|
-
| 模型与推理强度 | Codex 模型留空时沿用 CLI 默认;侧栏点击模型摘要或使用 `/model` 选择,下一回合生效。API
|
|
60
|
+
| 模型与推理强度 | Codex 模型留空时沿用 CLI 默认;侧栏点击模型摘要或使用 `/model` 选择,下一回合生效。API 与 Claude Code 同样先选模型,再选推理强度;两项一起应用。 |
|
|
57
61
|
| 沙箱/文件访问 | 默认为工作目录可写,可选只读或完全访问。Codex 本地工具使用其沙箱;通过 Tabby 发送的命令使用目标终端账户的实际权限。只读模式禁止终端输入及修改操作。 |
|
|
58
62
|
| 审批策略 | 默认为按需询问,也可选不可信命令询问或不询问;侧栏修改在下一回合生效。定时任务使用无人值守策略,见[定时说明](scheduled-tasks.md#生命周期与权限)。 |
|
|
59
63
|
| 每个目标的 token 上限 | `0` 表示不设置上限;达到预算不代表完成。API 用量依赖服务商上报,预算为软上限。 |
|
|
60
|
-
| 启动时打开侧栏 |
|
|
64
|
+
| 启动时打开侧栏 | 默认开启,已有明确关闭设置会保留;取消后下次启动不自动打开。 |
|
|
61
65
|
| 界面语言 | 默认跟随 Tabby,也可独立选择。 |
|
|
62
66
|
| 任务流程与偏好 | 管理显式录制、流程别名和全局/目录偏好。 |
|
|
63
67
|
| 定时任务 | 查看所有目录的计划,暂停、恢复、停止或删除。 |
|
|
@@ -115,26 +119,47 @@ AI 会发现并核对各连接与终端,将每一步的实际输出作为下
|
|
|
115
119
|
| OpenAI API | Responses | `OPENAI_API_KEY` |
|
|
116
120
|
| DeepSeek | Chat Completions | `DEEPSEEK_API_KEY` |
|
|
117
121
|
| GLM | Chat Completions | `ZAI_API_KEY` |
|
|
122
|
+
| Kimi API | Chat Completions | `MOONSHOT_API_KEY` |
|
|
123
|
+
| Kimi Coding Plan | Chat Completions | `KIMI_API_KEY` |
|
|
124
|
+
| 阿里云百炼 Coding Plan | Chat Completions | `BAILIAN_CODING_PLAN_API_KEY` |
|
|
118
125
|
| Claude | Messages | `ANTHROPIC_API_KEY` |
|
|
126
|
+
| 自定义(OpenAI 兼容) | Chat Completions(默认)或 Responses | `CUSTOM_API_KEY` |
|
|
127
|
+
|
|
128
|
+
Kimi API、Kimi Coding Plan 和阿里云百炼 Coding Plan 提供 **中国内地/国际** 区域选择,切换会自动填入对应端点;密钥须与购买平台和套餐匹配。手动地址不会被自动覆盖。完整端点表、默认模型、思考参数与使用范围见 [Coding Plan 配置](coding-plans.md)。套餐用于个人交互式编程;无人值守定时任务应使用普通按量 API。
|
|
119
129
|
|
|
120
130
|
修改环境变量后需要完全退出并重启 Tabby。API 模式当前不自动压缩上下文,长任务可用 `/new` 新建会话;用量显示请求和本地累计 tokens,不显示 Codex 订阅额度。协议和存储设计见[多模型 Agent 说明](multi-provider-agent.md)。
|
|
121
131
|
|
|
122
|
-
在 **Settings → AI Tools → 添加 API 连接** 配置供应商、Base URL 和模型 ID。密钥来源默认选择“直接输入”,填写 API Key 即可,该方式将密钥保存在本地 Tabby
|
|
132
|
+
在 **Settings → AI Tools → 添加 API 连接** 配置供应商、Base URL 和模型 ID。密钥来源默认选择“直接输入”,填写 API Key 即可,该方式将密钥保存在本地 Tabby 插件配置中。也可选择环境变量;自定义接口还支持“无需密钥”。插件不访问 Vault,旧 Vault 连接需重新选择密钥来源。
|
|
123
133
|
|
|
124
134
|
设置页通过连接列表切换编辑对象,一次只显示一个连接的配置。列表显示供应商、模型和默认标记,各供应商使用不同色标;编辑区标题始终保留当前连接身份,表单独立滚动。窄窗口下列表改为横向滚动。新增连接自动进入编辑,删除当前连接后切换到相邻连接;Codex 本机引擎也从列表单独选择。切换编辑对象不会改变默认连接,默认连接通过顶部选择器或编辑区的“设为默认”修改。思考模式、推理强度、上下文窗口和工具轮数上限在 **高级参数** 中展开配置。
|
|
125
135
|
|
|
126
136
|
点击当前连接编辑区下方的 **测试连接** 会发送一条简短请求,实际验证密钥、模型和流式响应,并产生少量 API 用量。进度与结果显示在按钮下方,测试中可以取消,60 秒超时;HTTP 错误、错误模型或不支持 SSE 的代理会显示相应提示。
|
|
127
137
|
|
|
128
|
-
配置端点和密钥后,聚焦模型 ID 输入框会自动获取列表;也可点击 **获取模型** 刷新,从建议中选择或手动填写 ID。侧栏点击模型摘要或输入 `/model` 同样会自动读取当前连接的模型列表。列表不支持或获取失败时,可在选择器中手动输入模型 ID
|
|
138
|
+
配置端点和密钥后,聚焦模型 ID 输入框会自动获取列表;也可点击 **获取模型** 刷新,从建议中选择或手动填写 ID。侧栏点击模型摘要或输入 `/model` 同样会自动读取当前连接的模型列表。列表不支持或获取失败时,可在选择器中手动输入模型 ID;仍会进入推理强度选择,模型与等级一起应用。所有连接统一先选模型,再选 reasoning,支持服务商默认值;API 和 Claude Code 也可手动填写模型接受的原始等级。优先显示服务端上报的能力;没有元数据时,对已知模型提供保守的官方等级选项,未知模型提供默认值和手动输入。顶部模型摘要同时显示当前 reasoning;支持的 Thinking 开关单独保留,窄侧栏会自动换行。
|
|
129
139
|
|
|
130
|
-
DeepSeek
|
|
140
|
+
DeepSeek 的 Thinking 开关在顶部保留,Low / High / Max 等级统一在模型浮窗中选择。关闭 Thinking 后不发送可能将其重新打开的推理强度参数;在浮窗主动选择非空等级会重新启用 Thinking,使等级生效。点击模型摘要或 `/model` 选择模型与推理强度,侧栏中的修改会自动应用。设置页修改供应商、端点或模型后仍需点击连接图标应用配置。思考阶段显示接收进度,正文增量到达后立即刷新;实际片段到达速度取决于服务商和代理。
|
|
131
141
|
|
|
132
|
-
API 连接的“每回合工具轮数上限”设为 **0** 时不按固定次数中止任务,新连接默认使用 0
|
|
142
|
+
API 连接的“每回合工具轮数上限”设为 **0** 时不按固定次数中止任务,新连接默认使用 0;历史默认值 20 自动迁移为不限,无需逐个修改。其他已有自定义数值保留;今后主动设置的 20 也会保留。设为 1–100 时,仅工具调用轮次计数,最后额外保留收尾请求读取结果、更新一次目标状态并给出回复,收尾阶段不再操作终端;目标未完成仍显示未完成。停止和目标 token 预算在两种模式下都生效。读取受控终端默认等待 1 秒,也支持等待最多 30 秒后读取,减少等待命令输出时的空轮询。
|
|
143
|
+
|
|
144
|
+
API 与 Claude Code 的 Goal 仍为 active 时,普通文本回复或阶段总结不会结束执行;运行器在同一回合内自动继续,不询问是否 Continue goal。模型核对原始要求并验证结果后须调用 `agent_goal_update(status=complete, evidence=...)`。确实缺少用户信息、凭据、额外授权或外部依赖时可标记 blocked 并说明原因;仅用户明确要求暂停时使用 paused。停止、预算、主动设置的工具轮数上限和重复无进展检测仍有效;自动续行不绕过操作审批,不重试失败的模型请求,也不会重放历史命令。定时任务仍遵守其独立的整次运行限制。
|
|
133
145
|
|
|
134
146
|
API 工具循环检测始终启用,无需等到轮数上限。近期同一段操作和结果连续出现三次(包括 A→B→C→A→B→C→A→B→C)时,会拦住后续工具,让模型总结卡点,并将目标标记为受阻;同一批剩余操作也不会执行。比较终端新追加的输出,忽略参数顺序、等待时长及操作说明的变化;运行中或状态未知的进程仅因画面不变不会触发,单纯“输入已发送”的回执也不能证明没有进展。检测记录随会话保存,直接继续或重启后重放同一循环的下一条命令会在发送前拦截;新目标清空记录。检测依据实际工具调用和结果,不能保证识别命令写法不同但含义相同的方案。
|
|
135
147
|
|
|
136
148
|
任务结束后,在侧栏切换 API 连接,或在 DeepSeek 等 API 和 Codex 本机登录之间切换,都会带上当前对话、转发的终端输出、工具结果和任务目标。历史会转换成目标接口可用的文本,内部推理内容不会跨模型传递,历史工具不会重新执行。切回之前的连接时继续当前对话;旧快照仍可用 `/resume` 恢复,输入 `/new` 则开始空白对话。转入 Codex 时持久化导入的历史以供显示和重启恢复,并为模型设置历史文本;导入的进行中目标等到下一次主动发送消息后才激活,切换本身不触发推理。
|
|
137
149
|
|
|
150
|
+
### 自定义 OpenAI 兼容接口
|
|
151
|
+
|
|
152
|
+
1. 添加 API 连接,供应商选择 **自定义(OpenAI 兼容)**,为不同网关或本地服务分别命名。
|
|
153
|
+
2. 默认选 **Chat Completions**(请求 `/chat/completions`);服务明确支持 Responses 时再切换为 **Responses**(请求 `/responses`)。不会自动尝试另一协议,避免重复请求和计费。
|
|
154
|
+
3. 填写服务提供的基础地址,例如 `https://gateway.example/v1` 或 `http://localhost:1234/v1`。保留必需的 `/v1` 或其他前缀,不附加具体请求路径。自定义连接没有默认云端地址;空地址会报错。远程地址要求 HTTPS,HTTP 仅允许 `localhost`、`127.0.0.1`、`[::1]`,不支持普通内网 IP 的 HTTP。
|
|
155
|
+
4. 选择直接输入 API Key 或环境变量(默认名称 `CUSTOM_API_KEY`),使用标准 Bearer 认证;不需要认证的本地服务可选 **无需密钥**。此模式不读取原来保存的 Key,也不发送 Authorization 请求头。切回内置供应商时恢复密钥认证。
|
|
156
|
+
5. 获取模型列表,或手动填写服务要求的完整模型 ID(可包含命名空间)。聚焦输入框只获取列表,不调用推理;`/models` 不可用不影响手动配置。点击 **测试连接** 才会发送简短推理并产生相应用量,该测试不证明工具能力可用。
|
|
157
|
+
6. 在侧栏选择连接或设为默认;设置修改后点击连接图标应用。可以保存多个独立自定义连接。切换协议、端点或模型时保留通用对话上下文和目标,不会重放历史工具调用;相同协议可恢复原生历史。
|
|
158
|
+
|
|
159
|
+
终端 Agent 需要服务和模型都支持 SSE 流式响应及 function tools。自定义连接复用现有文本、工具、审批、停止、目标和历史功能,不发送厂商专用 `thinking`、`enable_thinking` 或缓存参数。推理强度默认留空;填写后按协议发送 `reasoning_effort`(Chat Completions)或 `reasoning.effort`(Responses),具体值由服务决定。Chat Completions 使用 `max_tokens`,Responses 使用 `max_output_tokens`、`store: false` 和加密推理历史选项;仅兼容部分协议的网关可能拒绝这些字段。服务上报的 usage 才能计入真实 token 用量,自定义 Chat Completions 不强制发送 `stream_options`;未上报时保持未知。暂不支持自定义请求头、查询参数认证、厂商专用字段或非流式接口。
|
|
160
|
+
|
|
161
|
+
离线 HTTP/SSE 夹具已覆盖两种协议及工具往返;未知第三方网关和真实 Tabby 桌面显示需按实际服务验证,不能因“OpenAI 兼容”而视为所有厂商能力均可用。
|
|
162
|
+
|
|
138
163
|
## 重复任务与操作习惯
|
|
139
164
|
|
|
140
165
|
用 `/remember 任务描述` 明确开始录制,插件执行任务并记录已核对的终端步骤;完成后提示是否设置别名,例如 `task1`。之后直接发送 `/task1` 执行流程。普通任务不再自动归档,也不再按相似描述自动匹配;输入框中的“不检索记忆”复选框已移除。点击 **任务流程** 或输入 `/workflows` 查看当前目录的流程,设置中可以给已有流程添加别名。
|
|
@@ -181,7 +206,7 @@ AI Tools 默认在启动 Tabby 时自动展开侧栏,使用默认连接,无
|
|
|
181
206
|
|
|
182
207
|
- 输入框中按 ↑ 回看当前会话已发送的消息,按 ↓ 返回较新的消息,翻到最新之后会恢复未发送的草稿。多行输入仅在首行按 ↑、末行按 ↓ 时翻历史;恢复旧会话后也可回看其中的输入。
|
|
183
208
|
|
|
184
|
-
- 在输入框键入 `/` 可查看面板支持的命令,用上下方向键选择、Enter 执行、Esc 收起列表。普通消息的 Enter 用于换行,`Ctrl+Enter` 或 `Cmd+Enter` 发送。`/model`
|
|
209
|
+
- 在输入框键入 `/` 可查看面板支持的命令,用上下方向键选择、Enter 执行、Esc 收起列表。普通消息的 Enter 用于换行,`Ctrl+Enter` 或 `Cmd+Enter` 发送。`/model` 打开当前连接的模型列表,选模型后再选推理强度(Thinking level);Codex 以模型上报的能力为准,API 与 Claude Code 还支持服务商默认与手动输入;两项一起保存并在下一回合生效。“当前 Codex 默认”会保存列表上报的具体模型 ID,已有会话也会切换到该模型。也可输入 `/model 模型ID` 进入该模型的推理强度选择。
|
|
185
210
|
|
|
186
211
|
## 全部功能入口
|
|
187
212
|
|
|
@@ -251,13 +276,29 @@ Goal 通过证据检查和持续执行降低过早结束的概率,但无法数
|
|
|
251
276
|
|
|
252
277
|
## CLI 自动发现与启动排查
|
|
253
278
|
|
|
254
|
-
`codexAgent.executable` 留空或保持默认 `codex` 时,先从 **Tabby 自身进程的 PATH** 查找并验证文件,随后检查 `CODEX_INSTALL_DIR`。Windows 再检查官方独立安装入口 `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe
|
|
279
|
+
`codexAgent.executable` 留空或保持默认 `codex` 时,先从 **Tabby 自身进程的 PATH** 查找并验证文件,随后检查 `CODEX_INSTALL_DIR`。Windows 再检查官方独立安装入口 `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe`,再检查 `CODEX_HOME` 下的 standalone 内部入口,随后扫描桌面安装 `%LOCALAPPDATA%\OpenAI\Codex\bin\<目录>\codex.exe`。桌面安装目录名可以是哈希,按有效 **codex.exe 的修改时间降序** 选择,时间相同按完整路径排序;不从目录名推断版本。每次启动后台进程都会重新查找,以适配升级和旧目录清理;已有连接复用当前进程。
|
|
255
280
|
|
|
256
|
-
Linux/macOS 在默认命令模式下会异步启动 `$SHELL -ilc` 补全环境,即使桌面 PATH 已经包含 Codex,也会读取用户 Shell 中的 Codex 配置。未设置 SHELL 时,Linux 使用 `/bin/bash`,macOS 使用 `/bin/zsh`;支持 bash/zsh/sh/dash/ksh/fish。探测限时 3 秒,通过独立管道读取最多 64 KiB,忽略 Shell 启动输出。仅导入 PATH、CODEX_HOME / CODEX_SQLITE_HOME / CODEX_INSTALL_DIR、NVM_DIR、代理、证书及 OPENAI_API_KEY / CODEX_API_KEY / CODEX_ACCESS_TOKEN;其中非 PATH 变量以父进程已有值(包括空值)为准,不导入 Shell 的 NODE_OPTIONS 等运行时钩子,也不把环境变量内容写入诊断。
|
|
281
|
+
Linux/macOS 在默认命令模式下会异步启动 `$SHELL -ilc` 补全环境,即使桌面 PATH 已经包含 Codex,也会读取用户 Shell 中的 Codex 配置。未设置 SHELL 时,Linux 使用 `/bin/bash`,macOS 使用 `/bin/zsh`;支持 bash/zsh/sh/dash/ksh/fish。探测限时 3 秒,通过独立管道读取最多 64 KiB,忽略 Shell 启动输出。仅导入 PATH、CODEX_HOME / CODEX_SQLITE_HOME / CODEX_INSTALL_DIR、NVM_DIR、HOMEBREW_PREFIX、NPM_CONFIG_PREFIX / npm_config_prefix、代理、证书及 OPENAI_API_KEY / CODEX_API_KEY / CODEX_ACCESS_TOKEN;其中非 PATH 变量以父进程已有值(包括空值)为准,不导入 Shell 的 NODE_OPTIONS 等运行时钩子,也不把环境变量内容写入诊断。
|
|
257
282
|
|
|
258
|
-
默认 Codex
|
|
283
|
+
默认 Codex 仍未找到时,按下表补充安装来源。POSIX 先恢复用户 Shell 环境,再检查 standalone、配置的 prefix、NVM 和常见系统目录;Windows 保留上文的独立安装/桌面安装优先级,再查 npm 等目录。尚未找到时才查询包管理器 prefix,随后检查 macOS 桌面包,最后才扫描 IDE 扩展。已通过 PATH 或设置选定的 Codex 不会被另一安装替换。
|
|
259
284
|
|
|
260
|
-
|
|
285
|
+
| 来源 | macOS / Linux | Windows |
|
|
286
|
+
| --- | --- | --- |
|
|
287
|
+
| PATH | `codex` | `codex.exe`、`codex.cmd` 等 PATHEXT 支持的启动器 |
|
|
288
|
+
| 官方 standalone | `~/.local/bin/codex` | `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe` |
|
|
289
|
+
| 自定义 standalone | `$CODEX_INSTALL_DIR/codex` | `%CODEX_INSTALL_DIR%\codex.exe` |
|
|
290
|
+
| standalone 内部入口 | `${CODEX_HOME:-~/.codex}/packages/standalone/current/bin/codex`,兼容 `current/codex` | `%CODEX_HOME%\packages\standalone\current\bin\codex.exe`,兼容 `current\codex.exe`;未配置时使用 `%USERPROFILE%\.codex` |
|
|
291
|
+
| Homebrew | `$(brew --prefix)/bin/codex`,也检查 `HOMEBREW_PREFIX/bin` 和常见 Homebrew/Linuxbrew 目录 | — |
|
|
292
|
+
| npm | `$(npm prefix -g)/bin/codex`,也检查配置的 npm prefix、`~/.npm-global/bin` | `$(npm prefix -g)\codex.cmd`,也检查配置的 npm prefix 和 `%APPDATA%\npm` |
|
|
293
|
+
| NVM | `$NVM_DIR` 和 `~/.nvm` 的 `current/bin`、`versions/node/v*/bin` | — |
|
|
294
|
+
| macOS 新桌面包 | `/Applications/ChatGPT.app/Contents/Resources/codex-cli/bin/codex`,同样支持 `~/Applications` 和 `Codex.app` | — |
|
|
295
|
+
| macOS 兼容入口 | `/Applications/ChatGPT.app/Contents/Resources/codex`、`/Applications/Codex.app/Contents/Resources/codex`,同样支持 `~/Applications` | — |
|
|
296
|
+
| Windows 桌面兼容目录 | — | `%LOCALAPPDATA%\OpenAI\Codex\bin\<目录>\codex.exe` |
|
|
297
|
+
| IDE 扩展最后兜底 | `~/.vscode/extensions/openai.chatgpt-*/bin/<platform>/codex` | `%USERPROFILE%\.vscode\extensions\openai.chatgpt-*\bin\<platform>\codex.exe` |
|
|
298
|
+
|
|
299
|
+
包管理器只执行已安装命令的 `brew --prefix` / `npm prefix -g`,不安装或更新软件。两项查询并发,各限时 2 秒,stdout 最多 16 KiB,只接受单行绝对路径;失败、无效输出或超时后继续查找,关闭/切换配置会取消并回收查询进程树。npm 查询也可使用从 NVM 恢复的 Node。诊断不包含包管理器输出或环境变量值。standalone 路径与布局依据官方 [POSIX 安装脚本](https://github.com/openai/codex/blob/main/scripts/install/install.sh) 和 [Windows 安装脚本](https://github.com/openai/codex/blob/main/scripts/install/install.ps1);npm prefix 与 bin 位置见 [npm prefix](https://docs.npmjs.com/cli/v12/commands/npm-prefix/) 和 [npm folders](https://docs.npmjs.com/cli/v12/configuring-npm/folders/)。
|
|
300
|
+
|
|
301
|
+
NVM 优先 current,其余按 Node 版本降序。IDE 同时支持 `.vscode-insiders`、`.vscode-server` 和 `.vscode-server-insiders` 的 extensions 目录,只检查 `openai.chatgpt-*`,按扩展版本降序选择当前 OS/x64 或 arm64 架构的有效文件,跳过缺失或不兼容的候选;不运行扩展自带的任意安装脚本。IDE 和桌面包内部路径属于兼容兜底,布局变化或自定义位置仍可填写实际完整路径。POSIX 候选必须有执行权限,目录和断开的软链接不会被选中。
|
|
261
302
|
|
|
262
303
|
查找结果与启动环境一起传递:Linux/macOS 把启动器所在目录放到子进程 PATH 首位。对于 `#!/usr/bin/env node`(含 `env -S node`)启动器,若 Node 不在同目录或 PATH,则从用户 Shell 及 NVM 等补充目录恢复 Node;这也适用于有效的显式路径和自定义命令名。找不到 Node 时报告运行环境错误,保留选定的 Codex。父进程环境不变,关闭或切换配置会取消尚未结束的探测。
|
|
263
304
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# 多模型 Agent 设计与评审
|
|
2
2
|
|
|
3
|
+
v0.4.1 新增自定义 OpenAI 兼容连接(`provider: custom`):`apiFormat` 显式选择 Chat Completions(缺省)或 Responses,不按模型名或 URL 推断协议。复用统一 Agent 工具循环、模型发现和上下文转换,不发送厂商专用 Thinking/缓存字段。可选直接 Key、环境变量或无认证;无认证模式不发 Authorization。历史指纹为自定义连接增加协议字段,保留既有供应商指纹。切换协议时导入通用文本和目标,避免将原生工具历史发到另一协议。配置与限制见[使用指南](guide.md#自定义-openai-兼容接口)。
|
|
4
|
+
|
|
3
5
|
状态:设计评审完成,第一版已按下述范围实现。2026-10-17。
|
|
4
6
|
|
|
5
7
|
## 产品目标
|
|
6
8
|
|
|
7
|
-
同一 Tabby 侧栏支持现有 Codex 登录,以及 DeepSeek、GLM、OpenAI、Claude 的商业 API。API 模式无需安装 Codex。保留流式回复、终端读取与操作、人工审批、按目录恢复历史、任务目标和停止操作。
|
|
9
|
+
同一 Tabby 侧栏支持现有 Codex 登录,以及 DeepSeek、GLM、Kimi、OpenAI、Claude 的商业 API,以及 Kimi/百炼 Coding Plan。API 模式无需安装 Codex。保留流式回复、终端读取与操作、人工审批、按目录恢复历史、任务目标和停止操作。
|
|
8
10
|
|
|
9
11
|
提供多个连接配置,每个配置有独立名称、供应商、Base URL、模型 ID、密钥来源和模型参数。面板选择连接后再开始会话。切换连接需要当前任务结束;API 连接之间及 API/Codex 双向切换时携带当前对话的通用文本上下文和目标,修改端点或模型也保留上下文。历史按目标配置另存快照,禁止把一个供应商的推理块直接交给另一个供应商。
|
|
10
12
|
|
|
@@ -17,7 +19,7 @@ flowchart TD
|
|
|
17
19
|
Factory --> Native[API Agent Runtime]
|
|
18
20
|
Native --> Providers[模型协议适配器]
|
|
19
21
|
Providers --> OpenAI[OpenAI Responses]
|
|
20
|
-
Providers --> Chat[DeepSeek / GLM Chat Completions]
|
|
22
|
+
Providers --> Chat[DeepSeek / GLM / Kimi / Bailian Chat Completions]
|
|
21
23
|
Providers --> Claude[Claude Messages]
|
|
22
24
|
Native --> Store[本地会话与 Goal 存储]
|
|
23
25
|
Codex --> Transfer[通用上下文导入与导出]
|
|
@@ -39,9 +41,11 @@ flowchart TD
|
|
|
39
41
|
| OpenAI API | Responses | 带类型的 SSE、function_call/output、reasoning items |
|
|
40
42
|
| DeepSeek API | Chat Completions | reasoning_content 回传、分片 tool_calls、Thinking 参数 |
|
|
41
43
|
| GLM API | Chat Completions | reasoning_content 回传、Thinking 参数与不同端点 |
|
|
44
|
+
| Kimi API / Coding Plan | Chat Completions | 独立国内/国际端点和 Key、思考模型差异、reasoning_content、会话级缓存标识 |
|
|
45
|
+
| 百炼 Coding Plan | Chat Completions | 国内/国际套餐端点、专用 Key、enable_thinking;不走 Responses |
|
|
42
46
|
| Claude API | Messages | content blocks、tool_use/tool_result、stop_reason、thinking signature |
|
|
43
47
|
|
|
44
|
-
不把所有供应商简化成替换 Base URL
|
|
48
|
+
不把所有供应商简化成替换 Base URL。Kimi 与百炼预填官方模型示例,模型 ID 仍由用户配置,不限制手动输入。参数按供应商和模型显式选择,未知能力使用保守值。原始 reasoning blocks 保存在所属会话中,工具续轮时原样回传;默认 UI 不显示内部推理。
|
|
45
49
|
|
|
46
50
|
API 请求由本机 Node 网络层执行,避开浏览器 CORS 和把密钥混入页面状态的问题。支持 HTTPS、自定义端点与明确允许的本地 HTTP 测试端点;跨域重定向不携带密钥。实现必须兼容 Tabby 实际宿主 Node/Electron,不能只依赖构建机的 Node 20。
|
|
47
51
|
|
|
@@ -86,7 +90,7 @@ API 模式的“只读”禁止发送输入及操作控件;有副作用的终
|
|
|
86
90
|
|
|
87
91
|
顶部显示供应商与模型。模型选择使用当前配置中的模型 ID;设置页允许手动填写和多个配置。
|
|
88
92
|
|
|
89
|
-
DeepSeek
|
|
93
|
+
所有连接的模型浮窗统一先选模型,再选 reasoning。API /models 上报等级优先;缺失时使用 `model-reasoning.ts` 中已知模型的保守等级,未知模型保留默认及手动输入。手动模型 ID 同样进入第二步。模型和等级一起保存、沿已有上下文交接路径应用;选择非空等级会重新开启已关闭的 Thinking。DeepSeek 顶部保留 Thinking 开关,开关修改直接更新下一回合的配置快照,无需重连。协议层持续转发正文增量及不包含原始思考文本的思考接收进度;侧栏显式刷新 Node 回调产生的变化。设置页“测试连接”使用同一配置规范化与流式协议层发送简短无工具请求,在对应卡片显示进度、结果、取消和超时。
|
|
90
94
|
|
|
91
95
|
Codex 状态保留账户额度。API 模式显示模型用量和本地累计,不伪造“5 小时额度”“普通用量”等订阅信息。未提供上下文窗口时显示未知;上次请求输入占用与已上报累计 tokens 分开,tokens 统计不等同于货币计费。预算按已上报用量在请求边界检查,是软上限;在途请求可能超出,未上报用量无法计入。第一版不自动压缩历史,长对话需新建会话。
|
|
92
96
|
|
|
@@ -136,3 +140,20 @@ Goal 由本地 Runtime 持久化。一次模型请求结束只表示回合结束
|
|
|
136
140
|
- [GLM 思考模式](https://docs.bigmodel.cn/cn/guide/capabilities/thinking-mode):交错思考及保留式思考的历史回传要求。
|
|
137
141
|
- [Claude Tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/how-tool-use-works):客户端工具执行循环与 stop_reason。
|
|
138
142
|
- [Claude Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking):Thinking 块与签名的保留要求。
|
|
143
|
+
|
|
144
|
+
## Claude Code 本机引擎
|
|
145
|
+
|
|
146
|
+
开发版新增内置连接 `claude-code`,使用独立的 `claudeExecutable`、`claudeModel`、`claudeReasoningEffort`、`claudeThreads` 配置。它复用会话存储和面板事件端口,但模型循环由官方 CLI 执行,Tabby 工具经临时认证 MCP 回到原有执行器。`runtime: claude-code` 的 profile 是本机元数据,不是可发往 Anthropic HTTP API 的连接。Claude API Key 接入继续保持独立。完整研究、边界、恢复与限制见 [Claude Code 接入方案](claude-code.md)。
|
|
147
|
+
|
|
148
|
+
## Goal continuation and effort capability sources
|
|
149
|
+
|
|
150
|
+
API and Claude Code share the same active-goal continuation loop in `api-agent.ts`. A text response is persisted and followed by a continuation prompt while the goal remains active; provider-native tool/reasoning history stays intact. Completion, a real blocker, an explicit pause, cancellation, budget exhaustion, an explicitly configured tool cap or repeated no-progress evidence ends continuation. No fixed conversational-turn cap is added. The legacy default of 20 tool rounds migrates to zero; `toolRoundLimitConfigured` preserves newly explicit 20-round limits.
|
|
151
|
+
|
|
152
|
+
Reasoning metadata from `/models` takes priority. Fallback menus use conservative documented subsets; unknown/custom models retain provider defaults and manual values. Source references (checked 2026-10-24):
|
|
153
|
+
|
|
154
|
+
- [OpenAI reasoning](https://developers.openai.com/api/docs/guides/reasoning) and [GPT-5](https://developers.openai.com/api/docs/models/gpt-5).
|
|
155
|
+
- [DeepSeek model metadata](https://api-docs.deepseek.com/api/list-models/).
|
|
156
|
+
- [GLM thinking and effort](https://docs.bigmodel.cn/cn/guide/capabilities/thinking).
|
|
157
|
+
- [Claude effort](https://platform.claude.com/docs/en/build-with-claude/effort) and [Claude Code model settings](https://code.claude.com/docs/en/model-config). Alias resolution and CLI support remain account and installation dependent.
|
|
158
|
+
|
|
159
|
+
Kimi 与百炼 Coding Plan 的端点、区域、模型和套餐边界见 [Coding Plan 配置](coding-plans.md)。三种新连接沿用通用 Agent 工具循环;Kimi 以持久会话 ID 作为 `prompt_cache_key`,确保工具续轮、后续回合及重启恢复稳定。客户端标识为真实产品名,不冒用已获准的其他工具。
|