continue-custom/core/llm
Dallin Romney 15ea93dae0
feat: add useResponsesApi option to opt out of Responses API (#11809)
* feat: add `useResponsesApi` option to allow opting out of OpenAI Responses API

Add a `useResponsesApi` config option that, when set to false, forces
o-series and gpt-5 models to use /chat/completions instead of /responses.
This helps users whose organizations are not verified avoid "organization
must be verified" errors related to reasoning summaries and streaming.

The option gates both code paths where the Responses API is selected:
- `canUseOpenAIResponses()` in BaseLLM (native path)
- `shouldUseResponsesEndpoint()` in the OpenAI adapter

Closes #11772
Related: #8209, #7129

* feat: suggest `useResponsesApi: false` in org verification error messages

Update error detection to also catch "organization must be verified to
stream" errors (in addition to reasoning summaries), and update the
error message to suggest adding `useResponsesApi: false` to model config
as a workaround.

* fix: improve org verification error message copy

* fix: add useResponsesApi to LLMOptions in index.d.ts

The actual type definitions used by tsc are in core/index.d.ts, not in
the string template in config/types.ts.

* fix: also check provider name when detecting org verification errors

The error message from OpenAI's API doesn't always contain the word
"openai" — check the provider name from the model config as well.

* feat: detect missing authentication header error and suggest adding apiKey

* fix: handle missing auth error directly in 401 dialog block

The 401 status code handler in StreamError.tsx renders before the
customErrorMessage check, so detect the missing authentication error
inline within the 401 block.

* Revert "fix: handle missing auth error directly in 401 dialog block"

This reverts commit 0053957d2df7c64ddea2279982f5e07e2cee1020.

* style: fix prettier formatting in index.d.ts

* style: revert unrelated prettier reformatting in index.d.ts

* fix: handle undefined providerName in error analysis

* fix: use YAML-style formatting in useResponsesApi suggestion
2026-03-25 16:09:46 -07:00
..
llms fix: lazy-load Ollama /api/show to reduce unnecessary requests (#11836) 2026-03-25 15:37:03 -07:00
rules feat: remove applied rules from chat history and dev data 2025-11-04 12:42:01 -08:00
templates fix: strengthen default Apply prompt for local models (#10486) 2026-03-20 16:33:09 -07:00
utils Improve error handling UX and move stream retry to BaseLLM (#11773) 2026-03-24 12:40:19 -07:00
asyncEncoder.test.ts error on no-floating-promises in core 2025-04-29 15:11:35 -07:00
asyncEncoder.ts chore: apply eslint to vscode and core 2024-11-11 07:38:52 -08:00
autodetect.ts feat: add MiniMax as a new LLM provider with M2.7 default (#11367) 2026-03-24 13:06:19 -07:00
autodetect.vitest.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00
constants.ts feat: clean up anthropic messaging (#7799) 2025-09-24 12:57:10 -07:00
countTokens.test.ts fix: handle thinking/assistant messages at end of chat history (#11791) 2026-03-24 20:26:51 -07:00
countTokens.ts fix: handle thinking/assistant messages at end of chat history (#11791) 2026-03-24 20:26:51 -07:00
defaultSystemMessages.ts feat: upgrade grok code fast 1 (#8475) 2025-11-03 12:33:05 -08:00
getAdjustedTokenCount.test.ts fix: move token adjustment to separate module 2026-01-31 15:17:30 -08:00
getAdjustedTokenCount.ts fix: mistral model matching 2026-02-02 22:12:07 -08:00
index.test.ts feat: autodetect qwen2.5vl image support 2025-09-15 11:34:13 +02:00
index.ts feat: add useResponsesApi option to opt out of Responses API (#11809) 2026-03-25 16:09:46 -07:00
llamaTokenizer.d.ts npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p 2025-05-25 18:34:39 -07:00
llamaTokenizer.js npx prettier --check "core/**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-p 2025-05-25 18:34:39 -07:00
llamaTokenizer.mjs prettier update 2025-06-11 18:01:41 -07:00
llamaTokenizerWorkerPool.mjs prettier update 2025-06-11 18:01:41 -07:00
llm-pre-fetch.vitest.ts feat: clean up anthropic messaging (#7799) 2025-09-24 12:57:10 -07:00
llm.test.ts Skip Gemini test due to @google/genai getReader issue 2025-12-05 18:19:57 +00:00
logFormatter.test.ts improv: cost breakdown in continue console 2025-07-07 18:02:45 -07:00
logFormatter.ts LLMLogFormatter: rich logging to an output stream 2025-04-07 14:11:38 -04:00
logger.ts Add rich logging of LLM interactions 2025-04-07 14:11:38 -04:00
messages.ts nuke flattenMessages 2025-07-09 16:46:24 -07:00
openaiTypeConverters.test.ts fix(openai): fix Responses API 400 errors for reasoning, tool calls, and ID handling (#11785) 2026-03-24 18:55:06 -07:00
openaiTypeConverters.ts fix(openai): fix Responses API 400 errors for reasoning, tool calls, and ID handling (#11785) 2026-03-24 18:55:06 -07:00
streamChat.ts fix: useSlashCommand for all slash commands 2025-11-03 23:44:05 -08:00
tiktokenWorkerPool.mjs prettier update 2025-06-11 18:01:41 -07:00
toolSupport.test.ts fix(gemini): update model catalog for retired/new Gemini models (#11793) 2026-03-24 20:22:47 -07:00
toolSupport.ts fix: expand tool support to reduce 'Invalid tool name' errors (#11792) 2026-03-24 20:23:07 -07:00