Skip to content

Let users choose the model for each agent #45

Closed

Description

@vsn411

Problem: Only the api agent supports choosing a model (SECFOO_API_MODEL). The CLI adapters (claude, codex, gemini, copilot, cursor, droid, ...) build a fixed argv in build_command() and never pass a model, so a scan always uses the CLI's own default. The only workaround is changing that CLI's global config, which affects every other use of the CLI too.

Proposal:

  • Optional per-agent setting in ~/.secfoo/config.toml, e.g.
    [agents.claude]
    model = "claude-sonnet-5-5"
  • A --model option on secfoo run that overrides the config value for one run.
  • Each adapter appends its CLI's own flag only when a model is set (--model for claude/codex/gemini/copilot/cursor, -m for droid; check each CLI's --help). Adapters whose CLI has no model flag should warn and ignore the setting.
  • Store the model on the run record so results from different models can be compared.

Where to look: src/secfoo/agents/base.py, the adapters in src/secfoo/agents/, src/secfoo/config.py, src/secfoo/cli.py (run).

Done when: unit tests in tests/test_agents/ cover the argv with and without a model for every adapter, and pytest tests passes.

Activity

  1. added
    enhancementNew feature or request
    help wantedExtra attention is needed
    hackathonOpen for the Secfoo hackathon
    on Nov 8, 2026
  2. karthickmk2001 commented on Nov 11, 2026

    @karthickmk2001
    Collaborator

    I'd like to take this. Working on it now; a PR will follow.

  3. karthickmk2001 commented on Nov 11, 2026

    @karthickmk2001
    Collaborator

    Correction to my comment above: this was already done by @kushaldave002 in #60 (merged 2026-11-08). It adds [agents.<name>].model in config, a --model override on secfoo run, each adapter's own flag (--model/-m) with a warning for adapters that have none, and the model stored on the run record. Adapter argv tests are in tests/test_agents/test_models.py. The PR didn't link this issue, so it stayed open. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: mediumLeaderboard: 6 points when the PR closing this is mergedenhancementNew feature or requesthackathonOpen for the Secfoo hackathonhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions