ModelsForAuth lets plugin model providers discover auth-bound models.
(ctx context.Context, auth *coreauth.Auth)
| 110 | |
| 111 | // ModelsForAuth lets plugin model providers discover auth-bound models. |
| 112 | func (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. |
| 127 | func (h *Host) ModelsForProvider(provider string) []ModelInfo { |
nothing calls this directly
no test coverage detected