Merged
Conversation
- Fix default model config not saved correctly after refresh - Remove max_tokens upper limit to allow flexible model specs - Fix provider dropdown showing too many options - Fix configured models not appearing in Agent/homepage after save - Change ModelConfig.provider from Enum to str for flexibility
- Fix model list not showing configured models in Agent/app model selector - Read models from both worker manager and system_app.config - Support both old worker-based and new config-based models
Breaking Changes: - Remove separate default_model config section - Add is_default field to model configuration - Simplify UI: set default model directly in model list - Each provider can have one default model Changes: - Backend: Add is_default to LLMProviderModelConfig schema - Frontend: Rewrite LLMSettingsSection with new design - Add model helper functions for finding default model - Update type definitions Benefits: - Single source of truth: no sync issues - Better UX: set default directly in model list - Simpler code: no complex derivation logic
…fter save - Clear old cache before registering new models - Reload model list after saving configuration - Fix models not showing until restart
…odels from showing - Change API logic to only use config models when available - Fall back to worker models only if no config models found - Prevents deleted models from persisting in model list - Affects /api/v1/model/types and /api/v2/serve/model/model-types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复系统配置管理模块中的模型提供商配置相关问题
Changes
deriveDefaultProviderName函数逻辑/api/v2/serve/model/model-typesAPI中添加读取配置文件的逻辑,使配置的模型能立即在Agent和首页显示ModelConfig.provider从 Enum 类型改为 str 类型,支持任意provider名称Files Changed
packages/derisk-core/src/derisk_core/config/schema.pypackages/derisk-serve/src/derisk_serve/model/api/endpoints.pyweb/src/components/config/LLMSettingsSection.tsxTest Plan