> For the complete documentation index, see [llms.txt](https://docs.mozilla.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mozilla.ai/api-reference/completion-1/provider.md).

# Provider

Data models for provider operations

The `ProviderMetadata` type describes a provider's capabilities and configuration. It is returned by `AnyLLM.get_provider_metadata()` and `AnyLLM.get_all_provider_metadata()`.

### `ProviderMetadata`

A Pydantic `BaseModel` containing provider information and feature flags.

**Import:** `from any_llm.types.provider import ProviderMetadata`

| Field                 | Type                                                                      | Description                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `name`                | `str`                                                                     |                                                                                                                             |
| `tier`                | `ProviderTier`                                                            | Support tier. Defaults to community, so a provider is only advertised as verified once it is listed in VERIFIED\_PROVIDERS. |
| `env_key`             | `str`                                                                     |                                                                                                                             |
| `env_api_base`        | `str \| None`                                                             |                                                                                                                             |
| `doc_url`             | `str`                                                                     |                                                                                                                             |
| `streaming`           | `bool`                                                                    |                                                                                                                             |
| `reasoning`           | `bool`                                                                    |                                                                                                                             |
| `completion`          | `bool`                                                                    |                                                                                                                             |
| `embedding`           | `bool`                                                                    |                                                                                                                             |
| `moderation`          | `bool`                                                                    |                                                                                                                             |
| `responses`           | `bool`                                                                    |                                                                                                                             |
| `image`               | `bool`                                                                    |                                                                                                                             |
| `pdf`                 | `bool`                                                                    |                                                                                                                             |
| `class_name`          | `str`                                                                     |                                                                                                                             |
| `list_models`         | `bool`                                                                    |                                                                                                                             |
| `messages`            | `bool`                                                                    |                                                                                                                             |
| `messages_native`     | `bool`                                                                    |                                                                                                                             |
| `batch_completion`    | `bool`                                                                    |                                                                                                                             |
| `image_generation`    | `bool`                                                                    |                                                                                                                             |
| `image_edit`          | `bool`                                                                    |                                                                                                                             |
| `audio_transcription` | `bool`                                                                    |                                                                                                                             |
| `audio_speech`        | `bool`                                                                    |                                                                                                                             |
| `rerank`              | `bool`                                                                    |                                                                                                                             |
| `decide`              | `bool`                                                                    | Whether the provider implements the decide API (`decide`/`adecide`).                                                        |
| `files`               | `bool`                                                                    |                                                                                                                             |
| `file_operations`     | `tuple[Literal['upload', 'list', 'retrieve', 'download', 'delete'], ...]` |                                                                                                                             |

### Usage

#### Single provider

```python
from any_llm import AnyLLM

llm = AnyLLM.create("openai")
meta = llm.get_provider_metadata()

print(f"Provider: {meta.name}")
print(f"API key env var: {meta.env_key}")
print(f"Supports streaming: {meta.streaming}")
print(f"Supports embedding: {meta.embedding}")
print(f"Supports responses: {meta.responses}")
```

#### All providers

```python
from any_llm import AnyLLM

for meta in AnyLLM.get_all_provider_metadata():
    features = []
    if meta.streaming:
        features.append("streaming")
    if meta.embedding:
        features.append("embedding")
    if meta.reasoning:
        features.append("reasoning")
    if meta.responses:
        features.append("responses")
    print(f"{meta.name}: {', '.join(features) or 'completion only'}")
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mozilla.ai/api-reference/completion-1/provider.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
