Skip to content

feat(api): add support for open responses specification#8063

Merged
mudler merged 14 commits intomasterfrom
feat/open-responses
Jan 17, 2026
Merged

feat(api): add support for open responses specification#8063
mudler merged 14 commits intomasterfrom
feat/open-responses

Conversation

@mudler
Copy link
Copy Markdown
Owner

@mudler mudler commented Jan 16, 2026

Description

This PR add initial support for openresposes: https://www.openresponses.org/specification

Fixes #5005

Screenshot 2026-01-16 at 23-03-30 Integration Tests

Supports:

  • Image/video/audio input
  • Streaming responses
  • Tool calling (with and without MCP)
  • Stateful responses via responses IDs
  • Multi-turn conversation
  • Background mode

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 16, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 09e5d40
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/696bfae5847a4f0008c00cfd
😎 Deploy Preview https://deploy-preview-8063--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler marked this pull request as ready for review January 16, 2026 22:20
@mudler mudler added the enhancement New feature or request label Jan 16, 2026
defer bgCancel()

// Update status to in_progress
store.UpdateStatus(responseID, schema.ORStatusInProgress, nil)

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
if bgErr != nil {
xlog.Error("Background response failed", "response_id", responseID, "error", bgErr)
now := time.Now().Unix()
store.UpdateStatus(responseID, schema.ORStatusFailed, &now)

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled

// Update final response in store
if finalResponse != nil {
store.UpdateResponse(responseID, finalResponse)

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
Comment thread core/http/middleware/request.go Outdated
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler merged commit 3387bfa into master Jan 17, 2026
31 of 33 checks passed
@mudler mudler deleted the feat/open-responses branch January 17, 2026 21:11
localai-bot pushed a commit to localai-bot/LocalAI that referenced this pull request Mar 25, 2026
* feat: openresponses

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Add ttl settings, fix tests

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* fix: register cors middleware by default

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* satisfy schema

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Logitbias and logprobs

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Add grammar

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* SSE compliance

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* tool JSON conversion

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* support background mode

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* swagger

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* drop code. This is handled in the handler

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Small refactorings

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* background mode for MCP

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Responses API] New OpenAI API and Tooling for an Agentic Year

2 participants