Pull Models From Provisioned Roles

Reference abstract capability roles in code rather than model names — let external configuration map roles to models, so routing decisions survive model changes without code changes.

What it is

Hardcoding model names in orchestration code creates a brittle dependency: every time a provider releases a better model, deprecates an old one, or changes pricing, every reference in the codebase must be updated. The pattern is to decouple routing intent from model identity by expressing capability requirements as named roles — "fast", "reasoning", "writing", "coding" — and resolving those roles to specific model names at runtime from a provisioned configuration. The calling code expresses what it needs ("I need a model with reasoning capability here"), not which model satisfies that need. Configuration maps the role to the current best model for that capability tier. When a better model becomes available or a cheaper equivalent covers the same role, the configuration changes; the calling code does not. This separation also enables per-environment overrides: a development environment can map all roles to a single cheap model; a production environment can map each role to the optimal choice for that tier. The role is the stable identity. The model is the implementation.

When to reach for it

When NOT to

Exemplars

Related