AcceptedFebruary 2026

Model Capability Profiles

Capability profile abstraction that keeps workflows model-agnostic while optimizing behavior for gpt-5.2, gpt-5.3, claude-opus, and claude-sonnet.

Context

Lex targets multiple model families with different context windows, output behavior, and reasoning controls. Without an explicit profile layer, model-specific behavior leaked into prompts and workflow logic, causing prompt shape divergence, inconsistent long workflow behavior, and hard-to-test capability assumptions.

Core Decisions

1. Fixed Profile Set with Deterministic Mapping

Five profiles with deterministic identity matching:

gpt-5.3
gpt-5.2
claude-opus
claude-sonnet
baseline

2. Capability Matrix Governs Prompt Strategy

Each profile defines support and limits for:

  • Effort hints
  • Compaction strategy
  • Large context handling
  • Large output handling

Workflows remain neutral; profile logic injects model-specific guidance at runtime.

3. Fallback Behavior Prioritizes Safety

Unknown models map to baseline, which uses conservative defaults: no advanced effort assumptions, explicit manual compaction guidance, and tighter context/output expectations.

The baseline fallback ensures that newly added or unrecognized models degrade gracefully rather than failing unpredictably.

4. Profile Logic Is Centralized

Model behavior tuning lives in instructions and tests, not scattered in workflow YAML. This prevents per-workflow drift.

5. Capability Coverage Is Test-Gated

Regression tests verify that targeted model identifiers resolve to expected profiles and behavior flags.

Profile Resolution Flow

1

Runtime Model Identity

The current model identifier is detected at execution time.

2

Profile Mapper

Deterministic mapping resolves the model to one of five profiles.

3

Prompt Builder

Profile-specific behavior controls are injected into the prompt strategy.

4

Workflow Step Execution

The step executes with model-appropriate effort, context, and compaction settings.

Key References

.github/copilot/instruction-model-capabilities.md.github/agents/@lex.agent.md.github/tests/model-capabilities.test.ts

Trade-offs

Stable behavior across supported model families. Cleaner workflow definitions without model forks. Safer onboarding path for new model IDs.
Stale mappings can degrade behavior. Over-generalized profiles can miss nuanced model differences. Baseline fallback may underutilize newly added models.