Skip to content

[P1] Replace fixed model routing with dynamic selection and pinned choices #32

Closed

Description

@anthonyandrei

Problem

The current policy publishes exact Gemini model IDs and role defaults. Model catalogs change across vendors, plans, and hosts. Those IDs should not define the public workflow contract.

Deliverable

Replace fixed public model routes with runtime selection through the adapter contract from #31.

Define stable internal preferences:

  • fast: minimize latency and cost for bounded work
  • balanced: default quality, speed, and cost
  • deep: spend more budget on difficult reasoning, planning, or review

Keep reasoning effort separate from the preference. Treat vendor family names such as Flash, Pro, Opus, Sonnet, and Haiku as adapter hints only.

The orchestrator must record and pin the selected choice for retries and resume.

Acceptance criteria

  • No published skill contract requires a vendor or exact model ID.
  • Adapters expose live model availability, supported effort levels, and relevant capabilities.
  • The orchestrator selects from current candidates using task requirements, static security constraints, availability, quota, and the internal preference.
  • A family hint never grants permissions or acts as a cross-vendor quality guarantee.
  • routing-outcomes.json records vendor, adapter, exact model ID, family hint, preference, effort, catalog or probe revision, selection reason, and every attempt.
  • Normal retries use the recorded model and effort.
  • Quota exhaustion or operational failure does not silently switch providers or models.
  • A missing pinned model requires an explicit, recorded fallback or handoff.
  • Fake catalogs cover unavailable models, changed catalogs, unsupported effort levels, and deterministic selection.
  • ADR 0005 is superseded by a new decision without deleting its historical record.

Dependencies

  • Depends on #31.

Out of scope

  • Benchmarking vendors.
  • Promising that a family name has identical meaning across vendors.
  • Letting model selection change security constraints.

Implementation pointers

  • model-policy.json
  • SKILL.md
  • README.md
  • docs/adr/0005-bound-model-routing-to-gemini-and-explicit-rules.md
  • scripts/run-agy-json.ps1
  • scripts/run-agy-json.sh
  • tests/test_model_routing.ps1
  • tests/test_model_routing.sh

Activity

  1. anthonyandrei commented on Sep 4, 2026

    @anthonyandrei
    OwnerAuthor

    Resolved by PR #39 (#39). The merged implementation covers this issue, and the targeted acceptance tests pass. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions