📋 All Releases English | 简体中文
Release Date: 2025-11-11 (29 commits since 1.8.0.247)
1.8.1 is a significant feature enhancement release. The core highlights include User Model Permission Management System, Reasoning Content Lifecycle Tracking & Auto-collapse, File Preview Component Refactor, and Chat List Caching Optimization. This release also adds TokenPony provider support, upgrades Azure OpenAI branding to Azure AI Foundry, and fixes reasoning content parsing issues caused by the OpenAI 2.6.0 upgrade.
New Management Interface:
- New
/admin/user-modelspage (manage by user dimension) - New "Model Users" management in model page (manage by model dimension)
- Tree structure displays user → model key → model permission relationships
- Support batch grant/revoke model access permissions
Core Components (3 new components):
ByUserTab.tsx(1,180 lines) - View and manage model permissions by user- User list (with search and filter)
- Skeleton loading state
- URL state persistence (shareable URLs and state persistence across refreshes)
UserModelTree.tsx(912 lines) - Tree view of user model permissions- Three-layer structure: Provider → Model Key → Model
- Checkbox full/partial selection state management
- Batch permission updates
ModelUserList.tsx(506 lines) - Manage user permissions from model perspective- Display users with access to the model
- Add/remove user permissions
- Drawer interface (max-height 384px, scrollable)
Interaction Optimizations:
- URL as single source of truth for state (shareable URLs and browser navigation)
- Search criteria and filters automatically sync to URL parameters
- Maintain filter and search state after page refresh
- New "User Permissions" action button in model list page
Backend Support:
- New user list query API (optimized loading performance)
- New model user list API (query authorized users by model)
- Batch permission update API (reduce network requests)
Reasoning State Tracking:
- New
finishedflag inReasoningContenttypefinished: false- Reasoning in progress (auto-expand)finished: true- Reasoning completed (auto-collapse)undefined- Historical data (treated as completed)
- Real-time marking of reasoning segment lifecycle status
- Automatically mark as finished when receiving any non-reasoning SSE event
Smart Collapse Behavior:
ThinkingMessagecomponent auto-expands/collapses based onfinishedstate- During reasoning: auto-expand, show real-time thinking process
- After completion: auto-collapse, save screen space
ToolCallBlockcomponent auto-collapse optimization- Auto-collapse tool call details when tool response arrives
- Support manual toggle, user actions have highest priority
- All auto-collapse behaviors respect manual user toggles
Prevent Premature API Calls:
- Added
chatStatusguard condition - Avoid calling reasoning duration API during streaming
- Avoid requests with temporary message IDs (
RESPONSE_MESSAGE_TEMP_ID) - Fixed "input string was not in a correct format" error
Backend Support:
- Pass
cancellationTokenthrough tool execution chain - Support proper cancellation handling mechanism
New FilePreview Component (270 lines):
- Unified file preview and interaction experience
- Support multiple file types:
- Images (auto-display)
- Videos (HTML5 player)
- Audio (HTML5 player)
- Documents (icon + filename + download button)
- Smart file type recognition (based on
contentTypeandfileName)
New File Type Icons (7 icons):
- PDF (
IconFilePdf) - Word (
IconFileWord) - Excel (
IconFileExcel) - PowerPoint (
IconFilePpt) - ZIP archives (
IconFileZip) - Text files (
IconFileText) - Generic files (
IconFile)
Unified Interaction Features:
- Hover effects (semi-transparent overlay + scale)
- Delete button (optional, with confirmation)
- Download button (for non-image files)
- Image click preview (integrated with
ImagePreviewcomponent) - Consistent styles and behaviors
Application Scope:
ChatInput- Attachment preview in message inputResponseMessage- File display in response messagesUserMessage- File display in user messages- Replaces duplicate code in three places
Backend Refactor:
- File processing logic moved from
ChatControllertoChatService - Content type checking moved to
ChatCompletionServicelayer - Fixed
gemini-2.0-flash-expfile support issue - Improved file type support with ImageSharp library (supports JPEG, PNG, GIF, WebP, BMP, etc.)
Cleanup:
- Removed
GeneratedImageSizeclass and database mapping - Removed
KnownImageSizeclass and database mapping - These classes were no longer used in 1.8.0
New chatCache.ts Utility Module (122 lines):
- Cache chat list to
localStorage - Cache keys bound to username (
chat_groups_cache_{username}) - Auto-expiration mechanism (24 hours)
- Search keyword sensitive (different keywords use different caches)
Loading Flow Optimization:
- Load chat list from cache first (instant display)
- Parallel initial API requests (chat list, user info, model list, etc.)
- Update cache and UI after API returns
- Removed blocking full-screen loading screen
User Experience Enhancement:
- Immediately display chat list on first app entry (no API wait)
- Significantly improved perceived performance (shorter time to content)
- Notable improvement on slow networks
Security Assurance:
- Auto-clear cache on logout (prevent cross-user data leakage)
- Validate username match in cache (prevent seeing old data after user switch)
- Auto-clear and reload if cache doesn't match
Other Optimizations:
- Added loading state to new chat button (show spinner + disable button)
- Prevent duplicate chat creation from multiple clicks
handleNewChatreturns Promise for proper async handling
New TokenPony Provider (ID=19):
- Provider name: TokenPony (小马算力)
- Default URL:
https://api.tokenpony.cn/v1 - New
tokenpony.svgicon - Full Chinese and English translation support
Azure Branding Upgrade:
DBModelProvider.AzureOpenAI→DBModelProvider.AzureAIFoundry(enum value remains 1)AzureChatCompletionService→AzureAIFoundryChatService(class rename)- Icon update:
azure-openai.svg→azure-ai-foundry.svg - Azure services auto-handle URLs (auto-append
/openai/v1/if not present)
URL Transformation Logic:
- New
TransformAzureAIFoundryHostmethod (auto-append path) - New
CreateTransformedModelKeymethod (unified transformation logic) AzureResponseApiServiceandAzureImageGenerationServicereuse transformation methods- Reduced duplicate code, improved maintainability
Provider Selector UI Optimization:
- Changed from dropdown to icon grid layout
- Responsive columns (4-8 cols, auto-adjust based on screen width)
- Scrollable container (max-height limit)
- Responsive padding (better mobile display)
- Fixed dark theme Ollama/OpenRouter/GitHub icon backgrounds (removed black backgrounds)
ChatService Architecture Simplification:
- Removed
suggestedApiUrlparameter from allChatServiceconstructors - Simplified URL fallback logic:
ModelKey.Host→ModelProviderInfo.GetInitialHost - Removed empty
ChatServiceimplementations (DeepSeek, Doubao, MiniMax, Kimi, Ollama, Xunfei) ChatFactoryauto-fallback toChatCompletionServicefor unknown providers- Reduced boilerplate code, improved readability
Icon Button Improvements:
- Theme toggle button changed to icon button (removed text label)
- Language toggle button changed to icon button (removed text label)
- Cleaner UI, space-saving
- Maintains full functionality (hover tooltips still display)
Navigation Improvements:
- Settings page tabs changed from
<button>to<a>tags - Support right-click menu (open in new tab)
- Support
Ctrl/Cmd+Clickto open in new tab - Improved accessibility (semantic HTML)
Back Button Fix:
- Fixed back button always returning to home issue
- Correctly uses browser history
- Improved navigation experience
Reasoning Content Parsing Issue:
- Fixed
reasoning_contentreading issue after upgrading to OpenAI 2.6.0 - Switched to self-compiled
Sdcb.OpenAIlibrary (version 2.6.0-alpha.3) - Fixed reasoning content extraction/decode issues
- Ensured reasoning responses parse and display correctly
Dependency Changes:
- ❌ Removed
OpenAI2.5.0 (official package) - ✅ Added
Sdcb.OpenAI2.6.0-alpha.3 (self-compiled package with reasoning content fix)
- Disabled OpenAI client auto-retry mechanism
- Avoid long hangs and duplicate requests
- Improved error handling predictability
- Better user experience (fail fast rather than long waits)
- Optimized OpenRouter error message display
- Provided clearer error prompts
- Helps users quickly identify issues
Migration Script Location:
src/scripts/db-migration/1.8/1.8.1.sqlClean Azure AI Foundry URLs:
- Remove
api-versionquery parameters fromModelKey.Host - Clean URLs ending with
/openai/v1?api-version=preview - Example:
- Before:
https://xxx.openai.azure.com/openai/v1?api-version=preview - After:
https://xxx.openai.azure.com/openai/v1
- Before:
- Only affects records with
ModelProviderId = 1(Azure AI Foundry) - Includes validation output (shows affected records)
- Safety: Auto-detect and clean, doesn't affect other providers
- Idempotency: Can be executed repeatedly (uses
LIKEcondition check) - Validation: Shows affected records after migration for confirmation
- Backup database (recommended)
- Execute migration script:
sqlcmd -S localhost -d Chats -i 1.8.1.sql
- Verify migration results:
-- Check Azure AI Foundry ModelKey Host SELECT Id, Name, Host, CreatedAt FROM ModelKey WHERE ModelProviderId = 1 AND Host IS NOT NULL;
- Commit Count: 29 commits
- Major Changes: User model permission management, reasoning lifecycle tracking, file preview refactor, chat cache optimization
Frontend New Components:
ByUserTab.tsx- 1,180 lines (manage model permissions by user)UserModelTree.tsx- 912 lines (tree view of permissions)ModelUserList.tsx- 506 lines (manage users from model perspective)EditUserModelDialog.tsx- 214 lines (edit user model permission dialog)FilePreview.tsx- 270 lines (unified file preview component)chatCache.ts- 122 lines (chat list cache utility)
Frontend Refactors:
GeneralTab.tsx- Theme/language toggle changed to icon buttonspages/admin/users/index.tsx- Simplified and removed redundant code (-202 lines net deletion)pages/admin/model/index.tsx- Added model user management entry (+34 lines)types/adminApis.ts- Added user model management related API type definitions (+86 lines)
Backend Changes:
- Added
TokenPonyprovider (ID=19) DBModelProvider.AzureOpenAI→DBModelProvider.AzureAIFoundryAzureChatCompletionService→AzureAIFoundryChatService- Removed empty ChatService implementations
- Simplified ChatService constructor parameters
- File processing logic refactor
Database:
- New 1.8.1 migration script (35 lines)
Localization:
- Added TokenPony related translations (zh-CN.json +35 lines)
- Added user model management related translations
- Backup database (recommended)
- Stop application services
- Execute database migration:
sqlcmd -S localhost -d Chats -i 1.8.1.sql
- Update backend code
- Note: If you have custom Azure-related code, update class names and enum values
AzureOpenAI→AzureAIFoundryAzureChatCompletionService→AzureAIFoundryChatService
- Update frontend code
- Update
DBModelProviderenum references
- Update
- Start application services
- Verify functionality:
- Test Azure AI Foundry models work correctly
- Test user model permission management features
- Test file preview functionality
- Test reasoning model auto-collapse features
- Verify chat list cache is working
User Model Permission Management:
- Go to
/admin/user-modelspage - Select the user to manage in the user list
- Check/uncheck model permissions in the tree structure
- Click "Save Changes" to apply permission changes
- Alternatively, click "User Permissions" button from model page to view and manage user access for specific models
Chat List Caching:
- Automatically enabled, no configuration needed
- First access caches chat list to browser local storage
- Subsequent accesses load from cache first, then update
- Auto-clears cache on logout
File Preview:
- File preview automatically displays after upload
- Image types: Direct thumbnail display, click for fullscreen preview
- Video/Audio: Display player
- Documents: Show file icon + filename + download button
Affected Scope:
- Enum value
DBModelProvider.AzureOpenAIrenamed toDBModelProvider.AzureAIFoundry - Enum numeric value remains unchanged (still 1)
- Both frontend and backend need to update references
Migration Method:
// Before
if (modelProviderId === DBModelProvider.AzureOpenAI) { ... }
// After
if (modelProviderId === DBModelProvider.AzureAIFoundry) { ... }Database Impact:
- No database migration needed (enum value unchanged)
- Code-level rename only
Affected Scope:
- Removed
suggestedApiUrlparameter from allChatServiceconstructors - If you have custom ChatService implementations, update constructor signatures
Migration Method:
// Before
public class MyChatService(Model model, string suggestedApiUrl)
: ChatCompletionService(model, suggestedApiUrl) { }
// After
public class MyChatService(Model model)
: ChatCompletionService(model) { }- 📖 1.8.0 Release Notes - Learn about previous major architecture changes
- 📖 1.8.0 API Changes - Detailed API interface changes
- 📖 Build Documentation - How to build and deploy
- ☁️ Azure Deployment Documentation - How to deploy to Azure
- 🐛 Report Issues
- 💬 Join Discussions
- 📧 Contact Author: https://github.com/sdcb
Thanks to all developers who contributed to this release!
Special thanks to:
- @sdcb - User model permission management, reasoning lifecycle tracking, file preview refactor, chat cache optimization, Azure branding upgrade, TokenPony provider, OpenAI 2.6.0 upgrade fixes
If you have any questions or suggestions, please provide feedback on GitHub Issues.
- ✅ User model permission management system (dual perspective: by user and by model)
- ✅ Reasoning content lifecycle tracking and auto-collapse
- ✅ File preview component refactor (unified experience + multiple file type support)
- ✅ Chat list caching (localStorage + 24-hour expiration)
- ✅ TokenPony provider support (ID=19)
- ✅ New chat button loading state
- ✅ Azure OpenAI branding upgraded to Azure AI Foundry
- ✅ ChatService architecture simplification (removed suggestedApiUrl parameter)
- ✅ File processing logic moved from Controller to Service layer
- ✅ Removed empty ChatService implementations
- ✅ Unified Azure URL transformation logic
- ✅ Provider selector changed to icon grid layout
- ✅ Theme/language toggle changed to icon buttons
- ✅ Fixed icon backgrounds in dark theme
- ✅ Fixed back button behavior
- ✅ Navigation links support right-click menu and new tab opening
- ✅ Fixed reasoning content parsing issue caused by OpenAI 2.6.0 upgrade
- ✅ Disabled OpenAI client auto-retry
- ✅ Optimized OpenRouter error messages
- ✅ Fixed gemini-2.0-flash-exp file support issue
- ✅ Clean api-version parameters from Azure AI Foundry ModelKey Host
- ✅ Removed GeneratedImageSize and KnownImageSize classes
- ✅ Removed redundant ChatService implementations
- ✅ Simplified user management page code (-202 lines)
Last updated: 2025-11-11