Model Catalog
Choose which model each kind of work uses, and fall back to the next model
when one is rate limited, out of quota or unavailable. Built for agent
steps run with @cachehit/agents (Kiro CLI).
You own the catalog: each role (for example implementer, reviewer,
classifier) has ordered tiers of {model, costClass, toolProfile, effort}.
resolveDispatch stores the tier a step should use for one
(workItem, role, attempt). Given a failure class, or the newest failed
@cachehit/agents invocation for the work item, it advances on
rate-limit, quota and model-unavailable, stays on other failures,
and parks when tiers or attempts run out. Results are idempotent per
(workItem, role, attempt).
Quick Start
swamp extension pull @cachehit/model-catalog
swamp model create @cachehit/model-catalog catalog --global-arg 'catalog={
"version": "1",
"roles": {
"implementer": {"tiers": [
{"model": "claude-haiku-4.5", "costClass": "low", "toolProfile": "actor"},
{"model": "claude-sonnet-4.6", "costClass": "medium", "toolProfile": "actor"}
]},
"reviewer": {"tiers": [
{"model": "claude-opus-4.8", "costClass": "high", "toolProfile": "readonly"}
]}
}
}'
swamp model method run catalog resolveDispatch \
--input workItem=WI-42 --input role=implementer --input instanceName=kiro
swamp data get catalog dispatch--WI-42--implementer--1 --jsonMethods
- resolveDispatch: store the model, tool profile and effort for one attempt, applying a fallback when a failure signal is given or read.
- recordFallback: store only the fallback decision for a signal.
First release. resolveDispatch and recordFallback select a Kiro model per role from your catalog and fall back to the next tier on rate limits, quota and unavailable models, reading failures from @cachehit/agents.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| roleMap? | record | Folds your own role names onto catalog roles, for example {"security-review":"reviewer"} |
| signalTagKeys? | object | Invocation tag keys that identify the work item and phase of an agent run |
| Argument | Type | Description |
|---|---|---|
| instanceName | string | Agent step or model instance; recorded unchanged |
| attempt? | number | |
| currentTier? | number | Tier the previous attempt ran on; inferred from the failed invocation's model when read from agentModel, else 0 |
| agentModel? | string | @cachehit/agents model instance to read invocations from; defaults to instanceName |
| Argument | Type | Description |
|---|---|---|
| currentTier? | number | |
| attempt? | number |
Resources
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned