llm 0.37.2
- Source
- github.com
- Author
- simonw
- Date

Context
Version 0.37.2 of , Simon Willison's command-line tool and Python library for working with language models, fixes two ways it could send a user's OpenAI API key to a server other than OpenAI's (release notes). Both involve custom models listed in a configuration file, extra-openai-models.yaml, which LLM uses for services that accept requests in OpenAI's format. Each entry can set an `api_base`, the address of the server to call, and an `api_key_name`, the name of the stored key to send with each request. Both advisories rate the problems moderate and say the user got no sign that the key had been sent.
The older problem dates back to version 0.6. If a model named a key that had never been stored, for example because of a typo or a skipped `llm keys set` step, LLM fell back to the `OPENAI_API_KEY` environment variable and sent that OpenAI key to the custom server instead of reporting a missing key (advisory). Versions before 0.8 leaked it even when the named key had been stored. The second problem affects versions from 0.32a2 and applies to custom models with an `api_base` and `responses: true` but no `api_key_name`, when a user ran them with the opt-in `-o chat_completions 1` option. That path ignored the setting that withholds the OpenAI key from custom servers, so it sent the stored or environment OpenAI key to the configured address (advisory).
Version 0.37.2 makes the first case fail with a No key found error and stops the second from sending the key. Anyone who has used custom endpoints in LLM while an OpenAI key was available can stop further exposure by upgrading. The advisories do not say how to tell whether a key was sent in the past. The release also fixes smaller bugs: piped attachments, configuration-file edits made by `llm openai endpoint add`, and Python code that reopened an collection with a different model, which previously mixed vectors from two models in one collection.
- LLM 0.37.2 fixes two advisories. Custom models in extra-openai-models.yaml that set api_base and api_key_name no longer fall back to the OPENAI_API_KEY environment variable when the named key is missing; they stop with a "No key found" error.
- The second leak hit models set with responses: true and an api_base, run with -o chat_completions 1 (also llm openai endpoint URL --responses with that option and no --key): the stored openai key or OPENAI_API_KEY was sent to that endpoint.
- A Python API bug mixed vectors: reopening an embedding collection with a different model= computed new embeddings with that model, so one collection held vectors from two models. 0.37.2 now uses the collection's stored model.
- Attachments now work through pipes such as Bash process substitution (llm "Describe this image" -a <(cat image.png)). Before, LLM could not detect a piped attachment's type, and --at could lose its content before sending.
Checking sign-in…
Loading comments…
