---
title: "MGS1052: a model tier declaration cannot be used"
description: Fires when a magusfile's magus\job.modelTiers or magus\job.modelTier call names tiers, a default, a harness or a matrix that magus cannot use. The load stops.
tags: [MGS1052, magusfile, jobs, model-tiers]
---

# MGS1052: a model tier declaration cannot be used

magus stops loading a workspace when a `magus\job.modelTiers` or
`magus\job.modelTier` call cannot be used as written:

- `tiers` is not an enum, or the enum has no cases;
- `default` is not a case of that enum;
- a key in `hosts` is not the harness id that `magus\harness.provider`
  returns, or names a harness the magusfile did not wire;
- `hosts`, `bounds` or `skills` raises, or answers a case with the wrong type, an
  empty model alias, a negative bound, or two cases the same alias on one host;
- `magus\job.modelTier` is not given a function;
- a call is made twice, or from a project's magusfile instead of the root one.

The error names the call and the case it failed on.

## Why

A declaration that failed to register would leave a workspace that reads as
tiered while every job gets the default, and a mapping that names a harness
nothing wired would pick no model at all. Both stay invisible until a job runs,
so the load refuses instead.

## Resolution

- **Declare an enum and pass it.** `enum ModelTier { economy, standard, principal }`,
  cheapest first, then `magus\job.modelTiers(ModelTier, default: ModelTier.standard, ...)`.
- **Key `hosts` by the harness.** Keep what `magus\harness.provider` returns when
  you wire the harness, and use it as the key.
- **Cover every case.** Write `hosts`, `bounds` and `skills` as exhaustive `match`
  expressions, so a tier added to the enum fails `magus check` until each covers it.
- **Call each member once, in the root magusfile.**
- **Turn tiers off with `magus\job.modelTiers(null)`** when the workspace wants none.

See [model tiers](../../../guides/jobs/model-tiers.md).
