v0.2.7 configurable Gemini models + per-pipeline backend preference

This commit is contained in:
local
2026-05-12 00:15:07 -05:00
parent cd377683fb
commit 9af70302b1
11 changed files with 273 additions and 22 deletions
+8 -2
View File
@@ -61,7 +61,9 @@ export function analyzeRouter() {
const cfg = await getConfigSnapshot();
const hasHardware = !!cfg.relay_gemma_base_url;
const quota = await getTierQuotas();
const plan = planBackend(row, quota, { hasHardware });
const preference =
cfg.relay_analyze_backend_preference || "gemini_first";
const plan = planBackend(row, quota, { hasHardware, preference });
if (!plan.allowed) {
const e = await errorEnvelope({
error: plan.reason,
@@ -78,7 +80,11 @@ export function analyzeRouter() {
let result;
try {
if (chosenBackend === "gemini") {
const backend = createGeminiBackend({ apiKey: cfg.relay_gemini_api_key });
const backend = createGeminiBackend({
apiKey: cfg.relay_gemini_api_key,
transcriptionModel: cfg.relay_gemini_transcription_model,
analysisModel: cfg.relay_gemini_analysis_model,
});
result = await backend.analyzeText({ prompt });
} else {
const backend = createHardwareBackend({