-
Notifications
You must be signed in to change notification settings - Fork 7
Use DEFAULT_EXECUTOR constant across all entry points #98
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
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |||||||||||||||||||
|
|
||||||||||||||||||||
| from databao_cli.features.ui.project_utils import DatabaoProjectStatus, databao_project_status | ||||||||||||||||||||
| from databao_cli.shared.errors import FeatureError | ||||||||||||||||||||
| from databao_cli.shared.executor_utils import DEFAULT_EXECUTOR | ||||||||||||||||||||
| from databao_cli.shared.project.layout import ProjectLayout | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
@@ -36,6 +37,6 @@ def initialize_agent_from_dce(project_path: Path, model: str | None, temperature | |||||||||||||||||||
| else: | ||||||||||||||||||||
| llm_config = LLMConfigDirectory.DEFAULT | ||||||||||||||||||||
|
|
||||||||||||||||||||
| agent = create_agent(domain=_domain, llm_config=llm_config) | ||||||||||||||||||||
| agent = create_agent(domain=_domain, llm_config=llm_config, executor_type=DEFAULT_EXECUTOR) | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
Comment on lines
+40
to
41
|
||||||||||||||||||||
| agent = create_agent(domain=_domain, llm_config=llm_config, executor_type=DEFAULT_EXECUTOR) | |
| agent_kwargs = { | |
| "domain": _domain, | |
| "llm_config": llm_config, | |
| } | |
| if DEFAULT_EXECUTOR != "separate_executor": | |
| agent_kwargs["executor_type"] = DEFAULT_EXECUTOR | |
| agent = create_agent(**agent_kwargs) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |
| from uuid6 import uuid6 | ||
|
|
||
| from databao_cli.features.mcp.tools.databao_ask.agent_factory import create_agent_for_tool | ||
| from databao_cli.shared.executor_utils import DEFAULT_EXECUTOR, EXECUTOR_TYPES | ||
|
|
||
| if TYPE_CHECKING: | ||
| from fastmcp import FastMCP | ||
|
|
@@ -21,6 +22,9 @@ | |
|
|
||
| DEFAULT_MAX_DATA_ROWS = 50 | ||
|
|
||
| _executor_names = [f"'{k}' (default)" if k == DEFAULT_EXECUTOR else f"'{k}'" for k in EXECUTOR_TYPES] | ||
| _EXECUTOR_DESCRIPTION = f"Execution engine: {', '.join(_executor_names)}." | ||
|
|
||
|
Comment on lines
+25
to
+27
|
||
|
|
||
| class Message(BaseModel): | ||
| """OpenAI-compatible chat message.""" | ||
|
|
@@ -62,8 +66,8 @@ def databao_ask( | |
| ] = 0.0, | ||
| executor: Annotated[ | ||
| str, | ||
| Field(description="Execution engine: 'claude_code' (default), 'lighthouse', 'dbt', or 'react_duckdb'."), | ||
| ] = "claude_code", | ||
| Field(description=_EXECUTOR_DESCRIPTION), | ||
| ] = DEFAULT_EXECUTOR, | ||
|
Comment on lines
67
to
+70
|
||
| max_data_rows: Annotated[ | ||
| int, | ||
| Field(description="Maximum number of data rows to return in the response."), | ||
|
|
||
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.
This change alters production behavior for the CLI
askflow (agent creation now explicitly pins the default executor), but the PR doesn’t add/update any tests. Please add a unit test (e.g., patchingdatabao_cli.features.ask.agent_factory.create_agent) asserting thatinitialize_agent_from_dcepasses the expected executor wiring for the default executor, so changingDEFAULT_EXECUTORremains safe.