Skip to content

Commit 989fcf2

Browse files
strickvlclaude
andcommitted
Improve CLI parameter handling in run.py
- Use Click context to detect user-provided overrides instead of hardcoded defaults - Set explicit default="tavily" for search-provider to match help text 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3830977 commit 989fcf2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

deep_research/run.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
@click.option(
133133
"--search-provider",
134134
type=click.Choice(["tavily", "exa", "both"], case_sensitive=False),
135-
default=None,
135+
default="tavily",
136136
help="Search provider to use: tavily (default), exa, or both",
137137
)
138138
@click.option(
@@ -189,7 +189,11 @@ def main(
189189
logger.info(f"Description: {mode_config['description']}")
190190

191191
# Apply mode parameters (can be overridden by explicit arguments)
192-
if max_sub_questions == 10: # Default value - apply mode preset
192+
if (
193+
max_sub_questions
194+
== click.get_current_context().params["max_sub_questions"]
195+
):
196+
# Default value - apply mode preset
193197
max_sub_questions = mode_config["max_sub_questions"]
194198
logger.info(f" - Max sub-questions: {max_sub_questions}")
195199

0 commit comments

Comments
 (0)