# `Tinkex.Types.GetServerCapabilitiesResponse`
[🔗](https://github.com/North-Shore-AI/tinkex/blob/v0.4.0/lib/tinkex/types/get_server_capabilities_response.ex#L1)

Supported model metadata returned by the service capabilities endpoint.

Contains a list of `SupportedModel` structs with full metadata including
model IDs, names, and architecture types.

## Migration Note

Prior versions stored only model names as strings. The new structure
provides richer metadata while maintaining backward compatibility for
parsing responses.

# `t`

```elixir
@type t() :: %Tinkex.Types.GetServerCapabilitiesResponse{
  supported_models: [Tinkex.Types.SupportedModel.t()]
}
```

# `from_json`

```elixir
@spec from_json(map()) :: t()
```

Parse from JSON map with string or atom keys.

Handles various input formats for backward compatibility:
- Array of model objects with metadata fields
- Array of plain strings (legacy format)
- Mixed arrays

# `model_names`

```elixir
@spec model_names(t()) :: [String.t() | nil]
```

Extract just the model names from the response for convenience.

This is useful for callers who only need the names (legacy behavior).

## Example

    iex> response = %GetServerCapabilitiesResponse{
    ...>   supported_models: [
    ...>     %SupportedModel{model_name: "llama"},
    ...>     %SupportedModel{model_name: "qwen"}
    ...>   ]
    ...> }
    iex> GetServerCapabilitiesResponse.model_names(response)
    ["llama", "qwen"]

---

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