Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ See `docs/internal/ingest-architecture.md` for details.
| `COPILOT_STORAGE_DIR` | auto-detected per OS | VS Code workspaceStorage root override |
| `SMRITI_PROJECTS_ROOT` | `~/zero8.dev` | Projects root for ID derivation |
| `OLLAMA_HOST` | `http://127.0.0.1:11434` | Ollama endpoint |
| `QMD_MEMORY_MODEL` | `qwen3:8b-tuned` | Ollama model for synthesis |
| `QMD_MEMORY_MODEL` | `qwen3.5:9b-mlx-tuned` | Ollama model for synthesis (MLX engine)|
| `SMRITI_CLASSIFY_THRESHOLD` | `0.5` | LLM classification trigger threshold |
| `SMRITI_AUTHOR` | `$USER` | Git author for team sharing |
| `SMRITI_DAEMON_DEBOUNCE_MS` | `30000` | Daemon file-stability wait (v0.4.0) |
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smriti",
"version": "0.8.2",
"version": "0.9.0",
"description": "Smriti - Unified memory layer across all AI agents",
"type": "module",
"bin": {
Expand All @@ -10,6 +10,8 @@
"dev": "bun --hot src/index.ts",
"build": "bun build src/index.ts --outdir dist --target bun",
"test": "bun test --cwd ./test",
"eval:recall": "bun run test/eval/recall-quality.eval.ts",
"eval:relations": "bun run test/eval/relation-inference.eval.ts",
"smriti": "bun src/index.ts",
"bench:qmd": "bun run scripts/bench-qmd.ts --profile ci-small --out bench/results/ci-small.json --no-llm",
"bench:qmd:repeat": "bun run scripts/bench-qmd-repeat.ts --profiles ci-small,small,medium --runs 3 --out bench/results/repeat-summary.json",
Expand Down
4 changes: 2 additions & 2 deletions src/categorize/classifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import type { Database } from "bun:sqlite";
import { tagMessage, tagSession } from "../db";
import { CLASSIFY_LLM_THRESHOLD, OLLAMA_HOST, OLLAMA_MODEL } from "../config";
import { CLASSIFY_LLM_THRESHOLD, OLLAMA_HOST, requireOllamaModel } from "../config";
import { ALL_CATEGORY_IDS } from "./schema";
import { getRuleManager, type Rule } from "./rules/loader";

Expand Down Expand Up @@ -86,7 +86,7 @@ ${text.slice(0, 2000)}`;
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: OLLAMA_MODEL,
model: requireOllamaModel(),
prompt,
stream: false,
options: { temperature: 0.1, num_predict: 50 },
Expand Down
13 changes: 12 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,18 @@ export const PROJECTS_ROOT =
// =============================================================================

export const OLLAMA_HOST = Bun.env.OLLAMA_HOST || "http://127.0.0.1:11434";
export const OLLAMA_MODEL = Bun.env.QMD_MEMORY_MODEL || "qwen3:8b-tuned";
export const OLLAMA_MODEL = Bun.env.QMD_MEMORY_MODEL;

/** Resolve the Ollama model to use, preferring an explicit override. Throws if neither is set. */
export function requireOllamaModel(explicit?: string): string {
const model = explicit || OLLAMA_MODEL;
if (!model) {
throw new Error(
"No Ollama model configured. Set QMD_MEMORY_MODEL in your environment or .env file."
);
}
return model;
}

/** Confidence threshold below which rule-based classification triggers LLM */
export const CLASSIFY_LLM_THRESHOLD = Number(
Expand Down
Loading
Loading