Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(UI) Fix SpendLogs page - truncate bedrock models + show end_user #8118

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions litellm/model_prices_and_context_window_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -3423,6 +3423,39 @@
"supports_audio_output": true,
"source": "https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#gemini-2.0-flash"
},
"gemini-2.0-flash-thinking-exp-01-21": {
"max_tokens": 65536,
"max_input_tokens": 1048576,
"max_output_tokens": 65536,
"max_images_per_prompt": 3000,
"max_videos_per_prompt": 10,
"max_video_length": 1,
"max_audio_length_hours": 8.4,
"max_audio_per_prompt": 1,
"max_pdf_size_mb": 30,
"input_cost_per_image": 0,
"input_cost_per_video_per_second": 0,
"input_cost_per_audio_per_second": 0,
"input_cost_per_token": 0,
"input_cost_per_character": 0,
"input_cost_per_token_above_128k_tokens": 0,
"input_cost_per_character_above_128k_tokens": 0,
"input_cost_per_image_above_128k_tokens": 0,
"input_cost_per_video_per_second_above_128k_tokens": 0,
"input_cost_per_audio_per_second_above_128k_tokens": 0,
"output_cost_per_token": 0,
"output_cost_per_character": 0,
"output_cost_per_token_above_128k_tokens": 0,
"output_cost_per_character_above_128k_tokens": 0,
"litellm_provider": "vertex_ai-language-models",
"mode": "chat",
"supports_system_messages": true,
"supports_function_calling": false,
"supports_vision": true,
"supports_response_schema": false,
"supports_audio_output": false,
"source": "https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#gemini-2.0-flash"
},
"gemini/gemini-2.0-flash-exp": {
"max_tokens": 8192,
"max_input_tokens": 1048576,
Expand Down
6 changes: 2 additions & 4 deletions litellm/proxy/proxy_config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
model_list:
- model_name: fake-openai-endpoint
- model_name: bedrock/*
litellm_params:
model: openai/fake
api_key: fake-key
api_base: https://exampleopenaiendpoint-production.up.railway.app/
model: bedrock/*

litellm_settings:
callbacks: ["datadog"]
Expand Down
16 changes: 14 additions & 2 deletions ui/litellm-dashboard/src/components/view_logs/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import moment from "moment";
import React from "react";
import { CountryCell } from "./country_cell";
import { getProviderLogoAndName } from "../provider_info_helpers";
import { Tooltip } from "antd";

export type LogEntry = {
request_id: string;
Expand All @@ -19,6 +20,7 @@ export type LogEntry = {
startTime: string;
endTime: string;
user?: string;
end_user?: string;
custom_llm_provider?: string;
metadata?: Record<string, any>;
cache_hit: string;
Expand Down Expand Up @@ -111,6 +113,7 @@ export const columns: ColumnDef<LogEntry>[] = [
cell: (info: any) => {
const row = info.row.original;
const provider = row.custom_llm_provider;
const modelName = String(info.getValue() || "");
return (
<div className="flex items-center space-x-2">
{provider && (
Expand All @@ -124,7 +127,11 @@ export const columns: ColumnDef<LogEntry>[] = [
}}
/>
)}
<span>{String(info.getValue() || "")}</span>
<Tooltip title={modelName}>
<span className="max-w-[100px] truncate">
{modelName}
</span>
</Tooltip>
</div>
);
},
Expand All @@ -146,10 +153,15 @@ export const columns: ColumnDef<LogEntry>[] = [
},
},
{
header: "User",
header: "Internal User",
accessorKey: "user",
cell: (info: any) => <span>{String(info.getValue() || "-")}</span>,
},
{
header: "End User",
accessorKey: "end_user",
cell: (info: any) => <span>{String(info.getValue() || "-")}</span>,
},
{
header: "Cost",
accessorKey: "spend",
Expand Down