@acarmisc/backstage-plugin-litellm-common 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/types.d.ts +24 -0
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -311,3 +311,27 @@ export interface PaginatedSpendLogs {
311
311
  pageSize: number;
312
312
  truncated: boolean;
313
313
  }
314
+ /** One model's Langfuse usage slice (cost/tokens/latency for the period). */
315
+ export interface QualityByModel {
316
+ model: string;
317
+ cost: number;
318
+ tokens: number;
319
+ avgLatencyMs: number | null;
320
+ requests: number;
321
+ }
322
+ /** One Langfuse numeric score averaged over the period. */
323
+ export interface QualityScore {
324
+ name: string;
325
+ avg: number;
326
+ count: number;
327
+ }
328
+ /** Quality summary served by GET /insights/quality when Langfuse is connected. */
329
+ export interface QualitySummary {
330
+ configured: true;
331
+ byModel: QualityByModel[];
332
+ scores: QualityScore[];
333
+ }
334
+ /** GET /insights/quality response: data, or `{configured:false}` when Langfuse is off. */
335
+ export type QualityResponse = {
336
+ configured: false;
337
+ } | QualitySummary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acarmisc/backstage-plugin-litellm-common",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Shared types, permissions, and schemas for the LiteLLM Backstage plugin",
5
5
  "backstage": {
6
6
  "role": "common-library",