@timmyjl12/pi-agy-bridge 0.1.0 → 0.1.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 +3 -1
- package/UPGRADING.md +14 -10
- package/compat/baselines/agy-1.5.8.json +231 -0
- package/compat/matrix.json +1 -1
- package/compat/probe.ts +1 -1
- package/package.json +4 -3
- package/src/acp/connection.ts +2 -2
- package/src/model-catalog.ts +15 -5
- package/compat/sdk-canary/__pycache__/diff_fingerprint.cpython-313.pyc +0 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Use Google Antigravity models (Gemini, Claude, GPT-OSS) in [pi](https://github.c
|
|
|
4
4
|
|
|
5
5
|
It follows the design of `pi-claude-code`: **pi keeps the conversation, the approvals and the tool execution; agy is only the model.** Every pi request becomes one ACP prompt turn. When the model wants a pi tool it writes a small tool-call block, pi runs the tool, and the next request carries the result. Nothing is parked between requests, so a slow tool (a long `pytest` run, a user dialog) can take as long as it needs and there is no turn time limit.
|
|
6
6
|
|
|
7
|
-
> Status: 0.1.
|
|
7
|
+
> Status: 0.1.1. The compatibility probe and live bridge checks passed on `agy 1.5.8`. Live turns succeeded on `gemini-3.8-flash`, `gemini-4-hydrogen` (including `xhigh`), and `gemini-pro-orchestrator-g1-pro`. A real pi surface check with the configured extensions also passed. Claude and GPT-OSS have not been exercised in a live model turn.
|
|
8
8
|
|
|
9
9
|
## Requirements
|
|
10
10
|
|
|
@@ -29,6 +29,8 @@ Models appear as `agy/<id>` in `/model`:
|
|
|
29
29
|
| Model | Thinking levels |
|
|
30
30
|
| --- | --- |
|
|
31
31
|
| `agy/gemini-4-argon`, `agy/gemini-3.8-flash`, `agy/claude-opus-5-5`, `agy/claude-sonnet-5-5` | low, medium, high |
|
|
32
|
+
| `agy/gemini-4-hydrogen` | low, medium, high, xhigh (reported by agy 1.5.8) |
|
|
33
|
+
| `agy/gemini-pro-orchestrator-g1-pro` | no selectable reasoning level |
|
|
32
34
|
| `agy/gpt-oss-120b-medium` | fixed (medium) |
|
|
33
35
|
|
|
34
36
|
The list is what your agy reports, so new models appear without an update. pi's "off" thinking level is not offered because agy cannot switch thinking off.
|
package/UPGRADING.md
CHANGED
|
@@ -11,7 +11,7 @@ call or quota: the probes are free.
|
|
|
11
11
|
| `/agy-bridge doctor`, or the one-time notice shown at the first request, says `untested` / `newer-untested` | a newer agy is installed than the matrix tested | §1, then §3 |
|
|
12
12
|
| doctor says `below-minimum`, `known-bad`, `protocol` or `not-agy` | the provider refused to start (it names the fix) | §1 → §4 |
|
|
13
13
|
| `npm run compat:probe` exits 1 or 2 | agy's flags/capabilities/models moved | §3 |
|
|
14
|
-
| `
|
|
14
|
+
| `uv run --project compat/sdk-canary python compat/sdk-canary/canary.py --latest` exits 1 or 2 | the SDK harness contract moved | §5 |
|
|
15
15
|
| a contract test or replay fixture fails after an agy update | an ACP exchange changed shape | §4 |
|
|
16
16
|
| Windows/uv problems, missing `agy` | environment, not drift | §6 |
|
|
17
17
|
|
|
@@ -38,7 +38,7 @@ it spawned.
|
|
|
38
38
|
| Probe result | Meaning | Action |
|
|
39
39
|
| --- | --- | --- |
|
|
40
40
|
| `identical` | nothing changed | done |
|
|
41
|
-
| `additive` | new flags / capabilities / models / config values | review the list, `-- --record`, add the version to `compat/matrix.json` (§4), commit both |
|
|
41
|
+
| `additive` | new flags / capabilities / models / config values | review the list (for new models, also check what a real session accepts, see `tests/model-catalog.test.ts`), `-- --record`, add the version to `compat/matrix.json` (§4), commit both |
|
|
42
42
|
| `breaking` (removed flag, capability, config option or value, model id, auth method; changed protocolVersion or agent name) | the adapter may now be wrong | **stop**. Read `agy changelog`, adjust the adapter, add/re-record the replay fixture, run `node --test tests/features.test.ts tests/probe.test.ts`, and only then re-record baselines |
|
|
43
43
|
| `no baseline` | first run on a new major/minor | `-- --record` after reviewing the printed summary |
|
|
44
44
|
|
|
@@ -54,9 +54,11 @@ npm run check # tsc --noEmit
|
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
`features.test.ts` pins feature negotiation against the recorded 1.5.3
|
|
57
|
-
`initialize` result and its mutations
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
`initialize` result and its mutations. `model-catalog.test.ts` covers the
|
|
58
|
+
`session/new` catalog captured from agy 1.5.8, including per-model `xhigh` and
|
|
59
|
+
models with no selectable reasoning level. `probe.test.ts` pins parsers, diff
|
|
60
|
+
classification, baseline selection and CLI exit codes through injected
|
|
61
|
+
fixtures; these tests never spawn agy.
|
|
60
62
|
|
|
61
63
|
## 4. Add a version to the matrix
|
|
62
64
|
|
|
@@ -73,13 +75,15 @@ Edit `compat/matrix.json` (JSON, no rebuild needed):
|
|
|
73
75
|
## 5. SDK contract canary
|
|
74
76
|
|
|
75
77
|
```powershell
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
uv run --project compat/sdk-canary python compat/sdk-canary/canary.py
|
|
79
|
+
uv run --project compat/sdk-canary python compat/sdk-canary/canary.py --record
|
|
80
|
+
uv run --project compat/sdk-canary python compat/sdk-canary/canary.py --latest
|
|
79
81
|
```
|
|
80
82
|
|
|
81
|
-
First run creates `compat/sdk-canary/.venv` (pinned `google-antigravity
|
|
82
|
-
`uv.lock` committed
|
|
83
|
+
First run creates `compat/sdk-canary/.venv` (the pinned `google-antigravity`
|
|
84
|
+
version is in `pyproject.toml`; `uv.lock` is committed and `.venv` is gitignored).
|
|
85
|
+
As of 2026-11-13, PyPI latest and the recorded SDK baseline are both `0.1.23`, so
|
|
86
|
+
there is no newer SDK to adopt. `--latest` needs network (PyPI + uv);
|
|
83
87
|
`--record` is deterministic. Additive: re-record, add to `sdk.tested`. Breaking
|
|
84
88
|
(removed/renumbered messages, fields or enums): the harness family behind `agy`
|
|
85
89
|
changed — check the affected call in the adapter, then re-record after review.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"agyVersion": "1.5.8",
|
|
4
|
+
"collectedAt": "2026-11-13T13:07:41.218Z",
|
|
5
|
+
"helpFlags": [
|
|
6
|
+
"--add-dir",
|
|
7
|
+
"--agent",
|
|
8
|
+
"--continue",
|
|
9
|
+
"--conversation",
|
|
10
|
+
"--dangerously-skip-permissions",
|
|
11
|
+
"--disable-slash-commands",
|
|
12
|
+
"--effort",
|
|
13
|
+
"--input-format",
|
|
14
|
+
"--json-schema",
|
|
15
|
+
"--log-file",
|
|
16
|
+
"--mode",
|
|
17
|
+
"--model",
|
|
18
|
+
"--new-project",
|
|
19
|
+
"--output-format",
|
|
20
|
+
"--print",
|
|
21
|
+
"--print-timeout",
|
|
22
|
+
"--project",
|
|
23
|
+
"--prompt",
|
|
24
|
+
"--prompt-interactive",
|
|
25
|
+
"--remote-agent",
|
|
26
|
+
"--remote-control",
|
|
27
|
+
"--sandbox",
|
|
28
|
+
"--settings",
|
|
29
|
+
"-c",
|
|
30
|
+
"-i",
|
|
31
|
+
"-p"
|
|
32
|
+
],
|
|
33
|
+
"acpHelpFlags": [
|
|
34
|
+
"--add-dir",
|
|
35
|
+
"--agent",
|
|
36
|
+
"--app-data-dir",
|
|
37
|
+
"--app_data_dir",
|
|
38
|
+
"--cli_dir_name",
|
|
39
|
+
"--cli_log_file",
|
|
40
|
+
"--cloud_code_endpoint",
|
|
41
|
+
"--dangerously-skip-permissions",
|
|
42
|
+
"--disable-telemetry",
|
|
43
|
+
"--disable_telemetry",
|
|
44
|
+
"--gemini-dir",
|
|
45
|
+
"--gemini_dir",
|
|
46
|
+
"--help",
|
|
47
|
+
"--ide-mcp-port",
|
|
48
|
+
"--ide_mcp_port",
|
|
49
|
+
"--include-default-customizations",
|
|
50
|
+
"--is_google3_workspace",
|
|
51
|
+
"--is_google_internal",
|
|
52
|
+
"--log-file",
|
|
53
|
+
"--login",
|
|
54
|
+
"--override_user_agent_name",
|
|
55
|
+
"--process-per-session",
|
|
56
|
+
"--sandbox",
|
|
57
|
+
"--stdio",
|
|
58
|
+
"--use_stubby_auth",
|
|
59
|
+
"--worker",
|
|
60
|
+
"-h"
|
|
61
|
+
],
|
|
62
|
+
"models": [
|
|
63
|
+
{
|
|
64
|
+
"id": "claude-opus-5-5-high",
|
|
65
|
+
"label": "Claude Opus 5.5 (High)"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "claude-opus-5-5-low",
|
|
69
|
+
"label": "Claude Opus 5.5 (Low)"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "claude-opus-5-5-medium",
|
|
73
|
+
"label": "Claude Opus 5.5 (Medium)"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "claude-sonnet-5-5-high",
|
|
77
|
+
"label": "Claude Sonnet 5.5 (High)"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "claude-sonnet-5-5-low",
|
|
81
|
+
"label": "Claude Sonnet 5.5 (Low)"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "claude-sonnet-5-5-medium",
|
|
85
|
+
"label": "Claude Sonnet 5.5 (Medium)"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "gemini-3.8-flash-high",
|
|
89
|
+
"label": "Gemini 3.8 Flash (High)"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "gemini-3.8-flash-low",
|
|
93
|
+
"label": "Gemini 3.8 Flash (Low)"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "gemini-3.8-flash-medium",
|
|
97
|
+
"label": "Gemini 3.8 Flash (Medium)"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "gemini-4-argon-high",
|
|
101
|
+
"label": "Gemini 4 Argon (High)"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "gemini-4-argon-low",
|
|
105
|
+
"label": "Gemini 4 Argon (Low)"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "gemini-4-argon-medium",
|
|
109
|
+
"label": "Gemini 4 Argon (Medium)"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "gemini-4-hydrogen-high",
|
|
113
|
+
"label": "Gemini 4 Hydrogen (High)"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "gemini-4-hydrogen-low",
|
|
117
|
+
"label": "Gemini 4 Hydrogen (Low)"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "gemini-4-hydrogen-medium",
|
|
121
|
+
"label": "Gemini 4 Hydrogen (Medium)"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "gemini-4-hydrogen-xhigh",
|
|
125
|
+
"label": "Gemini 4 Hydrogen (XHigh)"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "gemini-pro-orchestrator-g1-pro",
|
|
129
|
+
"label": "Orchestrator (Argon)"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "gpt-oss-120b-medium",
|
|
133
|
+
"label": "GPT-OSS 120B (Medium)"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"initialize": {
|
|
137
|
+
"protocolVersion": 1,
|
|
138
|
+
"agentName": "Antigravity ACP Server",
|
|
139
|
+
"agentVersion": "1.5.8",
|
|
140
|
+
"capabilities": {
|
|
141
|
+
"_meta.antigravity.systemPrompt.append": true,
|
|
142
|
+
"auth.logout": true,
|
|
143
|
+
"loadSession": true,
|
|
144
|
+
"load_session": true,
|
|
145
|
+
"promptCapabilities.audio": false,
|
|
146
|
+
"promptCapabilities.embeddedContext": true,
|
|
147
|
+
"promptCapabilities.image": true,
|
|
148
|
+
"sessionCapabilities.additionalDirectories": true,
|
|
149
|
+
"sessionCapabilities.close": true,
|
|
150
|
+
"sessionCapabilities.list": true,
|
|
151
|
+
"sessionCapabilities.load": true,
|
|
152
|
+
"sessionCapabilities.resume": true,
|
|
153
|
+
"session_capabilities.additionalDirectories": true,
|
|
154
|
+
"session_capabilities.close": true,
|
|
155
|
+
"session_capabilities.list": true,
|
|
156
|
+
"session_capabilities.load": true,
|
|
157
|
+
"session_capabilities.resume": true
|
|
158
|
+
},
|
|
159
|
+
"authMethodIds": [
|
|
160
|
+
"agent-platform",
|
|
161
|
+
"gemini-api-key",
|
|
162
|
+
"oauth-business",
|
|
163
|
+
"oauth-personal"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"session": {
|
|
167
|
+
"configOptions": [
|
|
168
|
+
{
|
|
169
|
+
"id": "mode",
|
|
170
|
+
"type": "select",
|
|
171
|
+
"values": [
|
|
172
|
+
"accept-edits",
|
|
173
|
+
"auto",
|
|
174
|
+
"default",
|
|
175
|
+
"plan"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "model",
|
|
180
|
+
"type": "select",
|
|
181
|
+
"values": [
|
|
182
|
+
"claude-opus-5-5",
|
|
183
|
+
"claude-sonnet-5-5",
|
|
184
|
+
"gemini-3.8-flash",
|
|
185
|
+
"gemini-4-argon",
|
|
186
|
+
"gemini-4-hydrogen",
|
|
187
|
+
"gemini-pro-orchestrator-g1-pro",
|
|
188
|
+
"gpt-oss-120b-medium"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "thought_level",
|
|
193
|
+
"type": "select",
|
|
194
|
+
"values": [
|
|
195
|
+
"high",
|
|
196
|
+
"low",
|
|
197
|
+
"medium"
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"modeIds": [
|
|
202
|
+
"accept-edits",
|
|
203
|
+
"auto",
|
|
204
|
+
"default",
|
|
205
|
+
"plan"
|
|
206
|
+
],
|
|
207
|
+
"modelIds": [
|
|
208
|
+
"claude-opus-5-5-high",
|
|
209
|
+
"claude-opus-5-5-low",
|
|
210
|
+
"claude-opus-5-5-medium",
|
|
211
|
+
"claude-sonnet-5-5-high",
|
|
212
|
+
"claude-sonnet-5-5-low",
|
|
213
|
+
"claude-sonnet-5-5-medium",
|
|
214
|
+
"gemini-3.8-flash-high",
|
|
215
|
+
"gemini-3.8-flash-low",
|
|
216
|
+
"gemini-3.8-flash-medium",
|
|
217
|
+
"gemini-4-argon-high",
|
|
218
|
+
"gemini-4-argon-low",
|
|
219
|
+
"gemini-4-argon-medium",
|
|
220
|
+
"gemini-4-hydrogen-high",
|
|
221
|
+
"gemini-4-hydrogen-low",
|
|
222
|
+
"gemini-4-hydrogen-medium",
|
|
223
|
+
"gemini-4-hydrogen-xhigh",
|
|
224
|
+
"gemini-pro-orchestrator-g1-pro",
|
|
225
|
+
"gpt-oss-120b-medium"
|
|
226
|
+
],
|
|
227
|
+
"metaKeys": [
|
|
228
|
+
"antigravity"
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
}
|
package/compat/matrix.json
CHANGED
package/compat/probe.ts
CHANGED
|
@@ -40,7 +40,7 @@ export const PROBE_PROTOCOL_VERSION = 1;
|
|
|
40
40
|
export const PROBE_CLIENT_INFO = {
|
|
41
41
|
name: "pi-agy-bridge-compat-probe",
|
|
42
42
|
title: "pi-agy-bridge zero-cost compat probe",
|
|
43
|
-
version: "0.1.
|
|
43
|
+
version: "0.1.1",
|
|
44
44
|
} as const;
|
|
45
45
|
|
|
46
46
|
/** One failed probe step. `step` names the command or exchange. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timmyjl12/pi-agy-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "pi provider for Google Antigravity (agy) models over the official ACP server, modelled on pi-claude-code: pi keeps the loop, history and tool execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"src",
|
|
17
17
|
"compat",
|
|
18
|
+
"!**/__pycache__",
|
|
18
19
|
"README.md",
|
|
19
20
|
"ARCHITECTURE.md",
|
|
20
21
|
"UPGRADING.md",
|
|
@@ -37,8 +38,8 @@
|
|
|
37
38
|
"@earendil-works/pi-coding-agent": "*"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@earendil-works/pi-ai": "^1.5.
|
|
41
|
-
"@earendil-works/pi-coding-agent": "^1.5.
|
|
41
|
+
"@earendil-works/pi-ai": "^1.5.2",
|
|
42
|
+
"@earendil-works/pi-coding-agent": "^1.5.2",
|
|
42
43
|
"@types/node": "^22.19.0",
|
|
43
44
|
"typescript": "^5.9.3"
|
|
44
45
|
},
|
package/src/acp/connection.ts
CHANGED
|
@@ -194,12 +194,12 @@ export class AcpProcess {
|
|
|
194
194
|
const result = await this.#rpc.request("initialize", {
|
|
195
195
|
protocolVersion: 1,
|
|
196
196
|
clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false },
|
|
197
|
-
clientInfo: { name: "pi-agy-bridge", title: "pi-agy-bridge", version: "0.1.
|
|
197
|
+
clientInfo: { name: "pi-agy-bridge", title: "pi-agy-bridge", version: "0.1.1" },
|
|
198
198
|
});
|
|
199
199
|
return (result ?? {}) as AcpInitializeResult;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
/** Create a session. `systemPromptAppend` rides `_meta.antigravity.systemPrompt.append` (verified on agy 1.5.3). */
|
|
202
|
+
/** Create a session. `systemPromptAppend` rides `_meta.antigravity.systemPrompt.append` (verified on agy 1.5.3 and 1.5.8). */
|
|
203
203
|
async newSession(params: { cwd: string; systemPromptAppend?: string }): Promise<AcpNewSessionResult> {
|
|
204
204
|
const body: Record<string, unknown> = { cwd: params.cwd, mcpServers: [] };
|
|
205
205
|
if (params.systemPromptAppend) body._meta = { antigravity: { systemPrompt: { append: params.systemPromptAppend } } };
|
package/src/model-catalog.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Source of truth is what agy itself reports in `session/new`: the `model` config option (selectable models) and the
|
|
4
4
|
// `thought_level` option (low/medium/high), plus the `models` block that lists every model/level variant with a
|
|
5
5
|
// display name. A static fallback taken from the recorded agy 1.5.3 handshake keeps the provider usable before the
|
|
6
|
-
// first discovery succeeds.
|
|
6
|
+
// first discovery succeeds; models added since (agy 1.5.8: Gemini 4 Hydrogen, the Argon orchestrator) come from
|
|
7
|
+
// discovery only, so an older agy is never offered a model it does not have.
|
|
7
8
|
|
|
8
9
|
import type { Model } from "@earendil-works/pi-ai";
|
|
9
10
|
import type { AcpConfigOption, AcpConfigOptionValue, AcpNewSessionResult } from "./acp/types.ts";
|
|
@@ -34,6 +35,8 @@ export const FALLBACK_DESCRIPTORS: readonly AgyModelDescriptor[] = [
|
|
|
34
35
|
|
|
35
36
|
const FIXED_LEVEL = /-(low|medium|high)$/;
|
|
36
37
|
const DEFAULT_LEVELS = ["low", "medium", "high"];
|
|
38
|
+
/** Every level name pi knows, low to high. A model's own variants decide which of them it gets. */
|
|
39
|
+
const KNOWN_LEVELS = ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
37
40
|
|
|
38
41
|
function flatten(values: AcpConfigOptionValue[] | undefined): Array<{ value: string; name?: string }> {
|
|
39
42
|
const out: Array<{ value: string; name?: string }> = [];
|
|
@@ -60,9 +63,16 @@ export function describeModels(result: Pick<AcpNewSessionResult, "configOptions"
|
|
|
60
63
|
}
|
|
61
64
|
return bases.map((base): AgyModelDescriptor => {
|
|
62
65
|
const fixed = FIXED_LEVEL.exec(base.value)?.[1];
|
|
63
|
-
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
+
// The model's own variants are the truth, not the session-wide `thought_level` option: that option lists the
|
|
67
|
+
// levels of the CURRENT model only. Verified on agy 1.5.8: Gemini 4 Hydrogen accepts `xhigh` although the
|
|
68
|
+
// option (read with Argon selected) offers low/medium/high.
|
|
69
|
+
const order = [...KNOWN_LEVELS, ...levelOrder.filter((level) => !KNOWN_LEVELS.includes(level))];
|
|
70
|
+
const present = order.filter((level) => variants.has(`${base.value}-${level}`));
|
|
71
|
+
// Listed once under its bare id, with no per-level variants: the model has no selectable level and agy rejects
|
|
72
|
+
// any `thought_level` for it (agy 1.5.8, "Orchestrator (Argon)": `Thinking level "low" is not offered`).
|
|
73
|
+
const single = present.length === 0 && variants.has(base.value);
|
|
74
|
+
// Not listed at all (agy changed the shape): the session-wide thought_level option still applies.
|
|
75
|
+
const levels = fixed || single ? [] : present.length > 0 ? present : levelOrder;
|
|
66
76
|
const rawName =
|
|
67
77
|
(levels[0] ? variants.get(`${base.value}-${levels[0]}`) : undefined) ??
|
|
68
78
|
variants.get(base.value) ??
|
|
@@ -97,7 +107,7 @@ function limitsFor(id: string, observed: number | undefined): Limits {
|
|
|
97
107
|
type LevelMap = NonNullable<AgyModel["thinkingLevelMap"]>;
|
|
98
108
|
|
|
99
109
|
function levelMap(descriptor: AgyModelDescriptor): LevelMap {
|
|
100
|
-
// null = unsupported. agy cannot switch thinking off
|
|
110
|
+
// null = unsupported. agy cannot switch thinking off; a model gets only the levels its own variants list.
|
|
101
111
|
const map: Record<string, string | null> = {
|
|
102
112
|
off: null,
|
|
103
113
|
minimal: null,
|
|
Binary file
|