fix: honest costs in streams, oracle-sized timeouts, history & log cleanup
Cost showed $0 for every streamed request: the X-Cortiq-Cost-USD header is written before generation, when the cost cannot be known. The gateway now ships the final number in a closing SSE event (`cortiq_cost_usd`, alongside the token estimate when the provider sent no usage), and the console prefers it over the header. Money renders with 4 decimals, the last two in a smaller font — $0.0006 stays readable instead of collapsing to $0. Timeouts, both ends: the router default was 800 ms, silently degrading every prompt the hosted router escalates to its oracle (~10 s) — now 15 s. Provider clients had NO timeout at all (a dead OpenRouter host hung requests forever) — now a 10 s connect timeout, with no overall cap so long generations and streams are never cut. Benchmark history: per-run × and a Clear-all button. Logs view: a clear button backed by DELETE /admin/api/logs.
This commit is contained in:
Vendored
+1
@@ -601,4 +601,5 @@ export default {
|
||||
"bm.liveRunning": "läuft…",
|
||||
"bm.spent": "ausgegeben",
|
||||
"bm.verdict": "🏁 Fertig: Antworten {p}, ausgegeben {s}",
|
||||
"bm.clearHistory": "Alle löschen",
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -594,4 +594,5 @@ export default {
|
||||
"bm.liveRunning": "running…",
|
||||
"bm.spent": "spent",
|
||||
"bm.verdict": "🏁 Done: answers {p}, spent {s}",
|
||||
"bm.clearHistory": "Clear all",
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -601,4 +601,5 @@ export default {
|
||||
"bm.liveRunning": "en curso…",
|
||||
"bm.spent": "gastado",
|
||||
"bm.verdict": "🏁 Listo: respuestas {p}, gastado {s}",
|
||||
"bm.clearHistory": "Borrar todo",
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -601,4 +601,5 @@ export default {
|
||||
"bm.liveRunning": "en cours…",
|
||||
"bm.spent": "dépensé",
|
||||
"bm.verdict": "🏁 Terminé : réponses {p}, dépensé {s}",
|
||||
"bm.clearHistory": "Tout effacer",
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -593,4 +593,5 @@ export default {
|
||||
"bm.liveRunning": "идёт…",
|
||||
"bm.spent": "потрачено",
|
||||
"bm.verdict": "🏁 Готово: ответы {p}, потрачено {s}",
|
||||
"bm.clearHistory": "Очистить всё",
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -601,4 +601,5 @@ export default {
|
||||
"bm.liveRunning": "sürüyor…",
|
||||
"bm.spent": "harcanan",
|
||||
"bm.verdict": "🏁 Bitti: yanıtlar {p}, harcanan {s}",
|
||||
"bm.clearHistory": "Tümünü temizle",
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -601,4 +601,5 @@ export default {
|
||||
"bm.liveRunning": "进行中……",
|
||||
"bm.spent": "花费",
|
||||
"bm.verdict": "🏁 完成:回答 {p},花费 {s}",
|
||||
"bm.clearHistory": "全部清除",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user