@@ -85,22 +85,22 @@ class FrontendArgs:
85
85
"""Allowed methods."""
86
86
allowed_headers : list [str ] = field (default_factory = lambda : ["*" ])
87
87
"""Allowed headers."""
88
- api_key : Optional [str ] = None
89
- """If provided, the server will require this key to be presented in the
90
- header."""
88
+ api_key : Optional [list [ str ] ] = None
89
+ """If provided, the server will require one of these keys to be presented in
90
+ the header."""
91
91
lora_modules : Optional [list [LoRAModulePath ]] = None
92
92
"""LoRA modules configurations in either 'name=path' format or JSON format
93
- or JSON list format. Example (old format): `'name=path'` Example (new
94
- format): `{\" name\" : \" name\" , \" path\" : \" lora_path\" ,
93
+ or JSON list format. Example (old format): `'name=path'` Example (new
94
+ format): `{\" name\" : \" name\" , \" path\" : \" lora_path\" ,
95
95
\" base_model_name\" : \" id\" }`"""
96
96
chat_template : Optional [str ] = None
97
- """The file path to the chat template, or the template in single-line form
97
+ """The file path to the chat template, or the template in single-line form
98
98
for the specified model."""
99
99
chat_template_content_format : ChatTemplateContentFormatOption = "auto"
100
100
"""The format to render message content within a chat template.
101
101
102
102
* "string" will render the content as a string. Example: `"Hello World"`
103
- * "openai" will render the content as a list of dictionaries, similar to OpenAI
103
+ * "openai" will render the content as a list of dictionaries, similar to OpenAI
104
104
schema. Example: `[{"type": "text", "text": "Hello world!"}]`"""
105
105
response_role : str = "assistant"
106
106
"""The role name to return if `request.add_generation_prompt=true`."""
@@ -117,40 +117,40 @@ class FrontendArgs:
117
117
root_path : Optional [str ] = None
118
118
"""FastAPI root_path when app is behind a path based routing proxy."""
119
119
middleware : list [str ] = field (default_factory = lambda : [])
120
- """Additional ASGI middleware to apply to the app. We accept multiple
121
- --middleware arguments. The value should be an import path. If a function
122
- is provided, vLLM will add it to the server using
123
- `@app.middleware('http')`. If a class is provided, vLLM will
120
+ """Additional ASGI middleware to apply to the app. We accept multiple
121
+ --middleware arguments. The value should be an import path. If a function
122
+ is provided, vLLM will add it to the server using
123
+ `@app.middleware('http')`. If a class is provided, vLLM will
124
124
add it to the server using `app.add_middleware()`."""
125
125
return_tokens_as_token_ids : bool = False
126
- """When `--max-logprobs` is specified, represents single tokens as
127
- strings of the form 'token_id:{token_id}' so that tokens that are not
126
+ """When `--max-logprobs` is specified, represents single tokens as
127
+ strings of the form 'token_id:{token_id}' so that tokens that are not
128
128
JSON-encodable can be identified."""
129
129
disable_frontend_multiprocessing : bool = False
130
- """If specified, will run the OpenAI frontend server in the same process as
130
+ """If specified, will run the OpenAI frontend server in the same process as
131
131
the model serving engine."""
132
132
enable_request_id_headers : bool = False
133
- """If specified, API server will add X-Request-Id header to responses.
133
+ """If specified, API server will add X-Request-Id header to responses.
134
134
Caution: this hurts performance at high QPS."""
135
135
enable_auto_tool_choice : bool = False
136
- """If specified, exclude tool definitions in prompts when
136
+ """If specified, exclude tool definitions in prompts when
137
137
tool_choice='none'."""
138
138
exclude_tools_when_tool_choice_none : bool = False
139
- """Enable auto tool choice for supported models. Use `--tool-call-parser`
139
+ """Enable auto tool choice for supported models. Use `--tool-call-parser`
140
140
to specify which parser to use."""
141
141
tool_call_parser : Optional [str ] = None
142
- """Select the tool call parser depending on the model that you're using.
143
- This is used to parse the model-generated tool call into OpenAI API format.
144
- Required for `--enable-auto-tool-choice`. You can choose any option from
142
+ """Select the tool call parser depending on the model that you're using.
143
+ This is used to parse the model-generated tool call into OpenAI API format.
144
+ Required for `--enable-auto-tool-choice`. You can choose any option from
145
145
the built-in parsers or register a plugin via `--tool-parser-plugin`."""
146
146
tool_parser_plugin : str = ""
147
- """Special the tool parser plugin write to parse the model-generated tool
148
- into OpenAI API format, the name register in this plugin can be used in
147
+ """Special the tool parser plugin write to parse the model-generated tool
148
+ into OpenAI API format, the name register in this plugin can be used in
149
149
`--tool-call-parser`."""
150
150
log_config_file : Optional [str ] = envs .VLLM_LOGGING_CONFIG_PATH
151
151
"""Path to logging config JSON file for both vllm and uvicorn"""
152
152
max_log_len : Optional [int ] = None
153
- """Max number of prompt characters or prompt ID numbers being printed in
153
+ """Max number of prompt characters or prompt ID numbers being printed in
154
154
log. The default of None means unlimited."""
155
155
disable_fastapi_docs : bool = False
156
156
"""Disable FastAPI's OpenAPI schema, Swagger UI, and ReDoc endpoint."""
0 commit comments