Model Configuration
Relevant source files
The following files were used as context for generating this wiki page:
- cli-tool/docs_to_claude/COMMANDS_GUIDE.md
- cli-tool/components/agents/documentation/se-technical-writer.md
- cli-tool/components/agents/expert-advisors/specification.md
- cli-tool/components/agents/data-ai/hlbpa.md
- cli-tool/components/agents/documentation/arch.md
- cli-tool/templates/javascript-typescript/CLAUDE.md
Model configuration within the Claude Code Templates ecosystem defines how AI agents and custom commands interact with specific Large Language Models (LLMs). It allows developers to specify which model variant should handle a given task—ranging from fast, cost-effective models for simple utility scripts to high-intelligence models for complex architectural analysis. This configuration is managed through Markdown frontmatter and system-level environment variables.
The scope of model configuration covers model selection, tool access permissions, and behavioral constraints such as "extended thinking" or character budgets for command discovery. This ensures that the AI operates within the technical and financial boundaries defined by the project or the individual user.
Model Selection and Frontmatter
Model selection is primarily handled at the individual agent or command level through YAML frontmatter. This allows a project to be "poly-model," using the most appropriate engine for each specific workflow.
Available Model Tiers
The system typically supports three tiers of Claude models, each optimized for different performance profiles:
| Model Identifier | Tier Name | Characteristics |
|---|---|---|
claude-3-5-sonnet-20241022 | Sonnet (Default) | Balanced performance, high intelligence, and speed. |
claude-3-5-haiku-20241022 | Haiku | Faster execution, lower cost, ideal for simple tasks. |
claude-3-opus-20240229 | Opus | Most capable for complex reasoning and deep architectural tasks. |
Sources: cli-tool/docs_to_claude/COMMANDS_GUIDE.md:120-123, cli-tool/components/agents/documentation/se-technical-writer.md:12-14
Implementation in Commands and Agents
Configurations are embedded directly into the header of .md files. This metadata is parsed by the CLI tool to initialize the session with the correct parameters.
---
name: example-agent
description: A specialized agent
model: sonnet
allowed-tools: Read, Edit, Bash
---
Sources: cli-tool/components/agents/documentation/se-technical-writer.md:6-14, cli-tool/docs_to_claude/COMMANDS_GUIDE.md:95-123
Tooling and Permission Constraints
Model configuration is inseparable from tool permissions. The allowed-tools field restricts what the model can do when a specific command or agent is invoked, preventing unauthorized shell execution or file modifications.
Permission Hierarchy
- Command Scoped: Defined in the command's frontmatter.
- Interactive Scoped: Managed via the
/permissionscommand during a session. - Environment Scoped: System-wide restrictions applied via CLI configuration.
The diagram above shows the logic flow for applying tool permissions during model execution.
Sources: cli-tool/docs_to_claude/COMMANDS_GUIDE.md:104-114, cli-tool/docs_to_claude/COMMANDS_GUIDE.md:310-318
Behavioral Parameters
Beyond model selection, configuration includes parameters that govern how the model processes information and interacts with the user.
Extended Thinking Mode
For complex tasks, the model can be configured to use "Extended Thinking." This is triggered by including <thinking> tags in the prompt structure, allowing the model to perform internal reasoning before providing a final output.
Sources: cli-tool/docs_to_claude/COMMANDS_GUIDE.md:162-171
Character Budgets and Discovery
The SlashCommand tool, which allows Claude to discover and invoke other custom commands, uses a character budget to manage token usage.
- Default Budget: 15,000 characters.
- Configuration Variable:
SLASH_COMMAND_TOOL_CHAR_BUDGET. - Purpose: Limits the amount of metadata (descriptions and names) injected into the context to prevent token overflow.
Sources: cli-tool/docs_to_claude/COMMANDS_GUIDE.md:329-338
Architectural Documentation Configuration
Specialized agents like the "High-Level Big Picture Architect" (HLBPA) have specific configuration requirements for outputting structured data and diagrams.
Artifact Type Mapping
Architectural models are configured to produce specific outputs based on the artifactType parameter:
| Artifact Type | Default Diagram Engine | Target Output |
|---|---|---|
doc | Mermaid (flowchart) | Narrative overview |
diagram | Mermaid (flowchart) | Standalone visualization |
testcases | Mermaid (sequence) | Validation documentation |
entity | Mermaid (er or class) | Data relationship models |
Sources: cli-tool/components/agents/data-ai/hlbpa.md:121-131
Diagram Configuration Logic
Models are strictly constrained to use Mermaid syntax for all visual representations. Configuration rules for these diagrams include:
- Use
flowchart TDorflowchart LRfor layout. - Use alphanumeric characters and underscores for Node IDs.
- Accessibility requirements: Must include
accTitle:andaccDescr:within the code block.
This sequence illustrates how the CLI tool uses configuration files to initialize an LLM session.
Sources: cli-tool/components/agents/data-ai/hlbpa.md:92-109, cli-tool/components/agents/documentation/arch.md:129-135
Summary
Model configuration in this project provides a granular control plane for AI behavior. By leveraging Markdown frontmatter, developers can precisely match task complexity with model capability while maintaining strict security boundaries through the allowed-tools directive. This structure enables a flexible yet secure development environment where agents are equipped with the exact resources and intelligence required for their specific domain.