# `PromptRunner.LLM`
[🔗](https://github.com/nshkrdotcom/prompt_runner_sdk/blob/v0.12.1/lib/prompt_runner/llm.ex#L1)

Behaviour and types for LLM integrations.

# `close_fun`

```elixir
@type close_fun() :: (-&gt; any())
```

# `provider`

```elixir
@type provider() :: sdk()
```

# `sdk`

```elixir
@type sdk() :: :claude | :codex | :amp | :cursor | :antigravity | :simulated
```

# `stream`

```elixir
@type stream() :: Enumerable.t()
```

# `stream_event`

```elixir
@type stream_event() :: map()
```

# `normalize_provider`

```elixir
@callback normalize_provider(term()) :: provider() | {:error, term()}
```

# `normalize_sdk`

```elixir
@callback normalize_sdk(term()) :: sdk() | {:error, term()}
```

# `resume_stream`

```elixir
@callback resume_stream(map(), map(), String.t()) ::
  {:ok, stream(), close_fun(), map()} | {:error, term()}
```

# `start_stream`

```elixir
@callback start_stream(map(), String.t()) ::
  {:ok, stream(), close_fun(), map()} | {:error, term()}
```

# `steer`

```elixir
@callback steer(map(), map(), String.t()) ::
  {:ok, :delivered | :interrupted} | {:error, term()}
```

Says something to a session that is already running.

`{:ok, :delivered}` means the text reached the running turn and it continues.
`{:ok, :interrupted}` means the turn was ended and the caller has to resume
the provider thread with this text — which lane applies is the provider's
transport fact, not the caller's choice.

---

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