feat: auto model routing for SkillFlows#51
Open
RiteshTiwari1 wants to merge 1 commit into
Open
Conversation
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.
Addresses #48
Summary
Adds automatic model routing for SkillFlows. Each step is classified by
complexity at runtime and routed to the right model — lightweight tasks
(summarize / extract / classify / transform) run on a cheaper model, while
reasoning-intensive tasks (planning / decision-making / tool orchestration)
stay on the configured reasoning model. Reduces token usage and cost without
sacrificing quality on complex steps.
How it works
Model resolution per step, in priority order:
model:inworkflows/*.yamlmodel:inSKILL.mdmodel.routingtierspreferredmodelUnknown / ambiguous tasks default to reasoning, so cost optimization never
silently degrades quality. Routing is opt-in — active only when a
model.routingblock is present, so existing agents are unaffected.Configuration (
agent.yaml)Scope note
Routing is applied at the SkillFlow step level — where GitAgent runs
discrete tasks in sequence. Per-turn routing inside a single agent loop would
need deeper
pi-agent-corechanges; happy to follow up if that's preferred.