Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/providers/openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@
]
```

### OpenAI-compatible gateways

The OpenAI provider can also point at an OpenAI-compatible gateway by changing
the configured URL and API key. This is useful for teams that want to keep their
Prism application code unchanged while centralizing model access, policy
enforcement, audit logs, traces, and usage/cost reporting in a control plane.

For example, to route Prism calls through Tuning Engines:

```php
'openai' => [
'url' => env('OPENAI_URL', 'https://api.tuningengines.com/v1'),
'api_key' => env('TUNING_ENGINES_API_KEY', ''),
'organization' => null,
]
```

Then use the model alias that your Tuning Engines inference key is allowed to
access:

```php
$response = Prism::text()
->using('openai', 'gpt-4o')
->withPrompt('Summarize the release risk for this change.')
->asText();
```

## Provider-specific options
### Strict Tool Schemas

Expand Down