refactor(api): remove unused OpenAI compatibility provider logic

Simplify handler logic by removing OpenAI compatibility provider management, including related mutex handling and configuration updates.
This commit is contained in:
Luis Pater
2025-12-17 02:58:14 +08:00
parent bcb8092488
commit 344066fd11
3 changed files with 11 additions and 64 deletions

View File

@@ -934,12 +934,6 @@ func (s *Server) UpdateClients(cfg *config.Config) {
// Save YAML snapshot for next comparison
s.oldConfigYaml, _ = yaml.Marshal(cfg)
providerNames := make([]string, 0, len(cfg.OpenAICompatibility))
for _, p := range cfg.OpenAICompatibility {
providerNames = append(providerNames, p.Name)
}
s.handlers.SetOpenAICompatProviders(providerNames)
s.handlers.UpdateClients(&cfg.SDKConfig)
if !cfg.RemoteManagement.DisableControlPanel {