Skip to content

feat: drop the runtime default model; rules choose models - #282

Merged
popodidi merged 1 commit into
mainfrom
axe/task-2447--work
Dec 2, 2026
Merged

popodidi merged 1 commit into
mainfrom
axe/task-2447--work

Conversation

@popodidi

@popodidi popodidi commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Task 2447. Owner pick A (tn-cos #6541, button #6548): models come only from routing rules; a runtime stores no default model. Revises #281 (task 2438).

Changes

  • Removed: ready-card model pick (rtmodel:/rtmpage:; presses on old cards get the retired toast), POST /api/runtimes/<name>/model, Axe::runtime_model, the node runtime_model job, Registry::set_model, Health::models (state.json; an old file still loads and the field is dropped on save), and the provider model-list call (list_models, parse_models, choices, row models/list). Provider rows and the provider -> key flow stay.
  • A rule naming no model runs the row's default_model (as before feat: runtime setup is a provider, key, model pick #281). The ready card: "OpenCode 1 is ready with DeepSeek (deepseek-flash). For another model, tell me which (e.g. "run research tasks on OpenCode 1 with model X")." Other… has no default: "It has no default model: tell me which model to run on it …".
  • Before a run whose rule names a model, the OpenCode/Pi config declares that model under its provider (Runtime::write_config_for): OpenCode 2.4.3 refuses an undeclared model its catalog lacks, and Other's models are known only from the rule. Failover onto Other reuses the failed rule's model.
  • GET /api/runtimes providers[] back to {id, state}.
  • No DB schema change (the stored field was the node's state.json).
  • docs/user: runtimes concept, Telegram guide. No CLI verb or flag changed.

opencode-2 missing from axe runtimes list

Not a bug: task 2438's live check removed it (node log 23:51:10Z runtime opencode-2 removed, via DELETE /api/runtimes/opencode-2; 2438's note lists "Cleanup: ... opencode-2 removed"). The Telegram ready card from 23:47 was a one-off outcome card and stayed. The list shows every registry runtime, including one awaiting its first login (asserted in opencode_sets_up_from_telegram_with_a_provider_key, "opencode-1 reported" before login).

Tests

  • opencode_runs_the_rules_model_else_the_providers_default (runtime_pick): no -m and the row default without a rule model; -m openrouter/openai/gpt-6.2-sol with one, declared in opencode.json; nothing stored.
  • Ready card has no model buttons and old model buttons are retired (telegram unit + integration); Other card text; Other declared only with a rule's model; old state.json with models loads.
  • Local at the same tree: fmt, clippy, cargo test --locked, ts_bindings, doc links, --no-default-features clippy+test, web build + embed-ui clippy/build/test: all pass.

🤖 Generated with Claude Code

Owner pick A (tn-cos #6541/#6548): a runtime stores no model of its own.
Reverts the model pick of #281, keeping the provider -> key flow and rows.

- remove the ready-card model pick (rtmodel/rtmpage buttons; old ones now
  answer with the retired toast), POST /api/runtimes/<name>/model,
  Axe::runtime_model, the node's runtime_model job, Registry::set_model,
  state.json `models` (an old file still loads; the field is dropped) and
  the provider model-list call (list_models, parse_models, choices)
- a rule naming no model runs the provider row's default_model; the ready
  card says the runtime is ready with its provider and to ask the bot for
  another model; Other... has no default, so its card asks for one
- before a run whose rule names a model, the runtime's OpenCode/Pi config
  declares it under its provider (Runtime::write_config_for): OpenCode
  refuses an undeclared model its catalog lacks, and Other's models are
  known only from the rule
- runtime report: providers[] back to id and state
- docs/user: runtimes concept and Telegram guide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@popodidi
popodidi merged commit b34e820 into main Dec 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant