# `LlmCore.Config.Store`
[🔗](https://github.com/fosferon/llm_core/blob/v0.3.0/lib/llm_core/config/store.ex#L1)

Lightweight ETS-backed storage for runtime configuration.

The store keeps the latest routing tables, provider definitions, CLI configs,
and other hot-reloadable artifacts so they can be accessed without disk I/O.

## Stored Namespaces

  * `{:config, :routing}` — Current `RoutingTable`
  * `{:config, :providers}` — Map of `%Definition{}` structs keyed by provider id
  * `{:config, :cli_providers}` — Map of `%CLIProvider.Config{}` structs keyed by atom name
  * `{:config, :telemetry}` — Telemetry settings map
  * `{:config, :raw}` — Raw merged TOML configuration

## Access Patterns

Direct ETS reads (no GenServer call):

    {:ok, table} = LlmCore.Config.Store.get_routing()
    {:ok, providers} = LlmCore.Config.Store.fetch(:config, :providers)

Writes go through the GenServer for serialisation:

    :ok = LlmCore.Config.Store.put_routing(%RoutingTable{...})
    :ok = LlmCore.Config.Store.put(:config, :telemetry, %{...})

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `fetch`

```elixir
@spec fetch(atom(), atom()) :: {:ok, term()} | {:error, :not_found}
```

Fetches a value previously stored with `put/3`.

# `get_routing`

```elixir
@spec get_routing() :: {:ok, LlmCore.Router.RoutingTable.t()} | {:error, :not_found}
```

Fetches the current routing table.

# `put`

```elixir
@spec put(atom(), atom(), term()) :: :ok
```

Generic helper for storing custom config namespaces.

# `put_routing`

```elixir
@spec put_routing(LlmCore.Router.RoutingTable.t()) :: :ok
```

Stores the current routing table.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the config store GenServer and creates the backing ETS table.

---

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