# Class LittleGhost::ModelCapabilities

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/ModelCapabilities.html

Describes the optional features a model can use. Providers expose this value
so structured results and tool selection do not rely on provider guesswork. A
`nil` supported-parameter list means the list itself is unrestricted. Check
`known?` before treating that as known provider support.

## Inheritance

`LittleGhost::ModelCapabilities < Data`

## Attributes

<a id="attribute-i-known"></a>
### `known` (R)

Whether this value represents known capability metadata.

<a id="attribute-i-native_structured_output"></a>
### `native_structured_output` (R)

Whether the model accepts a provider-native structured-output schema.

<a id="attribute-i-supported_parameters"></a>
### `supported_parameters` (R)

A frozen Array of provider parameter-name Strings, or `nil` when support is
unrestricted. Caller-supplied Strings may be retained rather than copied.

<a id="attribute-i-tool_choice"></a>
### `tool_choice` (R)

Whether the model accepts an explicit tool-selection policy.

<a id="attribute-i-tools"></a>
### `tools` (R)

Whether the model accepts tool definitions.

## Class methods

<a id="method-c-new"></a>
### `.new`

```ruby
new(native_structured_output: false, tools: false, tool_choice: false,
    supported_parameters: nil, known: true) -> ModelCapabilities
```

Normalizes flags to booleans and stores unique parameter-name Strings in a
frozen Array.

<a id="method-c-permissive"></a>
### `.permissive`

```ruby
.permissive()
```

Supplies a permissive capability set for providers that accept every optional
model feature.

<a id="method-c-unknown"></a>
### `.unknown`

```ruby
.unknown()
```

Marks capability support as unknown so callers avoid assuming support.

## Instance methods

<a id="method-i-known-3F"></a>
### `#known?`

```ruby
#known?()
```

Indicates whether capability metadata is known.

<a id="method-i-native_structured_output-3F"></a>
### `#native_structured_output?`

```ruby
#native_structured_output?()
```

Indicates whether provider-native structured output is available.

<a id="method-i-supports_parameter-3F"></a>
### `#supports_parameter?`

```ruby
supports_parameter?(*names) -> boolean
```

Checks only the parameter-list restriction. It returns true for every name
when the list is `nil`, including on an unknown capability value. Check
`known?` when the caller needs evidence of provider support.

<a id="method-i-tool_choice-3F"></a>
### `#tool_choice?`

```ruby
#tool_choice?()
```

Indicates whether the model accepts an explicit tool choice.

<a id="method-i-tools-3F"></a>
### `#tools?`

```ruby
#tools?()
```

Indicates whether the model accepts tools.
