#2879·midscene

[Feature]: Support OpenAI Responses API (/v1/responses)

Author: testerdiaryCreated Jul 28, 2026Updated Jul 28, 2026

What problem does this feature solve?

Midscene currently uses the OpenAI-compatible /v1/chat/completions endpoint for model inference. However, OpenAI has introduced the new Responses API (/v1/responses) which is designed to be the future of their API offering and provides several advantages over the legacy Chat Completions API:

Built-in state management – better support for multi-turn conversations and agent workflows

Enhanced tool calling – improved function/tool execution loop handling

Reasoning state preservation – important for newer reasoning models (e.g., GPT-5 family), where inference state can be maintained across requests

Better performance – newer models may only be optimized for the Responses API, with Chat Completions being gradually phased out

Currently, even if I set MIDSCENE_MODEL_BASE_URL to an endpoint that serves /v1/responses, Midscene's internal createChatClient pipeline still constructs requests against the /chat/completions path, making it impossible to adopt the new API.

What does the proposed API look like?

MIDSCENE_MODEL_WIRE_API="responses" MIDSCENE_MODEL_BASE_URL="https://api.openai.com/v1"