Better docs for OpenAI model options

!stable-docs

Closes #1228
This commit is contained in:
Simon Willison 2025-08-03 15:31:25 -07:00 committed by GitHub
parent 0bf655a1fe
commit ef3192b44d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,17 +43,16 @@ If the `api_base` is set, the existing configured `openai` API key will not be s
You can set `api_key_name` to the name of a key stored using the {ref}`api-keys` feature.
Add `completion: true` if the model is a completion model that uses a `/completion` as opposed to a `/completion/chat` endpoint.
Other keys you can use here:
If a model does not support streaming, add `can_stream: false` to disable the streaming option.
- `completion: true` for completion models that should use the `/completion` endpoint as opposed to `/completion/chat`
- `supports_tools: true` for models that support tool calling
- `can_stream: false` to disable streaming mode for models that cannot stream
- `supports_schema: true` for models that support JSON structured schema output
- `vision: true` for models that can accept images as input
- `audio: true` for models that accept audio attachments
If a model supports structured output via JSON schemas, you can add `supports_schema: true` to support this feature.
If a model is a vision model, you can add `vision: true` to support this feature and use image attachments.
If a model is an audio model, you can add `audio: true` to support this feature and use audio attachments.
Having configured the model like this, run `llm models` to check that it installed correctly. You can then run prompts against it like so:
Having configured the model like this, run `llm models --options -m MODEL_ID` to check that it installed correctly. You can then run prompts against it like so:
```bash
llm -m orca-openai-compat 'What is the capital of France?'