llm-relay 0.8.2 → 0.8.4
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/package.json +1 -1
- package/skills/llm-relay/SKILL.md +44 -39
package/package.json
CHANGED
|
@@ -95,40 +95,41 @@ targets — the host agent reaches them by shelling out to the vendor CLI, and t
|
|
|
95
95
|
**one ordered ladder** together with the relay's pools. Walk it top to bottom; each rung falls
|
|
96
96
|
back to the next on failure or quota exhaustion, exactly like candidates inside a relay pool.
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
98
|
+
### The lanes, and how to drive each
|
|
99
|
+
|
|
100
|
+
- **Relay pools** — `@relay: pool/coding` on a subagent prompt, or the tier mapping in
|
|
101
|
+
`routing.subagents` when offload is on. Spends provider API keys. *Exhausted when:* the pool
|
|
102
|
+
4xx/5xxs after failover walks every candidate, or `llm-relay candidates` shows the breaker open
|
|
103
|
+
/ quota drained across the pool.
|
|
104
|
+
- **Antigravity (`agy`)** — `agy -p "<task>" --model <id> --output-format json`. Ask
|
|
105
|
+
`agy models` for the roster; ids may carry a reasoning-level suffix (`…-high|-medium|-low`),
|
|
106
|
+
and `--effort low|medium|high` tunes ids that don't. Other flags: `--add-dir <path>` to scope
|
|
107
|
+
the workspace, `--json-schema` for structured output, `--print-timeout` (default 5m),
|
|
108
|
+
`--mode plan` for analysis-only runs. ⚠ **AGY meters its Gemini and its Claude models against
|
|
109
|
+
two independent credit balances** — exhausting one leaves the other fully available, so they
|
|
110
|
+
are two distinct rungs, not one.
|
|
111
|
+
- **Codex** — `codex exec --model <id> "<task>"`, spending the ChatGPT subscription. Reasoning
|
|
112
|
+
level is a config override, not a flag (there is no `--effort`):
|
|
113
|
+
`-c model_reasoning_effort="minimal|low|medium|high|xhigh"`, defaulting to whatever
|
|
114
|
+
`~/.codex/config.toml` sets; `plan_mode_reasoning_effort` sets it separately for plan mode.
|
|
115
|
+
⚠ Codex's own guidance is that high effort burns subscription rate limits fast — match the
|
|
116
|
+
level to the task rather than leaving it high for mechanical work. `codex exec review` runs a
|
|
117
|
+
repo review.
|
|
118
|
+
- **Anthropic subagent** — plain `Agent(...)`, no directive. Spends primary quota; always works,
|
|
119
|
+
so it is the natural bottom of any ladder.
|
|
120
|
+
|
|
121
|
+
The CLIs' own model lists are the authority on what exists — re-check them rather than trusting
|
|
122
|
+
ids written down anywhere, since a de-listed id fails a whole rung.
|
|
123
|
+
|
|
124
|
+
### Order
|
|
125
|
+
|
|
126
|
+
**A user's own ordering wins. Look for it first**, in `~/.claude/CLAUDE.md` (or a project
|
|
127
|
+
`CLAUDE.md`) — that is where a personal ladder belongs, because **this file is overwritten by
|
|
128
|
+
`npm i -g llm-relay` on every install and upgrade** and any ordering edited into it would be
|
|
129
|
+
silently lost. Never write a user's personal preference here; write it there.
|
|
130
|
+
|
|
131
|
+
Absent such an instruction, the package default is simply: **relay pools → peer agent CLIs (if
|
|
132
|
+
installed) → Anthropic subagent** — cheapest metered capacity first, primary quota last.
|
|
132
133
|
|
|
133
134
|
Rules for walking it:
|
|
134
135
|
|
|
@@ -139,6 +140,9 @@ Rules for walking it:
|
|
|
139
140
|
source) exactly like relay-offloaded output. Do NOT wrap them in a bare one-shot HTTP helper.
|
|
140
141
|
- A **refusal or a wrong answer is not a transport failure** — do not walk the ladder to shop for
|
|
141
142
|
a more compliant model. Only availability failures (errors, quota, rate limits) advance a rung.
|
|
143
|
+
- **The rungs draw on five independent buckets**, so exhausting one never implies the next is
|
|
144
|
+
gone: AGY-Gemini, AGY-Claude (separate balances despite one CLI), ChatGPT, provider API keys,
|
|
145
|
+
Anthropic primary. Re-check the rung you skipped on the next dispatch — a reset refills it.
|
|
142
146
|
- Interactive-only quotas (e.g. an IDE-bound plan with no CLI) are unreachable by any dispatcher;
|
|
143
147
|
don't try to MITM them into the ladder.
|
|
144
148
|
|
|
@@ -146,11 +150,12 @@ Rules for walking it:
|
|
|
146
150
|
|
|
147
151
|
Ordering exists at three levels; change the right one:
|
|
148
152
|
|
|
149
|
-
- **
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
- **Which lane is tried first**: it is instructions, not code. Put the ordered list in
|
|
154
|
+
**`~/.claude/CLAUDE.md`** (all projects) or a project `CLAUDE.md` (one repo) — both are loaded
|
|
155
|
+
every session and **neither is touched by an npm install**, so the ordering survives reinstalls
|
|
156
|
+
and upgrades. ⚠ Do *not* put it in `~/.claude/skills/llm-relay/SKILL.md`: `postinstall`
|
|
157
|
+
overwrites that file from the package on every global install, silently discarding the edit.
|
|
158
|
+
The user can also reorder per-request in chat ("try codex first for this").
|
|
154
159
|
- **Which pool a tier lands on** (`routing.subagents` in `~/.llm-relay/config.json`): maps the
|
|
155
160
|
Agent tool's `model` param (opus/sonnet/haiku/…) to a pool or pinned spec. Takes effect on the
|
|
156
161
|
next request; no restart.
|