Skip to content

Feature: per-task-class model lanes with ordered fallbacks for swarm workers #1497

Description

@ianalitis

Problem

Swarm workers get one default (agents.swarm_model) plus a per-spawn model override, and quota fallback is a single global list (provider.quota_fallback). A coordinator that routes by task class (cheap readers, routine implementation, hard iteration, long-context review, frontier review) has to repeat the model id in every spawn and cannot declare an ordered fallback per class. With model prices and availability changing weekly, those ids end up scattered across prompts and plans.

Proposal (small, opt-in)

[agents.lanes]
reader = ["opencode-go:mimo-v2.5", "opencode-go:deepseek-v4.1-flash"]
builder = ["opencode-go:deepseek-v4.1-flash", "opencode-go:glm-5.3-flash"]
reviewer = ["openai-oauth:gpt-5.6-terra"]
  • The swarm tool accepts lane = "reader" as an alternative to model; it resolves to the first available route in the list.
  • Moving to the next entry happens only before a spawn starts, is recorded in the spawn's metadata and is visible in the UI. There is no silent mid-turn substitution, which keeps the existing no-hidden-failover behavior.
  • No [agents.lanes] table means the behavior is unchanged.

Why upstream

It's generic (any provider mix), small (config parsing plus one resolution step at spawn), and removes a class of prompt-level bookkeeping. I'm happy to implement it if the shape fits. Filing it as an issue first per CONTRIBUTING.

Activity

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

    area: configConfiguration, defaults, and environment overrides.area: swarmMulti-agent coordination, workers, and task orchestration.enhancementNew feature or requesttriage: needs-decisionNeeds maintainer decision/design thought

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions