# Changelog v0.2.8 - 2026-03-13

### Updated

- 📊 **Provider quota information refreshed** – Updated free‑tier request limits for NVIDIA NIM, Groq, Cerebras, Replicate, DeepInfra, and Fireworks AI in `src/provider-metadata.js` and the README.
- 📖 **README requirements section** – Added the latest quota details for each provider (40 req/min for NVIDIA, 30‑50 RPM for Groq, generous dev tier for Cerebras, 6 req/min free Replicate, 200 concurrent DeepInfra, 10 req/min free Fireworks) and clarified payment‑method dependent limits.
- 🛠️ **No functional code changes** – Metadata updates only; all tests continue to pass.

### Added

- 📊 **Added `--json` flag for scriptable output** - Output model results as JSON for automation, CI/CD, and monitoring dashboards. Example: `free-coding-models --tier S --json | jq '.[0].modelId'`

- 💾 **Added persistent ping cache** - Cache ping results for 5 minutes to speed up subsequent runs:
  - Cache stored in `~/.free-coding-models.cache.json`
  - Automatic cache refresh on startup if stale
  - Saves API rate limits and reduces wait time
  - Cache is saved on exit for next run

- 🔐 **Added config file security check with auto-fix** - Warns if `~/.free-coding-models.json` has insecure permissions:
  - Checks file permissions on startup
  - Warns if file is readable by others (security risk)
  - Offers one-click auto-fix with `chmod 600`
  - Shows manual fix command if auto-fix fails or is declined

- 🎨 **Added provider colors to logs and settings** - Provider names are now colored the same way as in the main table:
  - Settings overlay (P) shows colored provider names
  - Fiable mode output uses colored provider names
  - Tool launcher messages use colored provider names
  - Request log overlay (X) shows colored provider names
  - Consistent visual experience across all UI elements

### Changed

- 📝 **Increased default log limit from 200 to 500 entries** - Request log overlay now shows up to 500 entries by default (previously 200)
- 🔀 **Added toggle for unlimited logs** - Press `A` in request log overlay to toggle between showing 500 entries or ALL logs
- ❌ **Enhanced visual failure indication in logs** - Failed requests with zero tokens now have:
  - Dark red background (`rgb(40, 0, 0)`) on the entire row
  - Model name in red
  - Token column shows red cross emoji (✗) instead of token count
  - Quick visual identification of errors vs successful requests
- 📝 **Updated documentation** - Added `--json` flag to CLI flags table in README.md with usage examples

- 🔌 Added `terminalcp` MCP server configuration for Claude Code to spawn and interact with the TUI headlessly. Agents can now visually test the terminal interface by capturing output and sending keystrokes programmatically. See AGENTS.md → "Testing the TUI with terminalcp" for usage.
- 🎨 **Added consistent branding header to all overlays** - Each overlay (Settings, Help, Log, Install Endpoints, Recommend, Feature Request, Bug Report) now displays:
  - Free-coding-models logo with rocket emoji (🚀)
  - Version number display
  - Clean title on a separate line
  - Consistent visual styling across all screens
  - **Main table title now uses rocket emoji (🚀) and cyanBright color** for consistency with overlays

### Changed

- 📝 **Updated documentation** - Added `--json` flag to CLI flags table in README.md with usage examples

- 📊 **Improved ping progress visibility** - Moved ping completion counter from the W badge to the main status bar:
  - Now shows as `📦 49/59` next to model status counts (up/timeout/down)
  - More prominent placement makes it easier to see ping progress at a glance
  - W badge still shows interval, mode, and countdown to next ping

- 🧹 **Removed unnecessary blank line** - Overlays (Settings P, Help K, Log X) no longer have a blank line at the top, giving more vertical space for content

- 🔽 **Removed duplicate "CONFIGURED ONLY" badge** - The header no longer shows the "CONFIGURED ONLY" indicator since it's already displayed in the footer hints. This reduces header clutter while keeping the information visible.

- 🎨 **Enhanced Request Log (X) with colors and visual indicators**:
  - **Latency gradient**: Green (<500ms) → Orange (<1000ms) → Yellow (<1500ms) → Red (≥1500ms) for quick performance assessment
  - **Token opacity**: Light green (low usage) → Medium green → Bright green (high usage, >30k tokens)
  - **Model coloring**: Matches status color for visual consistency
  - **Status colors** - Distinct colors for each HTTP code:
    - `200` ✅ → Bright green
    - `400` → Dark magenta (#8B008B)
    - `401` → Dark orchid (#9932CC)
    - `403` → Medium orchid (#BA55D3)
    - `404` → Dark red (crimson)
    - `413` → Tomato red (#FF6347)
    - `429` → Dark orange (#FFB90F)
    - `500` → Crimson (#DC143C)
    - `502` → Medium violet red (#C71585)
    - `503` → Medium purple (#9370DB)
    - `5xx` → Magenta (other 5xx errors)
    - `0` → Dim gray (timeout/unknown)
  - **Fixed token display bug**: Corrected chalk function calls that were showing JavaScript code instead of token counts

- 💖 **Added "Buy me a coffee" link to footer**:
  - Added in main TUI footer next to Contributors link (buymeacoffee.com/vavanessadev)
  - Added in Settings overlay (P) footer with credits "Made with 💖 & ☕ by vava-nessa"
  - Warm orange color for the coffee link to match the cozy theme

### Fixed

- 🖥️ **Overlays now use 100% terminal width** - All overlays (Settings P, Help K, Log X, Recommend Q, Feature J, Bug I) now dynamically adapt to full terminal width instead of fixed 116-column panels:
  - Rate limits text is no longer truncated (full descriptions visible)
  - Diagnostic messages wrap using available terminal width
  - Separator lines extend to full terminal width
  - Better readability on wider terminals

- 🔒 **Fixed profile loading to preserve API keys** - Loading a profile now MERGES apiKeys instead of replacing them:
  - Keys in the profile override existing keys (allows profile-specific overrides)
  - Keys NOT in the profile are preserved (prevents key loss when switching profiles)
  - Fixes bug where switching profiles would cause API keys disappear
  - Added test to verify merge behavior

- 📝 **Updated OpenRouter rate limits information**:
  - README now includes detailed explanation of free tier quotas (50/day <$10 credits, 1000/day ≥$10)
  - Settings overlay displays accurate rate limit text
  - Added note about failed requests counting toward daily quota

---
