-
Notifications
You must be signed in to change notification settings - Fork 2
fix(run): respect explicit --tool flag when --tier is also specified (#1440) #1444
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,16 +7,19 @@ use crate::pipeline; | |
|
|
||
| pub(crate) fn allow_cross_tool_failover( | ||
| strategy: ToolSelectionStrategy, | ||
| resolved_tier_name: Option<&str>, | ||
| force_ignore_tier_setting: bool, | ||
| _resolved_tier_name: Option<&str>, | ||
| _force_ignore_tier_setting: bool, | ||
| no_failover: bool, | ||
| ) -> bool { | ||
| if no_failover { | ||
| return false; | ||
| } | ||
|
|
||
| // Explicit `--tool` (from CLI or skill agent_config) is the user's hard | ||
| // selection: never silently fall over to a different tool, even when a | ||
| // tier is also specified (#1440). Tier still drives model selection for | ||
| // the chosen tool via `resolve_requested_tool_from_tier`. | ||
| !matches!(strategy, ToolSelectionStrategy::Explicit(_)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change prevents any failover when an explicit tool is selected, even if a If a user specifies both |
||
| || (!force_ignore_tier_setting && resolved_tier_name.is_some()) | ||
| } | ||
|
|
||
| pub(crate) fn resolve_attempt_initial_response_timeout_seconds( | ||
|
|
||
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 parameters
_resolved_tier_nameand_force_ignore_tier_settingare now unused in the function body. Since this is apub(crate)function, it would be cleaner to remove these parameters from the signature and update the call sites, rather than just prefixing them with underscores. This improves the internal API clarity and reduces technical debt.