Skip to content

docs: document squad config model CLI command#660

Closed
diberry wants to merge 1 commit intobradygaster:devfrom
diberry:squad/68-config-model-docs
Closed

docs: document squad config model CLI command#660
diberry wants to merge 1 commit intobradygaster:devfrom
diberry:squad/68-config-model-docs

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Mar 27, 2026

Documents the config model CLI command with syntax, examples, and 5-layer model resolution hierarchy.

Team Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-model documentation (syntax, examples, resolution hierarchy, validation).
  • Add “Config Model” to the docs navigation and reference page build expectations.
  • Update CLI reference to include squad config model command 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. |
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
| `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. |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — clarified defaultModel as optional string, removal from config.json = auto-selection

Comment on lines +160 to +165
## Available models

Squad validates model names against the built-in catalog. Invalid names are rejected with a list of valid options.

| Tier | Models |
|------|--------|
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
## 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 |
|------|----------------|

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- [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

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — See also link now correctly points to reference/api-reference

Comment thread docs/src/content/docs/reference/cli.md Outdated
---

## CLI Commands (16 commands)
## CLI Commands (20 commands)
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
## CLI Commands (20 commands)
## CLI Commands

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — removed hard-coded command count from CLI section heading

Comment thread docs/src/navigation.ts Outdated
Comment on lines +86 to +90
@@ -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' },
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — updated SDK API Reference nav slug to reference/api-reference

Comment on lines +45 to +48
| `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 |
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — added squad config model --clear --agent variant to CLI reference table

@bradygaster
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

1 similar comment
@bradygaster
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

@diberry diberry marked this pull request as draft March 28, 2026 14:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/68-config-model-docs branch from 9f57795 to ef5a913 Compare March 28, 2026 14:23
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 28, 2026

Closing -- will re-open via fork-first pipeline when fully polished.

@diberry diberry closed this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants