datasette-llm 0.1a1
Summary
Datasette-llm 0.1a1, a new base plugin, integrates large language models (LLMs) from the LLM tool into other Datasette plugins, such as datasette-enrichments-llm. This release introduces a `register_llm_purposes()` plugin hook and a `get_purposes()` function, enabling the configuration of specific LLM models for distinct tasks. For instance, users can designate "GPT-5.4-nano" for data enrichment and "Sonnet 4.6" for SQL query assistance. Dependent plugins can now request models based on purpose using `llm.model(purpose="enrichment")`, and register their own purpose strings, facilitating the development of administrative UIs for model assignment.
Key takeaway
For AI Engineers developing Datasette plugins, this release simplifies LLM integration by centralizing model selection based on task purpose. You should update to datasette-llm 0.1a1 to leverage the new `register_llm_purposes()` hook, allowing your plugins to clearly define their LLM usage and enabling more flexible, configurable deployments for end-users. This reduces hardcoding and improves maintainability.
Key insights
Datasette-llm 0.1a1 enables purpose-driven LLM selection and configuration within Datasette plugins.
Principles
- Modular LLM integration
- Purpose-based model assignment
Method
Plugins register purposes via `register_llm_purposes()` and request models using `llm.model(purpose="...")`, allowing centralized model-to-purpose configuration.
In practice
- Assign GPT-5.4-nano for enrichment
- Use Sonnet 4.6 for SQL assistance
- Build admin UIs for model mapping
Topics
- Datasette Plugins
- LLM Integration
- Model Configuration
- Plugin Hooks
- Purpose-Driven AI
Code references
Best for: AI Engineer, Software Engineer, Machine Learning Engineer, AI Architect
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Simon Willison's Weblog.