Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/dspy_cli/commands/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import click

from dspy_cli.server.runner import main as runner_main
from dspy_cli.utils.venv import (
detect_venv_python,
has_package,
Expand Down Expand Up @@ -118,6 +117,7 @@ def serve(port, host, logs_dir, reload, save_openapi, openapi_format, python, sy
dspy-cli serve --python /path/to/venv/bin/python
"""
if system:
from dspy_cli.server.runner import main as runner_main
runner_main(
port=port,
host=host,
Expand Down Expand Up @@ -195,6 +195,7 @@ def serve(port, host, logs_dir, reload, save_openapi, openapi_format, python, sy

_exec_clean(target_python, args)
else:
from dspy_cli.server.runner import main as runner_main
runner_main(
port=port,
host=host,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_commands_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_cli_e2e_smoke(runner, tmp_cwd, monkeypatch):
def fake_runner_main(**kwargs):
calls.update(kwargs)

monkeypatch.setattr("dspy_cli.commands.serve.runner_main", fake_runner_main)
monkeypatch.setattr("dspy_cli.server.runner.main", fake_runner_main)

res = runner.invoke(
main,
Expand Down