Skip to content

Commit 9b3f8ba

Browse files
committed
allow disabling query model and provider
1 parent 18fdf3c commit 9b3f8ba

File tree

11 files changed

+2718
-1231
lines changed

11 files changed

+2718
-1231
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,19 @@ customization:
369369
disable_query_system_prompt: true
370370
```
371371

372+
### Disable model/provider overrides from requests
373+
374+
By default, clients may specify `model` and `provider` in `/v1/query` and `/v1/streaming_query` requests to select a model at runtime. You can disable this behavior and enforce the configured defaults by setting:
375+
376+
```yaml
377+
customization:
378+
disable_query_model_override: true
379+
```
380+
381+
When enabled, requests that include `model` or `provider` will be rejected with HTTP 422 and the following message:
382+
383+
"This instance does not support overriding model/provider in the query request (disable_query_model_override is set). Please remove the model and provider fields from your request."
384+
372385
## Safety Shields
373386

374387
A single Llama Stack configuration file can include multiple safety shields, which are utilized in agent

docs/openapi.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,11 @@
12521252
"title": "Disable Query System Prompt",
12531253
"default": false
12541254
},
1255+
"disable_query_model_override": {
1256+
"type": "boolean",
1257+
"title": "Disable Query Model Override",
1258+
"default": false
1259+
},
12551260
"system_prompt_path": {
12561261
"anyOf": [
12571262
{

0 commit comments

Comments
 (0)