Commit Graph
10 Commits
Author SHA1 Message Date
Thiên Toán 74c9879e8e feat: add minimax tts support (#1043) 2026-05-13 15:34:10 +07:00
Thiên ToánandCursor a48fa4eb21 fix: handle permission denied when creating DATA_DIR (#1005)
Fallback to default user directory (~/.9router) when configured
DATA_DIR is not writable (EACCES/EPERM). Other errors still throw.

Co-authored-by: Thiên Toán <toanalien@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 09:35:49 +07:00
Thiên Toán 4e92a66379 fix(auth): wire up dashboard auth guard as Next.js proxy (#227)
Dashboard routes were accessible without authentication because
dashboardGuard.js was not connected to Next.js middleware pipeline.

Created src/proxy.js to export the auth guard using Next.js 16
proxy convention. Now /dashboard routes properly redirect to
/login when auth_token cookie is missing or invalid.
2026-03-02 15:21:50 +07:00
Thiên Toán d1ce98ca8a feat: add API key visibility toggle in Endpoint dashboard (#214)
- Added eye icon button to show/hide individual API keys
- Keys hidden by default on page load for security
- Copy button always copies full key regardless of visibility state
- Implemented per-key visibility state with React useState
- Added maskKey helper to display first 8 characters + "..."
- Clean up visibility state when keys are deleted

Improves security and UX when managing API keys in the dashboard.
2026-02-28 11:07:51 +07:00
Thiên Toán 39d04d0425 Add GitHub Actions workflow for Docker build and push (#185) 2026-02-25 10:34:23 +07:00
Thiên Toán 73388a02a1 feat: add pause/resume functionality for API keys (#158)
- Add isActive field to API key schema with migration
- Implement PUT /api/keys/[id] endpoint for toggle
- Update validation to reject paused keys (403)
- Add UI toggle controls with confirmation
- Ensure cloud sync preserves pause state
2026-02-20 15:07:12 +07:00
Thiên Toán 806bd4ae14 feat: add API endpoint dimension to usage statistics dashboard (#152)
- Tracks endpoints like /v1/chat/completions, /v1/messages, /v1/responses
- New sortable/groupable table in usage dashboard with expandable groups
- Enhanced usage database aggregation by endpoint + model + provider
- Added endpoint tracking to all saveRequestUsage/saveRequestDetail calls
- Maintains backward compatibility with existing data structure
2026-02-20 15:03:18 +07:00
Thiên Toán 9fbd6e619d fix: correct token extraction for Claude non-streaming responses (#131)
- Add response logging for non-streaming requests (5_res_provider.json, 7_res_client.json)
- Fix extractUsageFromResponse() to check Claude format before OpenAI format
- Prevents format misidentification that caused tokens to show as 0
- Claude uses input_tokens/output_tokens vs OpenAI's prompt_tokens/completion_tokens

Fixes dashboard Details tab showing 0 tokens for Claude requests
2026-02-20 14:24:21 +07:00
Thiên Toán 6caef7f552 feat: add URL-based tab state persistence in usage page (#129)
- Add URL search params to track active tab
- Persist tab selection on page refresh
- Enable direct linking to specific tabs (overview, logs, limits, details)
- Implement smooth navigation without page scroll
2026-02-15 17:26:47 +07:00
Thiên Toán 3df0a4d4b0 Add GitHub Actions workflow for Docker build and push (#91) 2026-02-10 18:38:14 +07:00