venice_get_rate_limit_logs
Retrieve historical logs of rate limit usage to monitor API consumption and track usage patterns over time.
Instructions
Get rate limit usage history logs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/admin/index.ts:97-107 (registration)Registration of the venice_get_rate_limit_logs tool, including its inline handler function that fetches rate limit logs via the veniceAPI and returns formatted JSON or error message.server.tool( "venice_get_rate_limit_logs", "Get rate limit usage history logs", {}, async () => { const response = await veniceAPI("/api_keys/rate_limits/logs"); const data = await response.json() as { data?: unknown; error?: { message?: string } }; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] }; } );
- src/tools/admin/index.ts:101-106 (handler)The core handler logic for executing the venice_get_rate_limit_logs tool: calls the API endpoint, parses response, handles errors, and formats output.async () => { const response = await veniceAPI("/api_keys/rate_limits/logs"); const data = await response.json() as { data?: unknown; error?: { message?: string } }; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] }; }