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

# Open AI Provider • Rust AI Agent SDK

> OpenAiProvider: OpenAI-compatible LLM provider

# OpenAiProvider

> Defined in the [**LLM**](../modules/llm) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

OpenAI-compatible LLM provider

## Fields

| Name     | Type              | Description |
| -------- | ----------------- | ----------- |
| `config` | `LlmConfig`       | -           |
| `client` | `reqwest::Client` | -           |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(config: LlmConfig) -> Self
```

Create a new OpenAI provider

**Parameters:**

| Name     | Type        |
| -------- | ----------- |
| `config` | `LlmConfig` |

### `default_model`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn default_model() -> Self
```

Create with default config

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/llm/mod.rs#L254">
  `praisonai/src/llm/mod.rs` at line 254
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Providers" icon="server" href="/docs/rust/providers" />

  <Card title="Rust LLM" icon="microchip" href="/docs/rust/llm" />
</CardGroup>
