✨ feat: use remote endpoints as default when using remote mode#424
Merged
Nicola Franco (franconicola) merged 3 commits intoJun 10, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces mode-aware role defaults for attack configurations in the orchestrator.
When HackAgent is initialized in remote mode, attack role defaults are now resolved from a remote profile.
When running in local mode, role defaults are resolved from a local profile.
The spreadsheet is still descriptive only and is not used at runtime.
What changed
1. Added centralized role mapping
A single attack-to-role map is now used to define which attack roles should receive defaults, and it consists of an additional field in the already existing _ATTACK_MODEL_ROLE_PATHS. This field establishes, for each attack, whether each role should be performed either by the attacker or by the judge model. For instance, in AutoDan-Turbo, "attacker" and "summarizer" are both performed by the attacker model.
This replaces the previous naming that implied remote-only behavior.
2. Added mode detection from backend context
The orchestrator now determines mode by checking whether a backend API key is available:
3. Added explicit remote role defaults
Introduced _remote_role_defaults(api_key), with:
4. Added explicit local role defaults
Introduced _local_role_defaults(), aligned with the updated attack_roles sheet:
5. Added mode-based config normalization before execution
Introduced _apply_mode_based_role_defaults(attack_config), called at the beginning of execute().
Behavior:
6. Fixed evaluator warning for auto-injected judges
By ensuring a default judge type is present in injected role defaults, we avoid warnings like:
Tests
Added and updated orchestrator unit tests to cover:
Impact