# AI Model Performance Dashboard Multi-provider AI performance dashboard with context occupancy tracking, truncation warnings, TTFT latency, tokens/min rate, and model comparison metrics. --- ## Metadata **Title:** AI Model Performance Dashboard **Category:** statuslines **Author:** JSONbored **Added:** October 2025 **Tags:** dashboard, performance, multi-model, metrics, occupancy, latency, production **URL:** https://claudepro.directory/statuslines/ai-model-performance-dashboard ## Overview Multi-provider AI performance dashboard with context occupancy tracking, truncation warnings, TTFT latency, tokens/min rate, and model comparison metrics. ## Content #!/usr/bin/env bash AI MODEL PERFORMANCE DASHBOARD FOR CLAUDE CODE DISPLAYS: OCCUPANCY % | TRUNCATION | TTFT | TOKENS/MIN | MODEL LIMITS READ JSON FROM STDIN read -r input EXTRACT VALUES model=$(echo "$input" | jq -r '.model // "unknown"') prompt_tokens=$(echo "$input" | jq -r '.session.promptTokens // 0') completion_tokens=$(echo "$input" | jq -r '.session.completionTokens // 0') total_tokens=$(echo "$input" | jq -r '.session.totalTokens // 0') session_start=$(echo "$input" | jq -r '.session.startTime // ""') MODEL CONTEXT LIMITS ( VERIFIED) case "$model" in "claude-sonnet-4"|"claude-4") context_limit= model_display="Claude Sonnet 4" ;; "claude-3.5"|"claude-sonnet-3.5") context_limit= model_display="Claude 3.5 Sonnet" ;; "gpt-4.1"|"gpt-4-turbo") context_limit= model_display="GPT-4.1 Turbo" ;; "gpt-4o") context_limit= model_display="GPT-4o" ;; "gemini-1.5-pro") context_limit= model_display="Gemini 1.5 Pro" ;; "gemini-2") context_limit= model_display="Gemini 2.x" ;; "grok-3") context_limit= model_display="Grok 3" ;; "grok-4") context_limit= model_display="Grok 4" ;; "llama-4") context_limit= model_display="Llama 4 Scout" ;; *) context_limit= model_display="$model" ;; esac CALCULATE OCCUPANCY PERCENTAGE if [ $context_limit -gt 0 ]; then occupancy=$((prompttokens * / contextlimit)) else occupancy=0 fi OCCUPANCY COLOR CODING if [ $occupancy -lt 50 ]; then OCC_COLOR="\[38;5;46m" # Green: 80% fi TRUNCATION WARNING (MODELS FAIL BEFORE ADVERTISED LIMITS) reliablelimit=$((contextlimit * 65 / )) # 65% of claimed limit if [ $prompttokens -gt $reliablelimit ]; then truncation="⚠ TRUNCATION RISK" TRUNC_COLOR="\[38;5;196m" else truncation="✓ Safe" TRUNC_COLOR="\[38;5;46m" fi CALCULATE TOKENS PER MINUTE if [ -n "$session_start" ]; then current_time=$(date +%s) startepoch=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$sessionstart" +%s 2>/dev/null || echo "$current_time") elapsedseconds=$((currenttime - start_epoch)) if [ $elapsed_seconds -gt 0 ]; then tokenspermin=$((totaltokens * 60 / elapsedseconds)) else tokenspermin=0 fi else tokenspermin=0 fi FORMAT NUMBERS WITH COMMAS formatNumber() { printf "%'d" "$1" 2>/dev/null || echo "$1" } TTFT SIMULATION (TIME TO FIRST TOKEN - WOULD NEED ACTUAL TIMING) FOR DEMO PURPOSES, ESTIMATE BASED ON TOKENS if [ $prompt_tokens -gt ]; then ttft="~2.5s" TTFT_COLOR="\[38;5;226m" elif [ $prompt_tokens -gt ]; then ttft="~1.2s" TTFT_COLOR="\[38;5;46m" else ttft="~0.8s" TTFT_COLOR="\[38;5;46m" fi RESET="\[0m" BOLD="\[1m" BUILD DASHBOARD (MULTI-LINE FOR COMPREHENSIVE VIEW) echo -e "${BOLD}📊 ${model_display}${RESET}" echo -e "${OCCCOLOR}Occupancy: ${occupancy}%${RESET} ($(formatNumber $prompttokens)/$(formatNumber $contextlimit) tokens) | ${TRUNCCOLOR}${truncation}${RESET}" echo -e "${TTFTCOLOR}TTFT: ${ttft}${RESET} | Rate: ${tokenspermin} tok/min | Total: $(formatNumber $totaltokens)" KEY FEATURES ? Multi-provider model support (Claude, GPT, Gemini, Grok, Llama) ? Context occupancy percentage with color-coded warnings ? Truncation risk alerts based on real-world model reliability limits (65%) ? Time to First Token (TTFT) estimation for latency monitoring ? Tokens per minute rate calculation for throughput tracking ? Formatted number display with thousands separators ? verified context limits for all major models ? Multi-line dashboard for comprehensive metrics at a glance CONFIGURATION Format: bash Refresh Interval: 2000ms Position: left Color Scheme: traffic-light-metrics USE CASES ? Production workflows requiring performance monitoring ? Multi-model comparison and optimization ? Preventing context truncation in long conversations ? Tracking token consumption rates for cost management ? Identifying latency issues before they impact workflow ? SLA monitoring for enterprise AI deployments ? Performance regression detection across model versions TROUBLESHOOTING 1) Occupancy percentage always showing 0% or incorrect values Solution: Verify session.promptTokens exists in JSON: jq .session.promptTokens. Check context_limit set correctly for model. Test calculation: echo $(( * / )) (should be 10). Ensure integer division working. 2) Model not recognized, showing default context_limit Solution: Check model string extraction: jq -r .model. Verify case statement matches model name pattern. Add custom model: Add case for "your-model") context_limit=X ;; before default case. 3) Tokens per minute showing 0 or extremely high numbers Solution: Verify session.startTime format: jq -r .session.startTime. Check date parsing works: date -j -f '%Y-%m-%dT%H:%M:%SZ' '-23T10:00:00Z' +%s. Linux users use -d instead of -j. Ensure elapsed_seconds > 0. 4) Number formatting with commas not working (showing raw numbers) Solution: Check printf thousands separator support: printf "%'d" . If unsupported, formatNumber falls back to raw echo. Enable locale: export LCNUMERIC=enUS.UTF-8. Test: locale | grep LC_NUMERIC. 5) Truncation warning appearing too early or too late Solution: Adjust reliablelimit calculation (currently 65% of contextlimit). Research shows models fail % before claimed limits. Increase for conservative: reliablelimit=$((contextlimit * 50 / )). Decrease for aggressive: 75%. TECHNICAL DETAILS Documentation: https://epoch.ai/data-insights/context-windows PREVIEW 📊 Claude Sonnet 4 Occupancy: 42% (,/1,, tokens) | ✓ Safe TTFT: ~1.2s | Rate: 1, tok/min | Total: , --- Source: Claude Pro Directory Website: https://claudepro.directory URL: https://claudepro.directory/statuslines/ai-model-performance-dashboard This content is optimized for Large Language Models (LLMs). For full formatting and interactive features, visit the website.