fix: constrain skill routing to skills actually loaded#98
Open
Volkov Daniil (codeGaus) wants to merge 1 commit into
Open
fix: constrain skill routing to skills actually loaded#98Volkov Daniil (codeGaus) wants to merge 1 commit into
Volkov Daniil (codeGaus) wants to merge 1 commit into
Conversation
The science agents' prompts carry a static Skill Routing Table (ml.txt,
biology.txt, physics.txt) that names skills like peft/unsloth. When those
skills aren't loaded in the current environment the model still routes to
them and skill({name}) fails with "not found". Inject a runtime
<available-skills> section built from the real loaded registry (permission
-filtered, grouped by category) so routing targets skills that resolve;
when none are loaded, tell the model not to call the skill tool. The
curated tables stay intact as guidance.
|
Volkov Daniil (@codeGaus) is attempting to deploy a commit to the InkVell Team on Vercel. A member of the Team first needs to authorize it. |
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.
What does this PR do?
The science agents' prompts carry a static "Skill Routing Table" (
ml.txt,biology.txt,physics.txt) that names skills likepeft/unsloth. When those skills aren't loaded in the current environment, the model still routes to them andskill({name})fails withSkill "<name>" not found. This injects a runtime<available-skills>section built from the actual loaded registry (permission-filtered, grouped by category), so the model only routes to skills that resolve; when none are loaded it tells the model not to call the skill tool at all.The curated routing tables are left intact as guidance — the runtime section just overlays ground truth on top. Gated to the four science agents (
research,biology,physics,ml) so lightweight agents don't get the extra tokens, and it lands in the stable (cache-friendly) system prefix.How did you verify your code works?
Added
test/session/system-skills.test.ts: loadsscanpybut notpeft, asserts the section listsscanpyand omitspeft; also covers permission-denied filtering and the empty-registry path.bun test test/session/system-skills.test.ts→ 3 pass.prettier --checkclean.Checklist
bun run typecheck— note: thetsgonative binary isn't available for my arch locally;tsc --noEmiton the changed files is clean (only the pre-existingllm.tsTS2589 remains on baseline).bun test(system-skills) passesbunx prettier --checkclean