feat(models): add max concurrency setting for background tasks

Introduce a new `max_concurrency` parameter to the model configuration, allowing control over the maximum number of concurrent background tasks (ingestion/enrichment) per model. This feature is applicable to chat, embedding, and VLM models, with a value of 0 or undefined falling back to the global default. Update UI components and localization files to support this new setting, ensuring a seamless user experience.
This commit is contained in:
wizardchen
2026-07-09 19:56:43 +08:00
committed by lyingbug
parent 200c344065
commit 20256287ec
17 changed files with 173 additions and 55 deletions
+2
View File
@@ -47,6 +47,7 @@ type ModelParametersDTO struct {
ExtraConfig map[string]string `json:"extra_config,omitempty"`
CustomHeaders map[string]string `json:"custom_headers,omitempty"`
SupportsVision bool `json:"supports_vision"`
MaxConcurrency int `json:"max_concurrency,omitempty"`
AppID string `json:"app_id,omitempty"`
}
@@ -67,6 +68,7 @@ func NewModelResponse(ctx context.Context, m *types.Model) *ModelResponse {
ExtraConfig: m.Parameters.ExtraConfig,
CustomHeaders: m.Parameters.CustomHeaders,
SupportsVision: m.Parameters.SupportsVision,
MaxConcurrency: m.Parameters.MaxConcurrency,
AppID: m.Parameters.AppID,
}
if !CanViewIntegrationSecrets(ctx) {