MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ModelsForAuth

Method ModelsForAuth

sdk/pluginhost/host.go:112–124  ·  view source on GitHub ↗

ModelsForAuth lets plugin model providers discover auth-bound models.

(ctx context.Context, auth *coreauth.Auth)

Source from the content-addressed store, hash-verified

110
111// ModelsForAuth lets plugin model providers discover auth-bound models.
112func (h *Host) ModelsForAuth(ctx context.Context, auth *coreauth.Auth) AuthModelResult {
113 if h == nil || h.inner == nil {
114 return AuthModelResult{}
115 }
116 result := h.inner.ModelsForAuth(ctx, auth)
117 return AuthModelResult{
118 Provider: result.Provider,
119 Models: registryModelsToPluginModels(result.Models),
120 Auth: result.Auth,
121 Handled: result.Handled,
122 Err: result.Err,
123 }
124}
125
126// ModelsForProvider returns static models registered for a provider by plugins.
127func (h *Host) ModelsForProvider(provider string) []ModelInfo {

Callers

nothing calls this directly

Calls 2

ModelsForAuthMethod · 0.65

Tested by

no test coverage detected