llm-relay 0.8.1 → 0.8.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-relay",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Loopback Anthropic-Messages-API proxy that validates and repairs tool-call responses in flight, routing across multi-provider LLM backends.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -95,24 +95,45 @@ 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
- **Default ladder for offloadable work** (bulk recon, extraction, analysis):
99
-
100
- 1. **Relay pool** `@relay: pool/coding` subagent (or tier via `routing.subagents` when offload
101
- is on). Free API-key capacity. *Exhausted when:* the pool 4xx/5xxs after failover walks every
102
- candidate, or `llm-relay candidates` shows the breaker open / quota drained across the pool.
103
- 2. **Antigravity CLI** `agy -p "<task>" --output-format json` (spends AGY CLI credits; the
104
- `gemini` CLI is its deprecated former name). Useful flags: `--model` (`agy models` lists),
105
- `--effort low|medium|high`, `--add-dir <path>` to scope the workspace, `--json-schema` for
106
- structured output, `--print-timeout` (default 5m), `--mode plan` for analysis-only runs.
98
+ **Default ladder for offloadable work** (bulk recon, extraction, analysis). Included
99
+ subscription/credit allowances are spent before metered-or-free API capacity, so the cheap lanes
100
+ are the *first* resort, not the fallback:
101
+
102
+ 1. **Antigravity Gemini 3.6 Flash, any tier.** The default workhorse for every tier; pick the
103
+ reasoning level to suit the task, since AGY bakes it into the model id:
104
+ ```bash
105
+ agy -p "<task>" --model gemini-3.6-flash-medium --output-format json
106
+ ```
107
+ `-high` for analysis and tracing, `-medium` for ordinary recon, `-low` for mechanical sweeps.
108
+ Other flags: `--add-dir <path>` to scope the workspace, `--json-schema` for structured output,
109
+ `--print-timeout` (default 5m), `--mode plan` for analysis-only runs. Spends AGY CLI credits.
107
110
  *Exhausted when:* the CLI reports credits/quota exhausted or rate-limits.
108
- 3. **Codex CLI** `codex exec "<task>"` (spends the ChatGPT subscription). Also
109
- `codex exec review` for repo review. *Exhausted when:* it reports usage-limit errors.
110
- 4. **Anthropic subagent** plain `Agent(...)`, no directive. Spends primary quota; always works.
111
+ 2. **Antigravity — Claude, same CLI and credits.** When Flash is not strong enough for the task,
112
+ stay on AGY and step up rather than leaving the lane: `--model claude-opus-4-6-thinking` for
113
+ hard reasoning, `--model claude-sonnet-4-6` for everything else. (Neither id carries a level
114
+ suffix — use the session flag `--effort low|medium|high` if you need to tune them.)
115
+ *Exhausted when:* AGY credits are gone — i.e. this rung and rung 1 exhaust together.
116
+ 3. **Codex — Sol, then Terra, then Luna.** Spends the ChatGPT subscription:
117
+ ```bash
118
+ codex exec --model gpt-5.6-sol "<task>"
119
+ ```
120
+ Walk `gpt-5.6-sol` → `gpt-5.6-terra` → `gpt-5.6-luna` in that order. Set reasoning to suit with
121
+ `-c model_reasoning_effort="high|medium|low"` (the config default is `high`). `codex exec review`
122
+ runs a repo review. *Exhausted when:* it reports usage-limit errors.
123
+ 4. **Relay pools — free API-key capacity, benchmark order.** `@relay: pool/coding` (or the tier
124
+ mapping in `routing.subagents` when offload is on). Ordering *inside* a pool is by synced
125
+ benchmark strength, not config order — see "Reordering dispatch" below. *Exhausted when:* the
126
+ pool 4xx/5xxs after failover walks every candidate, or `llm-relay candidates` shows the breaker
127
+ open / quota drained across the pool.
128
+ 5. **Anthropic subagent** — plain `Agent(...)`, no directive. Spends primary quota; always works.
129
+
130
+ `agy models` and the Codex model list are the authority on what exists — re-check them rather than
131
+ trusting these ids after a CLI upgrade, since a de-listed id fails the whole rung.
111
132
 
112
133
  Rules for walking it:
113
134
 
114
135
  - **Skip a rung whose CLI is not installed** (`Get-Command agy` / `codex` or `command -v`) — this
115
- ladder degrades gracefully to "relay, then Anthropic" on machines without the peer CLIs.
136
+ ladder degrades gracefully to "relay pools, then Anthropic" on machines without the peer CLIs.
116
137
  - Both CLIs are **full agents with their own tool loops** — hand them a self-contained prompt with
117
138
  file paths, run long tasks in the background, and treat output as advisory (verify against
118
139
  source) exactly like relay-offloaded output. Do NOT wrap them in a bare one-shot HTTP helper.
@@ -127,9 +148,9 @@ Ordering exists at three levels; change the right one:
127
148
 
128
149
  - **The ladder above** (which lane is tried first): it is instructions, not code — edit the
129
150
  numbered list in this skill file (`skills/llm-relay/SKILL.md` in the repo; the installed copy
130
- lives in `~/.claude/skills/llm-relay/`, refreshed on package upgrade). E.g. to burn AGY credits
131
- before free API keys, swap rungs 1 and 2. The user can also reorder per-request in chat
132
- ("try codex first for this").
151
+ lives in `~/.claude/skills/llm-relay/`, refreshed on package upgrade). E.g. to preserve AGY
152
+ credits and spend free API capacity first, move rung 4 to the top. The user can also reorder
153
+ per-request in chat ("try codex first for this").
133
154
  - **Which pool a tier lands on** (`routing.subagents` in `~/.llm-relay/config.json`): maps the
134
155
  Agent tool's `model` param (opus/sonnet/haiku/…) to a pool or pinned spec. Takes effect on the
135
156
  next request; no restart.