#16450·joplin

Add a first-class OpenAI provider using the Responses API

Author: laurent22Created Sep 8, 2026Updated Sep 28, 2026
Labelsenhancementhighv3.7AI

Joplin currently talks to OpenAI through the generic openai-compatible provider, which uses /v1/chat/completions. That endpoint is now a poor fit for OpenAI itself:

  • Reasoning models are unusable with tools. Models like gpt-5.6-luna apply a reasoning_effort default server-side, and OpenAI rejects reasoning combined with function tools on /chat/completions, directing callers to /v1/responses. A retry shim currently works around this by disabling reasoning — chat works, but we lose the reasoning these models exist for.
  • Images in tool results aren't supported, so we fake a success string and smuggle the image into a trailing user message.
  • Compatibility retries for max_tokens and response_format are legacy-endpoint scar tissue.

The underlying problem is that one provider serves two audiences that have diverged: OpenAI, and the ecosystem that merely speaks its dialect (Ollama, LM Studio, vLLM, proxies). The latter implements chat/completions and generally not Responses.

Proposal: add a separate openai provider built on /v1/responses, as a sibling to OpenAiCompatible rather than a refactor of it. openai-compatible stays exactly as-is for local and proxy setups.

Scope:

  • New provider: Responses request/response mapping, plus round-tripping reasoning state across turns so multi-turn tool loops don't silently discard it
  • Keep the existing shim — anyone deliberately pointing openai-compatible at OpenAI still needs it
  • Migrate existing users one-way, detected on baseUrl host being api.openai.com; reuse the shared ai.chat.apiKey / ai.chat.model settings so the migration is seamless