fix(placement): remove subagent model allowlist, prefer loaded then host default - #94
Merged
Merged
Conversation
…ost default A subagent delegated to a host with a model already loaded got evicted for a different model, because local_subagent_placement_models acted as an eligibility filter that ran before the "prefer already loaded" scoring bonus could ever apply — a resident model not on the (manually maintained, undiscoverable) allowlist lost to an allowlisted cold one, paying a multi-second model swap for no real benefit. Remove the allowlist entirely: it required hand-curating every model ever installed with no config surface, docs, or warning when it silently evicted a resident model, and for a self-curated local fleet the failure it guarded against (a model flubbing tool-call JSON) is a one-time visible bad turn, not silent corruption. New priority in bestModel(): loaded > host's own configured default model (GET /api/config/info, already exposed by llama-skein but never consulted here) > parent's own model > plain fit/speed scoring. Every registered, tool-call-capable model is now eligible; residency and the host's default decide ties instead of a global allowlist. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Omitted from the fork manifest when it was added in #93 (the InstanceRef sidecar-delivery fix) — fork:verify only caught it on the next push, since it runs pre-push, not pre-commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
local_subagent_placement_modelsacted as an eligibility filter that ran before the "prefer already loaded" scoring bonus could ever apply.bestModel(): loaded model > host's own configured default model (GET /api/config/info, already exposed by llama-skein but never consulted here) > parent's own model > plain fit/speed scoring.lifecycle-inject.test.ts(added in fix(peer): resolve InstanceRef before any session-scoped call in sidecar delivery #93) as an owned fork file —fork:verifyonly catches a missing registration pre-push, so it slipped through on the last PR.Test plan
placement.test.tsupdated/extended: residency beats an allowlisted-cold model, host default beats plain fit/speed, host default beats parent's model, residency still beats host default.bun test test/local/— 320 pass (1 unrelated pre-existing failure confirmed present on unmodified code too — stale hostname fixture).bun turbo typecheck— 30/30 clean.bun run fork:verify— 0 unregistered divergence.🤖 Generated with Claude Code