Skip to content

Conversation

@m-y-mo
Copy link
Contributor

@m-y-mo m-y-mo commented Oct 22, 2025

Add model_config file so that models can be specified with *-latest etc. instead of a specific version. Also fix a bug that model specified in a taskflow is not currently passed to the CAPI.

Copilot AI review requested due to automatic review settings October 22, 2025 16:54
Copy link
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

This PR adds support for model configuration files that allow taskflows to specify models using aliases (e.g., gpt_latest) instead of hardcoded version strings. It also fixes a bug where the model parameter specified in a taskflow was not being passed to the agent deployment.

Key changes:

  • Added model configuration file support with a model_config filetype
  • Fixed bug where taskflow-specified models were not passed to the CAPI
  • Updated taskflow example to use model alias instead of hardcoded version

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
configs/model_config.yaml New configuration file defining model aliases (gpt_latest, sonnet_latest, etc.)
available_tools.py Added model_config dictionary and parsing logic for model_config filetype
main.py Added model config resolution logic and fixed model parameter passing to agents
taskflows/CVE-2023-2283/CVE-2023-2283.yaml Updated to reference model config and use gpt_latest alias

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +461 to +463
model = task_body.get('model', DEFAULT_MODEL)
if model in model_keys:
model = model_dict[model]
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

Variable model_keys is referenced before it may be defined. If model_config is not provided or model_dict is empty, model_keys will be undefined, causing a NameError. Initialize model_keys as an empty list before the conditional blocks or move the model resolution inside the if model_dict: block.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +9
models:
sonnet_default: claude-sonnet-4
sonnet_latest: claude-sonnet-4.5
gpt_default: gpt-4.1
gpt_latest: gpt-5 No newline at end of file
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

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

The models key is at the wrong indentation level. Based on the code in main.py that accesses model_dict.get('models', {}), this key should be nested under the seclab-taskflow-agent header, not at the root level.

Suggested change
models:
sonnet_default: claude-sonnet-4
sonnet_latest: claude-sonnet-4.5
gpt_default: gpt-4.1
gpt_latest: gpt-5
models:
sonnet_default: claude-sonnet-4
sonnet_latest: claude-sonnet-4.5
gpt_default: gpt-4.1
gpt_latest: gpt-5

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@m-y-mo m-y-mo merged commit db07b1f into main Oct 23, 2025
5 checks passed
@m-y-mo m-y-mo deleted the add_model_config branch October 23, 2025 07:35
@p-
Copy link
Contributor

p- commented Oct 23, 2025

smoke test

@github-actions
Copy link

⚠️ Cannot proceed with deployment

Your branch is behind the base branch and will need to be updated before deployments can continue.

  • mergeStateStatus: UNKNOWN
  • update_branch: warn

Please ensure your branch is up to date with the main branch and try again

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.

4 participants