Skip to content

Implement pi fullsend-models.js: cross-provider fallback chain, phases, and budget #6531

Open

Description

@fullsend-ai-triage

Context

Split from the runtime parity backlog (#6527).

Problem

The pi runtime needs cross-provider model fallback, phased model selection, and budget awareness. Currently, Claude --fallback-model + pi provider choice via env suffice for near-term needs, but a proper fullsend-models.js extension is needed for robustness.

Scope

  • Implement pi.setModel on auto_retry_start / model errors, skipping providers without credentials
  • phases may move only execution of a fixed plan, never the deciding phase
  • --models scoping for per-run model lists
  • model_select → ModelSwitchEvent for observability

Design constraints

  • Harness schema untouched (no runtime: in harnesses)
  • Everything pi-specific stays inside the pi runtime
  • The deciding session (triage, adjudication, synthesis) is never downgraded — cheaper or other-vendor models only for delegated, well-scoped work or execution of an already-fixed plan
  • Every override is echoed back

Related

Activity

  1. fullsend-ai-prioritize commented on Aug 26, 2026

    @fullsend-ai-prioritize

    RICE Priority Score: 0.6

    Score breakdown
    Dimension Score Reasoning
    Reach 1.5 This issue affects users of the pi runtime and references fleet enablement (agents#935), suggesting it impacts multiple strategic customers deploying pi at scale. It is split from a runtime parity backlog (#6527), indicating it is part of bringing pi to production-grade parity for broader adoption.
    Impact 1 The issue adds cross-provider fallback (resilience), budget awareness (cost control), and phased model selection (cost/quality optimization). A partial workaround exists today (Claude --fallback-model + env), but the issue notes it is insufficient for robustness. This is a noticeable workflow improvement but not blocking since the workaround suffices near-term.
    Confidence 0.6 The issue is reasonably well-scoped with clear design constraints and enumerated deliverables, but there are no comments, labels, or milestone for additional context. Filed by a triage bot as a decomposition, so the scope is structured but I lack direct customer feedback or architectural details to fully gauge reach and effort.
    Effort 1.5 The scope spans multiple components: pi.setModel with retry/error handling, phases support with constraints on deciding sessions, --models CLI scoping, and ModelSwitchEvent observability. Design constraints (harness schema untouched, pi-specific isolation) add care but limit blast radius. This is moderate work touching multiple pieces with some design consideration.

    Formula: (1.5 x 1 x 0.6) / 1.5 = 0.6

  2. waynesun09 commented on Sep 12, 2026

    @waynesun09
    Member

    Scope note from the routing-policy ADR draft (#7251), for when this extension is picked up.

    Alongside phases, budget and the fallback chain, fullsend-models.js is the natural home for an advise tool: the worker keeps its session model and asks a stronger one at a decision point (a plan, an unstick), instead of the whole session moving to a more expensive model. pi already exposes the seam: an extension can call any registered model out of band without changing the session model.

    Constraints that should carry over from the existing design rules:

    This is a follow-on, not a change to this issue's scope; noting it here so the two designs share the manifest and the accounting.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions