{"record":{"id":"e5c36c541d8fd9b6","repo":"coleam00/Archon","slug":"alias-name-name-is-reserved-small-medium-lar","errorCode":null,"errorMessage":"Alias name '${name}' is reserved (small/medium/large are tier keywords). Use a different name.","messagePattern":"Alias name '(.+?)' is reserved \\(small/medium/large are tier keywords\\)\\. Use a different name\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workflows/src/model-validation.ts","lineNumber":85,"sourceCode":"const TIER_FALLBACK: Record<TierName, readonly TierName[]> = {\n  large: ['large', 'medium', 'small'],\n  medium: ['medium', 'large', 'small'], // prefer over-capable (large) when both sides missing\n  small: ['small', 'medium', 'large'],\n};\n\nconst TIER_DEFAULTS = tierDefaults as Record<\n  string,\n  Record<TierName, { model: string; effort?: string }>\n>;\n\n/** True when `value` is one of the reserved tier keywords (small/medium/large). */\nexport function isTierName(value: string): value is TierName {\n  return (TIER_NAMES as readonly string[]).includes(value);\n}\n\nfunction assertNotReserved(name: string): void {\n  if (isTierName(name)) {\n    throw new Error(\n      `Alias name '${name}' is reserved (small/medium/large are tier keywords). Use a different name.`\n    );\n  }\n}\n\nfunction assertCustomAliasPrefix(name: string): void {\n  if (!name.startsWith('@')) {\n    throw new Error(\n      `Alias name '${name}' must start with '@' (e.g. '@${name}'). Reserved tier names (small/medium/large) do not need '@'.`\n    );\n  }\n}\n\nfunction assertValidEntry(name: string, entry: RawAliasEntry): void {\n  if (typeof entry.provider !== 'string' || entry.provider.length === 0) {\n    throw new Error(`Alias '${name}' has invalid provider — must be a non-empty string.`);\n  }\n  if (typeof entry.model !== 'string' || entry.model.length === 0) {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/model-validation.ts#L67-L103","documentation":"The model alias resolver reserves the tier keywords `small`, `medium`, and `large` for its built-in tier fallback system. `assertNotReserved` throws when a custom alias is defined using one of these names, because a custom alias would shadow or collide with tier lookup.","triggerScenarios":"Defining an alias named `small`, `medium`, or `large` in the `aliases:` config section, a run-model assignment, or a preset override target — any path that calls `buildAiProfile`, `presetForOverrideTarget`, or `parseRunModelAssignments` with that name.","commonSituations":"Users copying an entry from `tiers:` into `aliases:` without renaming it, intending to override tier defaults but placing the entry in the wrong config section.","solutions":["Rename the alias to a non-reserved name (any name other than small/medium/large)","If the goal is to override what `small`/`medium`/`large` resolve to, put the entry under `tiers:` instead of `aliases:`","Custom aliases must also start with `@` — e.g. `@small-model`"],"exampleFix":"# before\naliases:\n  large:\n    provider: anthropic\n    model: claude-opus-4\n# after\naliases:\n  '@big':\n    provider: anthropic\n    model: claude-opus-4","handlingStrategy":"validation","validationCode":"import { isTierName } from '@archon/workflows/model-validation';\n// Reject reserved alias names before writing config.\nif (isTierName(aliasName)) {\n  throw new Error(`'${aliasName}' is a reserved tier keyword; use tiers: config or pick another name`);\n}","typeGuard":"function isSafeAliasName(name: string): boolean {\n  return !['small', 'medium', 'large'].includes(name);\n}","tryCatchPattern":"try {\n  const profile = buildAiProfile(rawConfig);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('is reserved (small/medium/large')) {\n    throw new Error(`Config error: move the '${err.message.match(/'([^']+)'/)?.[1]}' entry into tiers: or rename it`, { cause: err });\n  }\n  throw err;\n}","preventionTips":["Never name custom aliases small, medium, or large — reserve those words for tiers:","Use tier overrides in the tiers: section when you want to change tier behavior","Adopt a naming convention like @-prefixed kebab-case names for aliases","Validate alias config with a schema/lint step before loading"],"tags":["config","model-alias","naming","validation"],"backgroundTag":"reserved-identifier","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}