agents: remove the hive-level /model control; the swarm editor sets the model
The per-agent web UI no longer sets the model: the `/model` slash command, the model picker, `POST /api/model`, `Bus::set_model` and the `hyperhive-model` writer are gone. The model chip is display-only and shows where the model comes from (`model_source` in `/api/state`). The model is set on the swarm (swarm UI agents page, `swarmctl agent inference set`). The read side is unchanged: with no swarm value an agent runs its agent.nix model, else an existing `hyperhive-model` file, else haiku. Existing files are not touched. With the picker gone, its model list goes too: `available_models` in `/api/state`, the ACP model-list filter, and the harness's global `HIVE_AVAILABLE_MODELS`. The subagent daemon keeps its own `HIVE_AVAILABLE_MODELS` from mcp.nix, and the `availableModels` assertion stays. `/effort` (command, picker, route, file) is unchanged. Refs #5034
This commit is contained in:
parent
46e9966e17
commit
594693f4c7
26 changed files with 244 additions and 425 deletions
|
|
@ -20,14 +20,15 @@ swarmctl agent inference clear iris
|
|||
agent's `availableModels` as the models its subagent `start` and
|
||||
`continue` calls may name, read on each call
|
||||
([`subagent.md`](../tools/subagent.md#which-models-a-subagent-may-run-on)).
|
||||
The web UI's model picker doesn't use it.
|
||||
- `get` shows each field, naming the unset ones (or says the swarm sets
|
||||
nothing for the agent), and then the model and effort the agent reports
|
||||
running on, each with where it comes from.
|
||||
- `clear` removes every field; the agent goes back to its own values.
|
||||
|
||||
The full flag reference is [`swarmctl-cli.md`](../tools/swarmctl-cli.md). The
|
||||
swarm UI's agents page edits the same settings; see [UI](ui.md).
|
||||
swarm UI's agents page edits the same settings; see [UI](ui.md). The
|
||||
swarm is the only place to change an agent's model at runtime: its web UI
|
||||
shows the model but has no picker and no `/model` command.
|
||||
|
||||
## What an agent runs on
|
||||
|
||||
|
|
@ -47,11 +48,14 @@ Each running value names where it comes from:
|
|||
| ------------ | -------------------------------------------------------------------------- |
|
||||
| `swarm` | the value set here |
|
||||
| `agent_nix` | `services.hyperhive.agent.model` or `effortLevel` in the agent's agent.nix |
|
||||
| `local_file` | a `/model` or `/effort` pick in the agent's web UI |
|
||||
| `local_file` | an `/effort` pick in the agent's web UI, or a `hyperhive-model` file |
|
||||
| `default` | the harness's built-in default (`haiku`, `medium`) |
|
||||
|
||||
When the agent starts without a swarm value, its agent.nix model wins over
|
||||
its `/model` pick, and its `/effort` pick wins over its agent.nix effort.
|
||||
a `hyperhive-model` file, and its `/effort` pick wins over its agent.nix
|
||||
effort. A `hyperhive-model` file comes from a runtime model pick the
|
||||
agent's web UI no longer offers; the agent still reads it but never writes
|
||||
it.
|
||||
|
||||
The agent reports these whenever they change, and again once a minute.
|
||||
swarm-controller keeps only what it has received since it started, so for up
|
||||
|
|
@ -63,13 +67,13 @@ Each agent reads its settings every 10 seconds and switches on the next
|
|||
read: its next turn runs on the new model or effort, and its web UI badge
|
||||
shows it. A turn already running keeps what it started with.
|
||||
|
||||
- **Its own value is the one it runs without the swarm**, from a `/model`
|
||||
or `/effort` pick in its web UI or from its agent.nix. Setting a swarm
|
||||
- **Its own value is the one it runs without the swarm**: its agent.nix, an
|
||||
`/effort` pick in its web UI, or a `hyperhive-model` file. Setting a swarm
|
||||
value doesn't overwrite it.
|
||||
- **Clearing a field** (or the whole key) puts the agent back on its own
|
||||
value on the next read.
|
||||
- **A `/model` or `/effort` pick while the swarm sets that field** changes
|
||||
the agent's own value, but the swarm value comes back on the next read.
|
||||
- **An `/effort` pick while the swarm sets effort** changes the agent's own
|
||||
value, but the swarm value comes back on the next read.
|
||||
- **After a restart**, the agent runs its own values until its first read
|
||||
of its settings succeeds.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue