mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
rebuild branch
This commit is contained in:
20
sdk/cliproxy/model_registry.go
Normal file
20
sdk/cliproxy/model_registry.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package cliproxy
|
||||
|
||||
import "github.com/router-for-me/CLIProxyAPI/v6/internal/registry"
|
||||
|
||||
// ModelInfo re-exports the registry model info structure.
|
||||
type ModelInfo = registry.ModelInfo
|
||||
|
||||
// ModelRegistry describes registry operations consumed by external callers.
|
||||
type ModelRegistry interface {
|
||||
RegisterClient(clientID, clientProvider string, models []*ModelInfo)
|
||||
UnregisterClient(clientID string)
|
||||
SetModelQuotaExceeded(clientID, modelID string)
|
||||
ClearModelQuotaExceeded(clientID, modelID string)
|
||||
GetAvailableModels(handlerType string) []map[string]any
|
||||
}
|
||||
|
||||
// GlobalModelRegistry returns the shared registry instance.
|
||||
func GlobalModelRegistry() ModelRegistry {
|
||||
return registry.GetGlobalRegistry()
|
||||
}
|
||||
Reference in New Issue
Block a user