Merge remote-tracking branch 'origin/master' into gitea/feature/end
Resolved conflicts taking origin/master (v0.5.55) as canonical, with local features re-applied: - runtime log level (LOG_LEVEL env + dashboard Settings → Logging, applied immediately and persisted across restarts) - free/noAuth provider enable/disable toggle via providerStrategies.enabled - parallel model testing (Test All Models / Test Selected Keys)
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
|
||||
import { FORMATS } from "../translator/formats.js";
|
||||
|
||||
// Legacy per-chunk usage console line; off by default (superseded by "📊 done")
|
||||
const DEBUG_USAGE = process.env.LOG_USAGE_VERBOSE === "1";
|
||||
|
||||
// ANSI color codes
|
||||
export const COLORS = {
|
||||
reset: "\x1b[0m",
|
||||
@@ -400,6 +403,10 @@ export function estimateUsage(body, contentLength, targetFormat = FORMATS.OPENAI
|
||||
export function logUsage(provider, usage, model = null, connectionId = null, apiKey = null) {
|
||||
if (!usage || typeof usage !== "object") return;
|
||||
|
||||
// Console output moved to the unified "📊 done" line (streamingHandler). Kept as
|
||||
// a no-op hook so callers stay unchanged; usage persistence happens via saveUsageStats.
|
||||
if (!DEBUG_USAGE) return;
|
||||
|
||||
const p = provider?.toUpperCase() || "UNKNOWN";
|
||||
|
||||
// Support both formats:
|
||||
|
||||
Reference in New Issue
Block a user