# `GEPA.LLM.Adapters.ReqLLM`
[🔗](https://github.com/nshkrdotcom/gepa_ex/blob/v0.3.0/lib/gepa/llm/adapters/req_llm.ex#L1)

GEPA LLM adapter backed by ReqLLM.

This adapter owns all ReqLLM-specific model specs, API-key wiring, response
normalization, and test injection seams. GEPA optimizer/proposer code should
only see `GEPA.LLM.Client`, `GEPA.LLM.Request`, and `GEPA.LLM.Response`.

# `provider`

```elixir
@type provider() :: :openai | :gemini | :anthropic
```

# `t`

```elixir
@type t() :: %GEPA.LLM.Adapters.ReqLLM{
  api_key: String.t() | nil,
  env: (String.t() -&gt; String.t() | nil),
  max_tokens: pos_integer() | nil,
  model: String.t(),
  provider: provider(),
  provider_opts: keyword(),
  req_llm_module: module(),
  req_options: keyword(),
  response_module: module(),
  temperature: float() | nil,
  timeout: pos_integer() | nil,
  top_p: float() | nil
}
```

# `build_state`

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

# `capabilities`

```elixir
@spec capabilities(GEPA.LLM.Client.t()) :: MapSet.t(atom())
```

# `close`

```elixir
@spec close(GEPA.LLM.Client.t()) :: :ok
```

# `complete`

```elixir
@spec complete(GEPA.LLM.Client.t(), GEPA.LLM.Request.t()) ::
  {:ok, GEPA.LLM.Response.t()} | {:error, term()}
```

# `complete_legacy`

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

# `complete_structured_legacy`

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

# `instruction_schema`

```elixir
@spec instruction_schema() :: keyword()
```

# `new`

```elixir
@spec new(keyword()) :: {:ok, GEPA.LLM.Client.t()} | {:error, term()}
```

# `new!`

```elixir
@spec new!(keyword()) :: GEPA.LLM.Client.t()
```

# `stream`

```elixir
@spec stream(GEPA.LLM.Client.t(), GEPA.LLM.Request.t()) :: {:error, term()}
```

---

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