Skip to content

Miwarang Senpi Delegate v0.3.0

Latest

Choose a tag to compare

@itokun99 itokun99 released this 21 Oct 21:06

Miwarang Senpi Delegate v0.3.0

Model choice now comes from each target harness's live catalogue: configured candidates are validated and skipped when unavailable, OMO-side model names are rejected instead of silently substituted, and foreground opencode runs recover to the next candidate when a provider endpoint fails.

Fixed

  • OMO-pinned model names no longer reach a target or get silently substituted there. commandcode --model cloviela/glm-5.3-flash used to succeed via the CLI's unknown-prefix short-name fallback (glm-5.3-flash -> z-ai/glm-5.3-flash, a paid subscription model); a model override now must exist in the target's live catalogue on both harnesses.
  • Provider failures surface their real error (OpenCode session ... failed: provider.quota (402) Upstream request failed: Endpoint is unavailable.) instead of a generic "returned no assistant text".
  • Lanes like category:quick no longer die when the first candidate's endpoint is down: a foreground opencode run retries the next validated candidate in the configured order (never with an explicit model override, never in background runs).

Included

  • Command backends get a real availability check: listModelsArgv (for commandcode: ["--list-models"]) probes the CLI's model list, skips candidates that are not there, and marks :free/-free ids as zero-cost so freeOnly routes stay enforceable on command backends too. A failed probe falls back to the configured candidates instead of blocking delegation.
  • Top-level defaultModels: a shared candidate chain that every route without its own models inherits, so the model ordering lives in one place with per-route overrides. A route with neither its own list nor the shared chain fails validation.
  • miwarang_delegate guidance and the model parameter description now state the rule: never forward the OMO session's model (for example a model pinned in omo.jsonc); omit model to use the route's configured candidates.
  • Override rejections include the catalogue size; bare (provider-less) catalogue ids match configured candidates.
  • README "Model selection and availability" documents the ordering, the paid guard, and the failover semantics; config.example.json carries listModelsArgv and stays byte-identical to the README example block.

Verification

  • bun test: 162 → 186 passing tests, 0 failures across 6 files (defaultModels inheritance and failover covered by new suites).
  • Live proof (.omo/evidence/2026-10-21-model-selection/proof-output.txt): a real commandcode --list-models probe parsed 97 models; cloviela/glm-5.3-flash was rejected pre-run on category:writing (catalog: 97 models) and category:quick (catalog: 74 models); a valid catalogue override ran for real (reflection/beam:free answered CC_BEAM_OK); the failover trace attempted only catalogue-valid candidates.
  • End-to-end against the installed user config (final-config-check.mjs): category:quick inherited the defaultModels chain and answered CHAIN_OK on opencode/minimax-m3.1-flash-free on the first attempt.
  • config.example.json validates against validateConfig; the README example block is byte-identical to it (174 lines).