---
title: "LLM Chat Completions Server 0.1a0 发布：本地部署OpenAI兼容API"
source: "Simon Willison 博客（Atom）"
source_tier: "t2"
url: "https://simonwillison.net/2026/Jul/30/llm-chat-completions-server/#atom-everything"
permalink: "https://feed.astralor.com/items/itm_5e0ecb7c875865030acfaff9"
published: "2026-07-30T15:43:16.000Z"
score: 75
channel: "tech"
tags: ["Chat Completions API","GPT-5.6 Sol","LLM","llm-chat-completions-server","OpenAI","内容可寻址日志"]
---

# LLM Chat Completions Server 0.1a0 发布：本地部署OpenAI兼容API

## AI 点评

> 这篇文章很值得开发者关注，尤其是那些既想使用开源模型又希望保持与OpenAI API兼容性的团队。它展示了AI自动生成技术工具的实际能力，也体现了内容可寻址日志在对话管理中的优雅用法。对于正在构建本地推理服务的工程师，这个插件可以直接降低集成复杂度。

## 速览

Simon Willison 发布了 llm-chat-completions-server 0.1a0，这是一个为 LLM 命令行工具打造的插件，可将本地安装的模型以 OpenAI Chat Completions 兼容的 API 暴露出来。新版本利用 LLM 0.32rc1 中的内容可寻址日志机制，通过哈希消息部分来去重，支持客户端持续发送长对话请求。整个插件代码由 GPT-5.6 Sol 编写，展示了 AI 生成实用工具的能力。

## 关键点

- 插件可将本地 LLM 模型暴露为标准 OpenAI Chat Completions API 端点。
- 利用内容可寻址日志实现消息去重，支持客户端保持长对话上下文。
- 代码由 GPT-5.6 Sol 自动生成，展现了 AI 在工具开发中的潜力。
- 安装简单：通过 pip 或 uv 安装，一行命令即可启动服务器。

## 全文

Release: llm-chat-completions-server 0.1a0 A key goal of the new content-addressable logs in LLM 0.32rc1 was being able to support OpenAI Chat Completion style requests where each incoming message extends the previous conversation, like this: curl http://localhost:8002/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{ "model": "qwen3.5-4b", "messages": [ {"role": "user", "content": "Capital of France?"}, {"role": "assistant", "content": "Paris."}, {"role": "user", "content": "Germany?"} ] }' Here the conversation state is tracked by the client, so each of these requests gets longer and longer. The new schema design in LLM is designed to de-duplicate these using hashes of the individual message parts. To test that out, I built this plugin: uv tool install llm --pre llm install llm-chat-completions-server llm chat-completions-server -p 9001 Running this starts a localhost server on port 9001 that exposes your full collection of LLM models (from any plugins you have installed) using a ChatGPT Completions compatible endpoint. GPT-5.6 Sol wrote the whole thing - it turns out it knows the OpenAI Chat Completions API shape really well. Tags: projects, openai, llm

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_5e0ecb7c875865030acfaff9
