web-infra-dev / web-infra-dev/midscene

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

Open
#2,879 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
14.9k
Forks
1.2k
Avg merge
1d 14h
Merged PRs (30d)
96

Description

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"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Midscene's internal createChatClient pipeline and how MIDSCENE_MODEL_BASE_URL is converted into the /chat/completions path. Review the request and tool-calling flow to determine the integration points for MIDSCENE_MODEL_WIRE_API="responses". Done means a configured /v1/responses endpoint is supported without breaking the existing Chat Completions path, with coverage for the new request flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.