Skip to content

Commit 6596448

Browse files
Jim Smithclaude
andcommitted
Fix build error and model label when using remote embedding
- Add intent? to LLM interface and ILLMSession expandQuery signature (store.ts passes { intent } but interface didn't declare it — tsc error) - Derive embed model label from getDefaultLLM().embedModelName after getStore() so content_vectors.model reflects the actual LLM in use (previously always stored DEFAULT_EMBED_MODEL_URI even with remote) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f640303 commit 6596448

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/cli/qmd.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,9 @@ async function vectorIndex(
16861686
const storeInstance = getStore();
16871687
const db = storeInstance.db;
16881688

1689+
// Use the actual model name from the configured LLM (may be remote, not the default GGUF URI)
1690+
model = getDefaultLLM().embedModelName;
1691+
16891692
if (force) {
16901693
console.log(`${c.yellow}Force re-indexing: clearing all vectors...${c.reset}`);
16911694
}

src/llm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export type LLMSessionOptions = {
169169
export interface ILLMSession {
170170
embed(text: string, options?: EmbedOptions): Promise<EmbeddingResult | null>;
171171
embedBatch(texts: string[], options?: EmbedOptions): Promise<(EmbeddingResult | null)[]>;
172-
expandQuery(query: string, options?: { context?: string; includeLexical?: boolean }): Promise<Queryable[]>;
172+
expandQuery(query: string, options?: { context?: string; includeLexical?: boolean; intent?: string }): Promise<Queryable[]>;
173173
rerank(query: string, documents: RerankDocument[], options?: RerankOptions): Promise<RerankResult>;
174174
/** Whether this session is still valid (not released or aborted) */
175175
readonly isValid: boolean;
@@ -356,7 +356,7 @@ export interface LLM {
356356
* Expand a search query into multiple variations for different backends.
357357
* Returns a list of Queryable objects.
358358
*/
359-
expandQuery(query: string, options?: { context?: string, includeLexical?: boolean }): Promise<Queryable[]>;
359+
expandQuery(query: string, options?: { context?: string; includeLexical?: boolean; intent?: string }): Promise<Queryable[]>;
360360

361361
/**
362362
* Rerank documents by relevance to a query

0 commit comments

Comments
 (0)