✨ Features:
- Add admin portal thread viewer with pagination
- Display thread list with project names and public status
- Add clickable links to view threads via /share/{thread_id}
- Add admin bypass for accessing all threads (public and private)
🔧 Backend Refactoring:
- Consolidate admin APIs into admin_api.py and billing_admin_api.py
- Remove unused files: users_admin.py, admin/api.py
- Remove unused endpoints: user search, grant-bulk-credits, migrate-user
- Update admin thread endpoint to use share URLs
⚡ Performance:
- Remove message_count from UserThreadSummary (optimization)
- Remove N+1 query issue in thread listing
🔒 Authorization:
- Add admin role bypass in verify_and_authorize_thread_access
- Create RLS migration (20251005160000_admin_roles_access.sql)
- Update thread_select_policy for admin access
- Update message_select_policy for admin access
- Update project_select_policy for admin access
- Update agent_runs_select_policy for admin access
💻 Frontend:
- Add Threads tab to admin user details dialog
- Add useAdminUserThreads hook with pagination
- Remove unused admin hooks (useAdminUserSearch, useAdminAdvancedSearch)
- Display thread metadata with Open button and ExternalLink icon
🗃️ Database:
- Apply RLS policies allowing admin/super_admin roles to bypass restrictions
- Admins can now view any thread, message, project, or agent_run
This enables admins to view and debug any user's threads through the
share page interface, regardless of public/private status.
- Add Claude Sonnet 4.5 (global.anthropic.claude-sonnet-4-5-20250929-v1:0) to registry
- Update all Anthropic models to use bedrock/converse/ endpoint with full ARNs
- Create comprehensive ModelConfig class for centralized provider settings
- Add alias system with raw ARNs for proper LiteLLM response resolution
- Refactor response processor to preserve exact LiteLLM response objects
- Simplify LLM service by merging prepare_params into make_llm_api_call
- Set stream_options include_usage as universal default for all models
- Remove scattered configuration functions in favor of registry-driven approach
- Fix pricing lookup by mapping provider model IDs back to registry entries
- Add Claude Sonnet 4.5 (global.anthropic.claude-sonnet-4-5-20250929-v1:0) to model registry
- Update all Anthropic models to use bedrock/converse/ endpoint with full ARNs
- Restore alias system for proper model ID resolution from LiteLLM responses
- Refactor response processor to preserve exact LiteLLM response objects
- Fix pricing lookup by mapping raw ARNs to registry model IDs via aliases