Skip to content

Commit 51a14ed

Browse files
committed
fix: skip Qdrant init when no URL configured
Allow rules-only transfer mode by not defaulting to localhost:6334 when no Qdrant URL is set via config or environment.
1 parent a7e5722 commit 51a14ed

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

cmd/simili/commands/process.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -220,25 +220,29 @@ func runProcess() {
220220
if val := os.Getenv("QDRANT_URL"); val != "" && (qURL == "" || qURL == "localhost:6334") {
221221
qURL = val
222222
}
223-
if qURL == "" {
224-
qURL = "localhost:6334" // Default
225-
}
226223

227224
qKey := cfg.Qdrant.APIKey
228225
if val := os.Getenv("QDRANT_API_KEY"); val != "" && qKey == "" {
229226
qKey = val
230227
}
231228

232-
// Log Qdrant connection info (masked key)
233-
if verbose {
234-
fmt.Printf("Connecting to Qdrant at %s\n", qURL)
235-
}
229+
// Only initialize Qdrant if a real URL is configured (not empty, not default localhost)
230+
if qURL != "" && qURL != "localhost:6334" {
231+
// Log Qdrant connection info (masked key)
232+
if verbose {
233+
fmt.Printf("Connecting to Qdrant at %s\n", qURL)
234+
}
236235

237-
qdrantClient, err := qdrant.NewClient(qURL, qKey)
238-
if err == nil {
239-
deps.VectorStore = qdrantClient
236+
qdrantClient, err := qdrant.NewClient(qURL, qKey)
237+
if err == nil {
238+
deps.VectorStore = qdrantClient
239+
} else {
240+
fmt.Printf("Warning: Failed to initialize Qdrant client: %v\n", err)
241+
}
240242
} else {
241-
fmt.Printf("Warning: Failed to initialize Qdrant client: %v\n", err)
243+
if verbose {
244+
fmt.Println("Qdrant not configured — skipping vector store initialization")
245+
}
242246
}
243247

244248
// GitHub Client

0 commit comments

Comments
 (0)