# `MingaAgent.Provider.Spec`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_agent/provider/spec.ex#L1)

Pure provider declaration metadata.

A provider spec describes a provider implementation without owning credentials, sessions, retries, events, or cleanup. Runtime enable/disable state belongs to `MingaAgent.ProviderRegistry`; this struct is the immutable contract a source contributes.

# `capability`

```elixir
@type capability() :: atom()
```

Provider capability advertised to the resolver and UI.

# `credential_requirement`

```elixir
@type credential_requirement() :: atom()
```

Credential requirement id. The credential broker decides how this is satisfied.

# `source`

```elixir
@type source() :: :config | {:bundle, atom()} | {:extension, atom()}
```

Source that contributed this provider.

# `t`

```elixir
@type t() :: %MingaAgent.Provider.Spec{
  capabilities: [capability()],
  credential_requirements: [credential_requirement()],
  display_name: String.t(),
  id: String.t(),
  model_prefixes: [String.t()],
  module: module(),
  source: source()
}
```

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds and validates a provider spec.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds a provider spec or raises on invalid input.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
