Skip to content

FIX: CLI display underlying model#2215

Open
rlundeen2 wants to merge 1 commit into
microsoft:mainfrom
rlundeen2:rlundeen2-fix-cli-display-underlying-model
Open

FIX: CLI display underlying model#2215
rlundeen2 wants to merge 1 commit into
microsoft:mainfrom
rlundeen2:rlundeen2-fix-cli-display-underlying-model

Conversation

@rlundeen2

Copy link
Copy Markdown
Contributor

Summary

The scenario pretty-printer (pyrit/output/scenario_result/pretty.py) displayed the target's model_name for the Target Model line, which for Azure OpenAI targets is the deployment name (e.g. pyrit-github-gpt4) rather than the actual model.

This makes it prefer underlying_model_name and fall back to model_name, matching the CLI target-list behavior in pyrit/cli/_output.py (underlying_model_name or model_name). Now a scenario report shows e.g. Target Model: gpt-4o.

Changes

  • pretty.py: prefer underlying_model_name with fallback to model_name for the displayed target model.
  • test_pretty.py: added coverage for the underlying-model preference and the deployment-name fallback.

Testing

  • pytest tests/unit/output/scenario_result/test_pretty.py (15 passed)

Scenario pretty-printer showed the Azure deployment name (model_name) instead of the underlying model. Prefer underlying_model_name with fallback to model_name, matching the CLI target-list behavior in _output.py.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0647a5d9-1395-4980-8eac-2aa176160ed1
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.

2 participants