-
Notifications
You must be signed in to change notification settings - Fork 6
add model config #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add model config #30
Conversation
There was a problem hiding this 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_configfiletype - 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.
| model = task_body.get('model', DEFAULT_MODEL) | ||
| if model in model_keys: | ||
| model = model_dict[model] |
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
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.
| 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 |
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
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.
| 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 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
smoke test |
|
Add
model_configfile so that models can be specified with*-latestetc. instead of a specific version. Also fix a bug thatmodelspecified in a taskflow is not currently passed to the CAPI.