# `HuggingfaceClient.Inference.ModelInfo`
[🔗](https://github.com/huggingface/huggingface_client/blob/v0.1.0/lib/huggingface_client/inference/model_info.ex#L1)

Fetches model metadata and provider mapping information from the HuggingFace Hub.

Useful for tooling and diagnostics — e.g. listing which providers support a
given model before making an inference call.

## Example

    {:ok, info} = HuggingfaceClient.Inference.ModelInfo.fetch("meta-llama/Llama-3.1-8B-Instruct",
      access_token: "hf_..."
    )

    IO.inspect(info.providers)
    # => [%{"provider" => "groq", "task" => "conversational", "status" => "live"}, ...]

    IO.puts(info.pipeline_tag)
    # => "text-generation"

# `provider_entry`

```elixir
@type provider_entry() :: %{required(String.t()) =&gt; String.t()}
```

# `t`

```elixir
@type t() :: %HuggingfaceClient.Inference.ModelInfo{
  downloads: non_neg_integer() | nil,
  gated: boolean() | String.t(),
  id: String.t(),
  library_name: String.t() | nil,
  likes: non_neg_integer() | nil,
  pipeline_tag: String.t() | nil,
  private: boolean(),
  providers: [provider_entry()],
  tags: [String.t()]
}
```

# `available_providers`

```elixir
@spec available_providers(
  String.t(),
  keyword()
) :: {:ok, [String.t()]} | {:error, Exception.t()}
```

Returns the list of provider names that support a given model.

Only returns providers with `status: "live"`.

# `fetch`

```elixir
@spec fetch(
  String.t(),
  keyword()
) :: {:ok, t()} | {:error, Exception.t()}
```

Fetches model metadata and provider mappings from the HF Hub.

## Options

- `:access_token` — HF token for private models
- `:hub_url` — override the Hub base URL
- `:req_opts` — extra options forwarded to `Req`

# `supported_by?`

```elixir
@spec supported_by?(String.t(), String.t(), keyword()) ::
  {:ok, boolean()} | {:error, Exception.t()}
```

Returns `true` if the model is available on the given provider.

---

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