docs: document squad config model CLI command#660
docs: document squad config model CLI command#660diberry wants to merge 1 commit intobradygaster:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new reference page documenting the squad config model CLI command and wires it into the docs site navigation and build validation so it’s included in the published reference section.
Changes:
- Add new
reference/config-modeldocumentation (syntax, examples, resolution hierarchy, validation). - Add “Config Model” to the docs navigation and reference page build expectations.
- Update CLI reference to include
squad config modelcommand entries.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| test/docs-build.test.ts | Updates expected reference slugs so the docs build test requires the new page output. |
| docs/src/navigation.ts | Adds “Config Model” to the Reference navigation section. |
| docs/src/content/docs/reference/config-model.md | New reference page describing squad config model behavior, config format, and model resolution layering. |
| docs/src/content/docs/reference/cli.md | Updates the command list to include squad config model entries and updates the header count. |
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | `version` | `number` | Config schema version (always `1`) | | ||
| | `defaultModel` | `string \| null` | Model ID applied to all agents. `null` means auto-selection. | |
There was a problem hiding this comment.
The defaultModel field is documented as string | null with null meaning auto-selection, but the implementation reads defaultModel only when it’s a non-empty string and clears the override by deleting the defaultModel key from .squad/config.json (not writing null). Update the schema/type description to reflect the actual persisted format (optional string; absence = auto), and consider noting that null is treated the same as “unset” if present.
| | `defaultModel` | `string \| null` | Model ID applied to all agents. `null` means auto-selection. | | |
| | `defaultModel` | `string` (optional) | Model ID applied to all agents. When omitted, Squad uses automatic model selection. If `null` is present, it is treated the same as unset/absent. | |
There was a problem hiding this comment.
Fixed — clarified defaultModel as optional string, removal from config.json = auto-selection
| ## Available models | ||
|
|
||
| Squad validates model names against the built-in catalog. Invalid names are rejected with a list of valid options. | ||
|
|
||
| | Tier | Models | | ||
| |------|--------| |
There was a problem hiding this comment.
The “Available models” list is incomplete vs the SDK’s MODEL_CATALOG (e.g., it omits claude-sonnet-4.5 and gpt-5.1-codex-max). Since this section is meant to mirror validation output, it should either match MODEL_CATALOG exactly or avoid hard-coding a list that can go stale.
| ## Available models | |
| Squad validates model names against the built-in catalog. Invalid names are rejected with a list of valid options. | |
| | Tier | Models | | |
| |------|--------| | |
| ## Model tiers (examples) | |
| Squad validates model names against the built-in `MODEL_CATALOG`. Invalid names are rejected with a list of valid options. The table below is a **non-exhaustive snapshot** of common models by tier; the actual catalog may include additional or newer models. | |
| | Tier | Example models | | |
| |------|----------------| |
There was a problem hiding this comment.
Fixed — marked model list as non-exhaustive snapshot, noted that hard-coded list may drift
|
|
||
| - [Model selection](/features/model-selection/) — full explanation of the 5-layer hierarchy, fallback chains, and economy mode | ||
| - [Switching models](/scenarios/switching-models/) — scenario guide for budget vs. quality tradeoffs | ||
| - [Configuration reference](/reference/config/#model-configuration) — `.squad/config.json` schema and related config files |
There was a problem hiding this comment.
The “Configuration reference” link claims to cover the .squad/config.json model schema, but the linked section currently documents a different model config file (model-config.json) and an older resolution order. Either update the linked reference page to match the new .squad/config.json model preferences, or adjust this “See also” entry to point to the page that actually documents defaultModel/agentModelOverrides.
| - [Configuration reference](/reference/config/#model-configuration) — `.squad/config.json` schema and related config files | |
| - [Configuration reference](/reference/config/#model-configuration) — other Squad configuration files and settings |
There was a problem hiding this comment.
Fixed — See also link now correctly points to reference/api-reference
| --- | ||
|
|
||
| ## CLI Commands (16 commands) | ||
| ## CLI Commands (20 commands) |
There was a problem hiding this comment.
The “CLI Commands (20 commands)” count doesn’t match the number of command rows in the table below. To avoid this getting out of sync, either remove the hard-coded count or compute it based on the table contents.
| ## CLI Commands (20 commands) | |
| ## CLI Commands |
There was a problem hiding this comment.
Fixed — removed hard-coded command count from CLI section heading
| @@ -87,6 +87,7 @@ export const NAV_SECTIONS: NavSection[] = [ | |||
| { title: 'SDK Integration', slug: 'reference/integration' }, | |||
| { title: 'Tools & Hooks', slug: 'reference/tools-and-hooks' }, | |||
| { title: 'Config', slug: 'reference/config' }, | |||
| { title: 'Config Model', slug: 'reference/config-model' }, | |||
There was a problem hiding this comment.
In the Reference nav, the “SDK API Reference” item uses slug reference/api, but the docs page filename (and build output) is reference/api-reference. This likely creates a broken navigation link; update the slug to match the actual route (or rename the page to match the slug).
There was a problem hiding this comment.
Fixed — updated SDK API Reference nav slug to reference/api-reference
| | `squad config model` | Show, set, or clear [model preferences](/reference/config-model/) | Yes | | ||
| | `squad config model <name>` | Set the default model for all agents | Yes | | ||
| | `squad config model <name> --agent <a>` | Pin a model to a specific agent | Yes | | ||
| | `squad config model --clear` | Clear the default model override | Yes | |
There was a problem hiding this comment.
The CLI table includes several squad config model variants, but it omits the supported squad config model --clear --agent <name> form (which is documented on the config-model page and implemented in the CLI). Consider adding that row for completeness/consistency with the other variants listed.
There was a problem hiding this comment.
Fixed — added squad config model --clear --agent variant to CLI reference table
|
@copilot apply changes based on the comments in this thread |
1 similar comment
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9f57795 to
ef5a913
Compare
|
Closing -- will re-open via fork-first pipeline when fully polished. |
Documents the config model CLI command with syntax, examples, and 5-layer model resolution hierarchy.
Team Review