agent-model
Agent model must be one of: sonnet, opus, haiku, inherit
Rule Details
This rule enforces that the model field in agent markdown frontmatter is one of the allowed values: sonnet, opus, haiku, or inherit. Using an unrecognized model name will cause the agent framework to fail at initialization. Validation is delegated to the AgentFrontmatterSchema.shape.model Zod schema which uses the ModelNames enum. The inherit option tells the agent to use the parent conversation model.
Incorrect
Invalid model name
---
name: code-review
description: Reviews code for quality
model: gpt-4
---Model name with wrong casing
---
name: code-review
description: Reviews code for quality
model: Sonnet
---Correct
Valid model name
---
name: code-review
description: Reviews code for quality
model: sonnet
---Using inherit to match the parent model
---
name: code-review
description: Reviews code for quality
model: inherit
---How To Fix
Set the model field to one of: sonnet, opus, haiku, or inherit. Model names are case-sensitive and must be lowercase.
Options
This rule does not have any configuration options.
Related Rules
Resources
Version
Available since: v0.2.0