Skip to content

Commit ebddb91

Browse files
RobLe3claude
andcommitted
feat(onboarding): default --backend-url to http://localhost:11434
Parity with Rust/TS: only --model is required now; --backend-url defaults to local Ollama. ruff clean, 213 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ad9b49c commit ebddb91

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/iicp_client/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ def _build_parser() -> argparse.ArgumentParser:
9999
)
100100
serve.add_argument(
101101
"--backend-url",
102-
default=_env("IICP_BACKEND_URL"),
102+
# Onboarding: default to Ollama's well-known local port so only --model is required.
103+
default=_env("IICP_BACKEND_URL") or "http://localhost:11434",
103104
help="OpenAI-compatible backend URL (Ollama / vLLM / LM Studio). "
104-
"env: IICP_BACKEND_URL",
105+
"env: IICP_BACKEND_URL (default http://localhost:11434)",
105106
)
106107
serve.add_argument(
107108
"--backend-type",
@@ -240,9 +241,8 @@ async def _serve(args: argparse.Namespace) -> int:
240241

241242
if not args.backend_url or not args.model:
242243
sys.stderr.write(
243-
"ERROR: --backend-url and --model are required "
244-
"(or set IICP_BACKEND_URL and IICP_BACKEND_MODEL, "
245-
"or load via `--node <name>` after `iicp-node init`).\n"
244+
"ERROR: --model is required (--backend-url defaults to http://localhost:11434). "
245+
"Set IICP_BACKEND_MODEL, or load via `--node <name>` after `iicp-node init`.\n"
246246
)
247247
return 2
248248

0 commit comments

Comments
 (0)