> ## Documentation Index
> Fetch the complete documentation index at: https://iso8583sim.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Providers

> LLM provider factory and auto-detection.

`iso8583sim.llm.providers`

This module provides a factory function to create LLM providers
and auto-detect available providers based on installed packages
and configured API keys.

## Functions

### `get_provider()`

```python theme={null}
def get_provider(name: str | None = None, **kwargs: Any) -> LLMProvider
```

Get an LLM provider instance.

If name is provided, creates that specific provider.
If name is None, auto-detects the first available provider.

**Parameters**

<ResponseField name="name" type="str | None" default="None">
  Provider name ('anthropic', 'openai', 'google', 'ollama')
  or None for auto-detection
</ResponseField>

<ResponseField name="**kwargs" type="Any">
  Additional arguments passed to the provider constructor
</ResponseField>

<ResponseField name="Returns" type="LLMProvider">
  An initialized LLMProvider instance
</ResponseField>

**Raises**

* `ProviderConfigError`: If no provider is available or configured

**Example**

```python theme={null}
provider = get_provider()  # Auto-detect
provider = get_provider("anthropic")  # Specific provider
provider = get_provider("openai", model="gpt-6-luna")
```

### `list_available_providers()`

```python theme={null}
def list_available_providers() -> list[str]
```

List all available and configured providers.

<ResponseField name="Returns" type="list[str]">
  List of provider names that are installed and configured
</ResponseField>

### `list_installed_providers()`

```python theme={null}
def list_installed_providers() -> list[str]
```

List all installed providers (may not be configured).

<ResponseField name="Returns" type="list[str]">
  List of provider names that have their packages installed
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.