Skip to content

add cli argument for model config#232

Merged
kevinbackhouse merged 7 commits into
mainfrom
cli_model_config
Jun 1, 2026
Merged

add cli argument for model config#232
kevinbackhouse merged 7 commits into
mainfrom
cli_model_config

Conversation

@m-y-mo
Copy link
Copy Markdown
Contributor

@m-y-mo m-y-mo commented Apr 27, 2026

Allow model config file to be passed via cli argument when running taskflows

Copilot AI review requested due to automatic review settings April 27, 2026 15:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for specifying a model configuration reference via a CLI option when running taskflows, allowing the CLI-provided value to override the taskflow’s embedded model_config_ref.

Changes:

  • Add --model-config/-m option to the Typer CLI.
  • Thread the CLI model config through run_main(...).
  • Override taskflow_doc.model_config_ref with the CLI-provided value during taskflow execution.
Show a summary per file
File Description
src/seclab_taskflow_agent/cli.py Adds --model-config option and forwards it into run_main.
src/seclab_taskflow_agent/runner.py Accepts cli_model_config and uses it to override the taskflow’s model config reference.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 4

Comment thread src/seclab_taskflow_agent/cli.py Outdated
Comment thread src/seclab_taskflow_agent/runner.py
Comment thread src/seclab_taskflow_agent/runner.py
Comment thread src/seclab_taskflow_agent/cli.py Outdated
Copilot AI review requested due to automatic review settings April 27, 2026 18:10
kevinbackhouse
kevinbackhouse previously approved these changes Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new

Copy link
Copy Markdown
Contributor

@anticomputer anticomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address PR feedback.

@m-y-mo
Copy link
Copy Markdown
Contributor Author

m-y-mo commented Apr 28, 2026

Addressed first two copilot comments. Not entirely sure what meaningful unit test we can put in with the current infrastructure. (test_cli.py tests argument parsing but there isn't really any parsing involved, just a string, test_runner.py test taskflow parsing, which isn't the right place either)

Copilot AI review requested due to automatic review settings May 12, 2026 15:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 4

Comment thread src/seclab_taskflow_agent/runner.py Outdated
Comment thread src/seclab_taskflow_agent/runner.py
Comment thread src/seclab_taskflow_agent/cli.py
Comment thread src/seclab_taskflow_agent/cli.py Outdated
@kevinbackhouse
Copy link
Copy Markdown
Collaborator

@anticomputer: are your requested changes resolved?

Copy link
Copy Markdown
Contributor

@anticomputer anticomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed: added TestCliModelConfigOverride test suite (6 tests) in test_runner.py covering override precedence, resolution via _resolve_model_config, session persistence, and resume behavior. Also added 2 session-level tests in test_session.py for cli_model_config persistence and defaults.

Comment thread tests/test_runner.py Fixed
m-y-mo and others added 5 commits June 1, 2026 12:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Fix docstring arg order: match resume_session_id, cli_model_config
  parameter order in run_main signature
- Persist cli_model_config in TaskflowSession for deterministic resume:
  restored automatically on resume, can be explicitly overridden with
  --model-config
- Add TestCliModelConfigOverride test suite (6 tests) covering override
  precedence, resolution, session persistence, and resume behavior
- Add session-level tests for cli_model_config persistence and defaults

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add -m to architecture diagram CLI flags listing
- Document model config persistence in session recovery section
- Add CLI override subsection under Model configs with usage example

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@anticomputer
Copy link
Copy Markdown
Contributor

@anticomputer: are your requested changes resolved?

they are now 👍

@kevinbackhouse kevinbackhouse merged commit a898e69 into main Jun 1, 2026
9 checks passed
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.

5 participants