MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / UpdateProvider

Method UpdateProvider

internal/appstate/store.go:140–149  ·  view source on GitHub ↗

UpdateProvider applies a sparse patch.

(ctx context.Context, name string, patch ProviderPatch)

Source from the content-addressed store, hash-verified

138
139// UpdateProvider applies a sparse patch.
140func (s Store) UpdateProvider(ctx context.Context, name string, patch ProviderPatch) error {
141 file, err := s.ListProviders(ctx)
142 if err != nil {
143 return err
144 }
145 if err := providers.Update(&file, name, patch); err != nil {
146 return err
147 }
148 return s.upsertProvider(ctx, name, file.Endpoints[name])
149}
150
151// RemoveProvider deletes a provider.
152func (s Store) RemoveProvider(ctx context.Context, name string) bool {

Callers 2

TestProviderCRUDFunction · 0.80
UpdateMethod · 0.80

Calls 3

ListProvidersMethod · 0.95
upsertProviderMethod · 0.95
UpdateFunction · 0.92

Tested by 1

TestProviderCRUDFunction · 0.64