feat(models): let system admins edit builtin model config
Allow platform system administrators to update builtin model parameters and credentials from the management UI while keeping secrets masked in API responses. UI edits clear YAML ownership so startup reconciliation no longer overwrites runtime overrides.
This commit is contained in:
@@ -75,6 +75,7 @@ func (s *stubAgentRepoForModelDelete) CountByModelID(context.Context, uint64, st
|
||||
type stubModelRepoForDelete struct {
|
||||
model *types.Model
|
||||
delete func(id string) error
|
||||
update func(model *types.Model) error
|
||||
}
|
||||
|
||||
func (s *stubModelRepoForDelete) Create(context.Context, *types.Model) error { return nil }
|
||||
@@ -87,7 +88,12 @@ func (s *stubModelRepoForDelete) GetByID(_ context.Context, _ uint64, id string)
|
||||
func (s *stubModelRepoForDelete) List(context.Context, uint64, types.ModelType, types.ModelSource) ([]*types.Model, error) {
|
||||
return nil, nil
|
||||
}
|
||||
func (s *stubModelRepoForDelete) Update(context.Context, *types.Model) error { return nil }
|
||||
func (s *stubModelRepoForDelete) Update(_ context.Context, model *types.Model) error {
|
||||
if s.update != nil {
|
||||
return s.update(model)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (s *stubModelRepoForDelete) Delete(_ context.Context, _ uint64, id string) error {
|
||||
if s.delete != nil {
|
||||
return s.delete(id)
|
||||
|
||||
Reference in New Issue
Block a user