Summary
In src/specify_cli/integrations/agy/__init__.py, AgyIntegration.build_exec_args() currently hardcodes ignoring the model parameter:
def build_exec_args(
self,
prompt: str,
*,
model: str | None = None,
output_json: bool = True,
) -> list[str] | None:
# agy does not support --model or JSON output; both params are ignored
args = [self._resolve_executable(), "--print", prompt]
self._apply_extra_args_env_var(args)
return args
Issues Observed
-
--model is supported by agy CLI:
Modern Antigravity CLI (agy) supports --model <model_name> (e.g. agy --model claude-sonnet-4-6 -p "..." or agy --model gemini-3.1-pro-high -p "..."). Because model is omitted from build_exec_args, stage-level model tiering defined in workflows (such as .specify/workflows/...) fails to route to the desired model, silently falling back to the user's default local model.
-
Working directory / workspace flag:
When agy is launched in headless --print mode, it does not automatically bind the current directory unless --add-dir <path> is passed, causing it to report:
You do not currently have an active workspace open.
By default, scratch files and projects are located at: ~/.gemini/antigravity-cli/scratch
-
Flag positioning before --print:
Any extra args appended after --print <prompt> are treated by agy's CLI parser as part of the positional prompt text rather than CLI flags. Flags (such as --model, --add-dir, --dangerously-skip-permissions, --print-timeout) should precede --print.
Proposed Fix
In AgyIntegration.build_exec_args():
def build_exec_args(
self,
prompt: str,
*,
model: str | None = None,
output_json: bool = True,
) -> list[str] | None:
args = [self._resolve_executable()]
if model:
args.extend(["--model", model])
self._apply_extra_args_env_var(args)
args.extend(["--print", prompt])
return args
And in AgyIntegration.dispatch_command(), pass --add-dir with project_root when invoking the subprocess so agy recognizes the project repository workspace.
Happy to submit a PR with tests if this looks good to the maintainers!
Summary
In
src/specify_cli/integrations/agy/__init__.py,AgyIntegration.build_exec_args()currently hardcodes ignoring themodelparameter:Issues Observed
--modelis supported byagyCLI:Modern Antigravity CLI (
agy) supports--model <model_name>(e.g.agy --model claude-sonnet-4-6 -p "..."oragy --model gemini-3.1-pro-high -p "..."). Becausemodelis omitted frombuild_exec_args, stage-level model tiering defined in workflows (such as.specify/workflows/...) fails to route to the desired model, silently falling back to the user's default local model.Working directory / workspace flag:
When
agyis launched in headless--printmode, it does not automatically bind the current directory unless--add-dir <path>is passed, causing it to report:Flag positioning before
--print:Any extra args appended after
--print <prompt>are treated byagy's CLI parser as part of the positional prompt text rather than CLI flags. Flags (such as--model,--add-dir,--dangerously-skip-permissions,--print-timeout) should precede--print.Proposed Fix
In
AgyIntegration.build_exec_args():And in
AgyIntegration.dispatch_command(), pass--add-dirwithproject_rootwhen invoking the subprocess soagyrecognizes the project repository workspace.Happy to submit a PR with tests if this looks good to the maintainers!