Skip to content

feat(run): support per-session routing matrix via --matrix#236

Open
ramparte wants to merge 1 commit into
mainfrom
feat/cli-session-matrix
Open

feat(run): support per-session routing matrix via --matrix#236
ramparte wants to merge 1 commit into
mainfrom
feat/cli-session-matrix

Conversation

@ramparte

Copy link
Copy Markdown
Contributor

What

Adds the ability to select a routing matrix per session on the command line, akin to --bundle for per-session bundle selection.

amplifier run --matrix anthropic "your prompt"

How

  • New --matrix <name> Click option on run.
  • When supplied, injects default_matrix into the mounted hooks-routing config within the prepared bundle's mount_plan — the same mount-plan mutation pattern already used for --provider (run.py). This mirrors newtui's inject_routing_config bridge.
  • Nothing is persisted to settings; scope is strictly this session.
  • If the bundle does not mount hooks-routing, a clear warning is printed and launch continues (no crash).

Scope is deliberately minimal: no persistent routing use subcommand or settings changes in this PR.

Tests

tests/test_run_matrix_flag.py (3 tests, all passing):

  • run --matrix foo sets default_matrix on the hooks-routing entry, leaves unrelated hooks untouched
  • omitting --matrix injects nothing
  • missing hooks-routing → warns and continues, no mutation

Add a --matrix option to the run command, mirroring --bundle for
per-session selection. When supplied, it injects default_matrix into the
mounted hooks-routing config within the prepared bundle's mount plan;
nothing is persisted to settings (scope is strictly this session). If the
bundle does not mount hooks-routing, a warning is printed and launch
continues.

  amplifier run --matrix anthropic "your prompt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant