fix: allow apiKey omission for local embedding providers#151
fix: allow apiKey omission for local embedding providers#151eisen0419 wants to merge 1 commit intoCortexReach:masterfrom
Conversation
Detect local providers (localhost/127.0.0.1/[::1]/0.0.0.0) via baseURL and use a dummy 'ollama' key when apiKey is not provided. Cloud providers still fail early with a clear error message at config time. Closes CortexReach#133
Review: fix: allow apiKey omission for local embedding providersVerdict: Fix-then-merge — two items to address. ✅ What's working
🔴 Blocking
Fix: append 🟡 Suggested before merge
Suggested fix: make ⚪ Non-blocking
Clean fix overall. The |
Summary
Follow-up to PR #93 — hardens the no-apiKey path with provider-aware validation and unit test coverage that doesn't require a running local server.
Changes
index.ts: AddedisLocalProvider()helper to detect local endpoints (localhost/127.0.0.1/[::1]/0.0.0.0)'ollama'key with console warningtest/no-apikey-local-provider.test.mjs: 4 test cases covering:Test plan
plugin-manifest-regressionfailure is a pre-existing version mismatch onmasterCloses #133