Skip to content

feat(config): support curated model validation list for cheap, standard, and premium tiers #276

@kumaakh

Description

@kumaakh

Problem Description

Currently, Apra Fleet resolves cheap, standard, and premium tiers to hardcoded provider models. As we introduce user-configurable model tier selection (across all supported providers: Claude, Gemini, Codex, Copilot, and Google Antigravity "agy"), allowing users to configure any arbitrary model string can lead to configuration errors, runtime failures, or accidental high costs.

To ensure robust configurations, we need to enforce that the user's selected models for each tier come from a curated list of compatible, tested options for that specific provider.

Proposed Solution

Implement validation and restriction in the configuration loader/validator (e.g., config parser in src/cli/config.ts or config/schema settings) to check that configured models for each tier fall within a curated list of valid contenders for the active provider:

  1. Provider-Specific Curated Tier Options:

    • For Google Antigravity (agy):
      • cheap options: gpt-oss-120b, gemini-3.1-flash-lite-preview
      • standard options: gpt-oss-120b, gemini-3.5-flash, claude-sonnet-4.6
      • premium options: claude-sonnet-4.6, claude-opus-4.6
    • For Claude:
      • cheap options: claude-haiku-4-5
      • standard options: claude-sonnet-4-6
      • premium options: claude-sonnet-4-6, claude-opus-4-6
    • For Gemini:
      • cheap options: gemini-3.1-flash-lite-preview
      • standard options: gemini-3-flash-preview
      • premium options: gemini-3.1-pro-preview
    • Similar mappings should be added for Codex and Copilot.
  2. Validation Logic:

    • When loading configuration (such as settings.json or config arguments), detect the active provider and validate that each tier's selected model matches one of the curated options for that provider.
    • Throw a descriptive error or warning during initialization if an unsupported model is configured.
  3. Sane Defaults:

    • If no custom model is mapped for a tier, fall back to the provider's standard default tier mapping.

Alternatives Considered

Allowing free-form string entries. However, this is highly error-prone and can lead to users setting standard/premium logic tasks to underpowered models, or using models with incompatible formatting expectations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions