mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
* 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>
12 lines
468 B
TypeScript
12 lines
468 B
TypeScript
const callLogsDb = await import("../../src/lib/usage/callLogs.ts");
|
|
|
|
export async function getLatestCallLog() {
|
|
const rows = await callLogsDb.getCallLogs({ limit: 5 });
|
|
return Array.isArray(rows) && rows.length > 0 ? callLogsDb.getCallLogById(rows[0].id) : null;
|
|
}
|
|
|
|
export async function getResponsesCallLogs() {
|
|
const rows = await callLogsDb.getCallLogs({ limit: 200 });
|
|
return Array.isArray(rows) ? rows.filter((row) => row.path === "/v1/responses") : [];
|
|
}
|