mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
# What does this PR do? use SecretStr for OpenAIMixin providers - RemoteInferenceProviderConfig now has auth_credential: SecretStr - the default alias is api_key (most common name) - some providers override to use api_token (RunPod, vLLM, Databricks) - some providers exclude it (Ollama, TGI, Vertex AI) addresses #3517 ## Test Plan ci w/ new tests
27 lines
1 KiB
Text
27 lines
1 KiB
Text
---
|
|
description: "Llama OpenAI-compatible provider for using Llama models with OpenAI API format."
|
|
sidebar_label: Remote - Llama-Openai-Compat
|
|
title: remote::llama-openai-compat
|
|
---
|
|
|
|
# remote::llama-openai-compat
|
|
|
|
## Description
|
|
|
|
Llama OpenAI-compatible provider for using Llama models with OpenAI API format.
|
|
|
|
## Configuration
|
|
|
|
| Field | Type | Required | Default | Description |
|
|
|-------|------|----------|---------|-------------|
|
|
| `allowed_models` | `list[str \| None` | No | | List of models that should be registered with the model registry. If None, all models are allowed. |
|
|
| `refresh_models` | `<class 'bool'>` | No | False | Whether to refresh models periodically from the provider |
|
|
| `api_key` | `pydantic.types.SecretStr \| None` | No | | Authentication credential for the provider |
|
|
| `openai_compat_api_base` | `<class 'str'>` | No | https://api.llama.com/compat/v1/ | The URL for the Llama API server |
|
|
|
|
## Sample Configuration
|
|
|
|
```yaml
|
|
openai_compat_api_base: https://api.llama.com/compat/v1/
|
|
api_key: ${env.LLAMA_API_KEY}
|
|
```
|