-
Notifications
You must be signed in to change notification settings - Fork 373
Use small model alias in inline sub-agent blocks
#30398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ Define a sub-agent with a level-2 Markdown heading of the form `## agent: \`name | |
| ## agent: `file-summarizer` | ||
| --- | ||
| description: Summarizes the content of a file in a few concise sentences | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Good change — using the |
||
| --- | ||
| You are a file summarization assistant. When given a file path, read the | ||
| file and return a brief summary (2–4 sentences) describing its purpose | ||
|
|
@@ -58,7 +58,15 @@ Only two fields are supported inside a sub-agent frontmatter block: | |
| | Field | Required | Default | Notes | | ||
| |---|---|---|---| | ||
| | `description` | No | — | Human-readable summary of the sub-agent's role | | ||
| | `model` | No | `"inherited"` | Model override; `"inherited"` uses the parent workflow's model | | ||
| | `model` | No | `"inherited"` | Model override; `"inherited"` uses the parent workflow's model. Prefer model aliases (e.g. `small`, `large`) over specific model IDs for portability. | | ||
|
|
||
| **Prefer model aliases over model IDs.** Built-in aliases resolve to the best available model for each provider, so they continue to work as models are updated. Commonly used aliases for sub-agents: | ||
|
|
||
| | Alias | Resolves to | When to use | | ||
| |---|---|---| | ||
| | `small` | `mini` → haiku, gpt-5-mini, gpt-5-nano, gemini-flash | Cheap, fast tasks: extraction, classification, formatting | | ||
| | `large` | sonnet, gpt-5-pro, gpt-5, gemini-pro | Complex reasoning or synthesis tasks | | ||
| | `inherited` | Parent workflow model | Default — use when the sub-agent needs the same capability as the parent | | ||
|
|
||
| All other fields (`engine`, `tools`, `network`, etc.) are stripped at runtime with a warning. Sub-agents inherit the parent's engine, tool access, and network configuration. | ||
|
|
||
|
|
@@ -127,7 +135,7 @@ The top item must have a linked PR draft or issue. | |
| ## agent: `dependency-scanner` | ||
| --- | ||
| description: Lists outdated npm/pip/go packages | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
| --- | ||
| Run the appropriate package-manager audit command and return a | ||
| machine-readable list of outdated packages with their current and | ||
|
|
@@ -136,22 +144,22 @@ latest versions. | |
| ## agent: `test-coverage` | ||
| --- | ||
| description: Summarises low-coverage code paths | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
| --- | ||
| Read the most recent test coverage report and list the top 5 files or | ||
| functions with coverage below 60 %. Include the file path and line range. | ||
|
|
||
| ## agent: `secret-scanner` | ||
| --- | ||
| description: Checks for potential credential leaks | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
| --- | ||
| Scan staged changes and recently modified files for patterns that | ||
| resemble API keys, tokens, or passwords. Report any findings with the | ||
| file name and approximate line number. | ||
| ``` | ||
|
|
||
| The parent model (e.g. Claude Sonnet or Copilot) orchestrates, while the sub-agents do the heavy lifting with a haiku-size model at lower cost. | ||
| The parent model (e.g. Claude Sonnet or Copilot) orchestrates, while the sub-agents do the heavy lifting with a `small` model at lower cost. | ||
|
|
||
| ### 2 — Reusable specialised helpers | ||
|
|
||
|
|
@@ -184,7 +192,7 @@ tools: | |
| ## agent: `diff-explainer` | ||
| --- | ||
| description: Produces a plain-English summary of a pull request diff | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
| --- | ||
| You receive a unified diff. Describe each changed file in one sentence, | ||
| focusing on *what changed* and *why it matters*. Ignore formatting-only | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -600,7 +600,7 @@ Execute all phases systematically and maintain an objective, data-driven approac | |
|
|
||
| ## agent: `metrics-extractor` | ||
| --- | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Using the |
||
| description: Reads shared repo-memory metric files and returns structured JSON with all relevant performance data | ||
| --- | ||
| You are a metrics extraction assistant. When given a newline-separated list of file paths (one path per line), read each file using bash and return a single JSON object containing all data found. | ||
|
|
@@ -613,7 +613,7 @@ Return the result as a single valid JSON object with no additional commentary. | |
|
|
||
| ## agent: `pattern-detector` | ||
| --- | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
| description: Classifies agent behavioral patterns from profiles and returns a structured categorization of issues found | ||
| --- | ||
| You are an agent behavior classification assistant. When given a JSON object containing agent profiles (with fields such as output counts, types, success rates, and resource usage), classify each agent's behavioral patterns. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -210,7 +210,7 @@ If all tests pass and this workflow was triggered by a pull_request event: | |
|
|
||
| ## agent: `file-summarizer` | ||
| --- | ||
| model: claude-haiku-4.5 | ||
| model: small | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🪨 |
||
| description: Summarizes the content of a file in a few concise sentences | ||
| --- | ||
| You are a file summarization assistant. When given a file path, read the file and return a brief summary (2–4 sentences) describing its purpose and key contents. Be concise and factual. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪨 Me see
model: smallhere. Good! No hard-code model name. Alias better - work forever, no break!