Lightning-AI / Lightning-AI/LitServe
Support for OpenAI's new Responses API spec
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.9k
- Forks
- 304
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 6
Description
🚀 Feature
- Ability to expose assistants through an API that follows the Responses API standard and specs.
import litserve as ls
class SimpleLitAPI(ls.LitAPI):
def setup(self, device):
self.model = None
def predict(self, prompt):
# `prompt` is a list of dictionary containing role and content
# example: [{'role': 'user', 'content': 'How can I help you today?'}]
yield "This is a sample generated output"
if __name__ == "__main__":
# Enable the OpenAISpec in LitServer
api = SimpleLitAPI()
server = ls.LitServer(api, spec=ls.ResponsesOpenAISpec())
server.run(port=8000)
Motivation
OpenAI announced last week a new Responses API that contains the feature set of the Chat Completions API and replaces the Assistants API (the latter is now deprecated and will be sunseted mid-2026).
Azure already announced that they provide this API day one and considering OpenAI's position on the market, we can expect that it will become an industry standard as is the Chat Completions API today.
Additional context
- Official documentation for the Responses API
- Thread on OpenAI's developer forum
- Comparison between the Chat Completions API and Responses API
- A blog post from Simon Willison on the new API
- A thread on X by one of the creators of the API talking about its making
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LitAPI and LitServer entry points, then compare the requested ResponsesOpenAISpec with the official Responses API specification linked in the issue. Done means assistants can be exposed through an API that follows that standard; the issue names no tests or files to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100