Skip to content

fix(api): advertise all enabled llm slots in discovery, not just loaded ones#1153

Merged
thinmintdev merged 4 commits into
mainfrom
fix/discovery-cold-slot-visibility
Jul 6, 2026
Merged

fix(api): advertise all enabled llm slots in discovery, not just loaded ones#1153
thinmintdev merged 4 commits into
mainfrom
fix/discovery-cold-slot-visibility

Conversation

@thinmintdev

Copy link
Copy Markdown
Contributor

Problem

Both hal0_slot_alias_models (/v1/models catalog) and _collect_chat_slots (Hermes provision) filtered to only warm slots — but dispatch already cold-loads on demand when a request addresses a cold slot by alias. This mismatch hid code, nano, and other cold chat slots from both Hermes and pi-coder, even though addressing them by name would auto-load them.

Root cause: the "only advertise what's loaded" rule was written before the alias dispatch path gained cold-start loading. The alias map (hal0_chat_slot_alias_map) already included every enabled llm slot with a model — including cold ones. Only discovery lagged behind.

Fix

Two surfaces, same rule — advertise every enabled type=="llm" slot with a configured model, same criteria as hal0_chat_slot_alias_map:

  • hal0_slot_alias_models: removed the _loaded_model_ids helper and the model_id not in loaded filter
  • _collect_chat_slots: removed the _is_ready() gate

Tests

  • 4 API slot-alias tests updated
  • 4 Hermes provision-collect tests updated
  • Full suite: 99 pass (11 slot-alias/hermes-collect + 88 hermes_provision)

…ed ones

Both hal0_slot_alias_models (/v1/models) and _collect_chat_slots (Hermes
provision) filtered to only warm slots — but dispatch already cold-loads
on demand when a request addresses a cold slot by alias. This mismatch
hid code, nano, and other cold slots from both Hermes and pi-coder even
though addressing them by name would auto-load them.

Removes the loaded-model-id check from hal0_slot_alias_models (and the
now-unused _loaded_model_ids helper) and the _is_ready filter from
_collect_chat_slots. Both surfaces now advertise every enabled llm slot
with a configured model — same criteria as hal0_chat_slot_alias_map.

Tests: 11 slot-alias/hermes-collect tests pass; 88 hermes_provision pass.
The canonical hal0/agent, hal0/utility, hal0/npu live-resolve virtual
names were injected into /v1/models alongside the per-slot alias entries,
creating duplicate model entries for the same slots. Since the slot
aliases (agent, utility, npu, etc.) are now discoverable via
hal0_slot_alias_models, the separate live-resolve advertisement is
redundant.

Dispatch still resolves the canonical names — this only removes them
from the discovery catalog. Hermes uses model.default: "hal0/agent" in
its config, which routes through the dispatch LiveSlotResolver, not
through model discovery.
@thinmintdev thinmintdev merged commit 7333a26 into main Jul 6, 2026
2 of 3 checks passed
@thinmintdev thinmintdev deleted the fix/discovery-cold-slot-visibility branch July 6, 2026 10:11
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