coding by Ryan Caldwell

LLM Plugin Connects OpenAI Decisions to CLI

A plugin that bridges OpenAI's language models with command-line interfaces, enabling AI-driven decisions to trigger and execute terminal commands directly

LLM Plugin Brings OpenAI’s Decision API to the Command Line

A developer needs to process thousands of images to determine which contain specific objects, or evaluate customer feedback responses for sentiment at scale. Traditional language models generate verbose text outputs, but sometimes a simple yes/no answer or numerical score is all that’s required.

The llm-openai-decisions 0.1a0 plugin addresses this need by connecting Simon Willison’s LLM command-line tool to OpenAI’s newly released Decisions API. This API, announced at DevDay, provides structured decision outputs rather than free-form text generation.

Architecture

The plugin follows the same conceptual design as Jev’s decision API, supporting three question types: yes/no questions, multiple choice selections, and numerical scores. According to the release announcement, the plugin was created by having GPT-6 Astra read OpenAI’s API documentation and generate code based on the existing llm-typesafe plugin for Jev.

OpenAI’s implementation uses the gpt-6-luna model, which adds image input capability beyond what Jev offers. This means developers can query both text and images through the same interface. The plugin can be installed via:

llm install llm-openai-decisions

A practical example demonstrates querying an image:

llm -m openai-decisions/gpt-6-luna \
 -a https://static.simonwillison.net/static/2025/two-pelicans.jpg \
 -s 'Does this image contain any mammals?'

The API returns structured JSON responses rather than natural language, making the output immediately usable in automated workflows without additional parsing.

Performance

The pricing model for OpenAI’s Decisions API differs from standard text generation. According to the announcement, OpenAI charges 10 cents per million input tokens with no charge for output. This input-only pricing reflects the API’s design - since outputs are constrained to structured decisions rather than variable-length text, billing focuses solely on what goes in.

This approach makes cost prediction straightforward for batch processing tasks. A developer processing 10,000 images with 100-token prompts would consume approximately 1 million tokens, costing around 10 cents.

Alternatives

Jev offers a competing decision API with similar functionality but different characteristics. According to the release notes, Jev charges 4.2 cents per million input tokens - less than half of OpenAI’s pricing. However, Jev’s decision models do not support image inputs, limiting use cases to text-only decisions.

The llm-typesafe plugin provides access to Jev’s API through the same LLM command-line interface, offering developers a consistent experience when switching between providers. For text-only decision tasks where cost is a primary concern, Jev’s lower pricing may be attractive. For workflows requiring image analysis alongside text decisions, OpenAI’s gpt-6-luna model provides capabilities Jev cannot match.

Both APIs share the same three question types, making it relatively straightforward to switch between them depending on specific requirements. The choice comes down to whether image support justifies the higher per-token cost, or whether text-only decisions at a lower price point better fit the use case.

The llm-openai-decisions plugin integrates into existing LLM workflows, allowing developers to add decision-based queries without changing their tooling or learning new command-line interfaces.