Skip to content

run: explicit --provider flag silently loses to agent frontmatter provider #1124

Description

@kokevidaurre

`squads run / --provider X` is silently ignored when the agent's frontmatter sets `provider:`. Resolution order in `src/lib/agent-runner.ts:313`:

```ts
const provider = normalizeProviderName(agentProvider || options.provider || squadDefaultProvider || 'anthropic');
```

An explicit CLI flag is the most deliberate signal the operator can give and should win over the agent's static default:

```ts
options.provider || agentProvider || squadDefaultProvider || 'anthropic'
```

Same question applies to `--model` vs frontmatter `model:` — audit both. Repro: any agent with `provider: "anthropic"` dispatched with `--provider glm` runs on anthropic with no warning. At minimum, warn when the flag is dropped; preferred fix is flag-wins precedence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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