feat: add provider usage tracking
This commit is contained in:
10
src/gateway/server-methods/usage.ts
Normal file
10
src/gateway/server-methods/usage.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { loadProviderUsageSummary } from "../../infra/provider-usage.js";
|
||||
import type { GatewayRequestHandlers } from "./types.js";
|
||||
|
||||
export const usageHandlers: GatewayRequestHandlers = {
|
||||
"usage.status": async ({ respond }) => {
|
||||
const summary = await loadProviderUsageSummary();
|
||||
respond(true, summary, undefined);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user