mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 09:02:11 +03:00
Add reasoning-based model and effort routing (#7607)
* feat(routing): add reasoning-based model and effort routing * refactor(routing): modularize reasoning and auto-routing pipeline * fix(routing): remove redundant DB re-export and prevent SQL scan false positives * fix(routing): resolve reasoning routing review blockers * fix(i18n): keep release ranking fallbacks outside reasoning * fix(db): renumber reasoning-routing migration past release tip (124→125) 124_generic_session_affinity_ttl.sql (#7274) has since landed on release/v3.8.49 at version 124, colliding with this PR's own 124_reasoning_routing_rules.sql. Renumbers to 125 (the next free slot past the current release tip) and updates the one filename reference in docs/routing/REASONING_ROUTING.md. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * chore(db): renumber reasoning-routing migration 125→126 (slot taken by #7360) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * refactor(api): compact temp-path decls in exportAll GET (complexity-ratchet lines budget) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * refactor(api): single-statement auth guard in exportAll GET (function under 80-line cap) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
This commit is contained in:
@@ -36,8 +36,17 @@ export interface CodeGraphNode {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
let _db: unknown = null;
|
||||
let dbPathOverride: string | null | undefined;
|
||||
|
||||
/** Override the index path for deterministic tests and embedded callers. */
|
||||
export function setCodeGraphPathForTest(path: string | null | undefined): void {
|
||||
dbPathOverride = path;
|
||||
_db = null;
|
||||
}
|
||||
|
||||
function getDbPath(): string | null {
|
||||
if (dbPathOverride !== undefined) return dbPathOverride;
|
||||
|
||||
// Try project root first (dev), then cwd, then DATA_DIR
|
||||
const candidates = [
|
||||
join(process.cwd(), ".codegraph", "codegraph.db"),
|
||||
|
||||
Reference in New Issue
Block a user