From 5529960e7986966bbd9e0ac200e6b3d6ff013efd Mon Sep 17 00:00:00 2001 From: zphinx Date: Mon, 4 May 2026 18:41:55 +0200 Subject: [PATCH] feat(rag): add --embed-model flag with nomic-embed-text default --- src/tai/cli.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tai/cli.py b/src/tai/cli.py index b45bdb6..b39649d 100644 --- a/src/tai/cli.py +++ b/src/tai/cli.py @@ -12,7 +12,7 @@ from rich.panel import Panel from rich.rule import Rule from rich.text import Text -from tai.ai_client import DEFAULT_AI_HOST, DEFAULT_MODEL, AIClient, AIConfig +from tai.ai_client import DEFAULT_AI_HOST, DEFAULT_EMBED_MODEL, DEFAULT_MODEL, AIClient, AIConfig from tai.ai_guardrails import validate_ai_response from tai.collectors import CollectionReport, collect_from_plan from tai.input_parser import InputValidationError, build_request @@ -110,6 +110,13 @@ def run( help="Disable RAG; send full diagnostics to AI instead of retrieved chunks.", ), ] = False, + embed_model: Annotated[ + str, + typer.Option( + "--embed-model", + help="Embedding model for RAG. Must be pulled in Ollama on the AI host.", + ), + ] = DEFAULT_EMBED_MODEL, ) -> None: """Start an interactive troubleshooting session scaffold.""" try: @@ -145,7 +152,7 @@ def run( if not (probe or collect or analyze or interactive): return # nothing SSH-related requested - ai_config = AIConfig(host=ai_host, model=model, api_key=ai_key) + ai_config = AIConfig(host=ai_host, model=model, api_key=ai_key, embed_model=embed_model) logger = SessionLogger.create(log_file) if log_file else None if analyze or interactive: console.print(f"[cyan]AI:[/cyan] {AIClient(ai_config).summary()}")