feat: add --admin-api-key for finer-grained endpoint auth (#15908)

Co-authored-by: Simo Lin <linsimo.mark@gmail.com>
This commit is contained in:
shuwenn
2026-01-14 12:21:55 +08:00
committed by GitHub
parent c5e363e8e0
commit cd33694585
6 changed files with 563 additions and 18 deletions

View File

@@ -190,6 +190,7 @@ Please consult the documentation below and [server_args.py](https://github.com/s
| Argument | Description | Defaults | Options |
| --- | --- | --- | --- |
| `--api-key` | Set API key of the server. It is also used in the OpenAI API compatible server. | `None` | Type: str |
| `--admin-api-key` | Set **admin API key** for administrative/control endpoints (e.g., weights update, cache flush, `/get_server_info`). Endpoints marked as admin-only require `Authorization: Bearer <admin_api_key>` when this is set. | `None` | Type: str |
| `--served-model-name` | Override the model name returned by the v1/models endpoint in OpenAI API server. | `None` | Type: str |
| `--weight-version` | Version identifier for the model weights. Defaults to 'default' if not specified. | `default` | Type: str |
| `--chat-template` | The buliltin chat template name or the path of the chat template file. This is only used for OpenAI-compatible API server. | `None` | Type: str |