Skip to content

fix(llm): do not route custom OpenAI apiBase to responses API unless explicitly configured - #13192

Open
Alphaxiaoteng wants to merge 1 commit into
continuedev:mainfrom
Alphaxiaoteng:fix-custom-apibase-responses-routing
Open

fix(llm): do not route custom OpenAI apiBase to responses API unless explicitly configured#13192
Alphaxiaoteng wants to merge 1 commit into
continuedev:mainfrom
Alphaxiaoteng:fix-custom-apibase-responses-routing

Conversation

@Alphaxiaoteng

Copy link
Copy Markdown

Description

Fixes #12995

Problem

When configuring custom OpenAI-compatible proxies / endpoints (apiBase) with model names starting with gpt-5 or o-series (e.g. o3-mini, o1), Continue incorrectly attempted to use the OpenAI Responses API (/responses) instead of Chat Completions (/chat/completions). Most third-party OpenAI-compatible endpoints only implement /chat/completions, causing requests to fail with 404 or unsupported endpoint errors.

Solution

  1. In core/llm/index.ts (canUseOpenAIResponses), only auto-enable Responses API when apiBase is the official OpenAI API (or empty/default), while respecting explicit overrides (useResponsesApi: true forces Responses API, useResponsesApi: false forces Chat Completions).
  2. In packages/openai-adapters/src/apis/OpenAI.ts (shouldUseResponsesEndpoint), normalize apiBase check to official OpenAI API endpoint and honor explicit useResponsesApi: true override on custom endpoints.
  3. Added unit test suites verifying routing behavior for official vs custom apiBase and explicit useResponsesApi configuration options.

Checklist

  • Tested locally and added automated tests
  • Conforms to project conventions and formatting

@Alphaxiaoteng
Alphaxiaoteng requested a review from a team as a code owner August 25, 2026 15:27
@Alphaxiaoteng
Alphaxiaoteng requested review from sestinj and removed request for a team August 25, 2026 15:27
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow disabling Responses API for OpenAI-compatible servers with gpt-5-like model aliases

1 participant