Skip to content

feat: OpenAI Responses API for the openai model provider - #2196

Merged
johanandren merged 8 commits into
mainfrom
wip-openai-responses-api-patriknw
Nov 10, 2026
Merged

johanandren merged 8 commits into
mainfrom
wip-openai-responses-api-patriknw

Conversation

@patriknw

@patriknw patriknw commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Requires akka-runtime https://github.com/lightbend/akka-runtime/pull/6090


🤖

The openai model provider gains two settings: api ("chat-completions" or "responses") and reasoning-effort. You can set both in configuration or on ModelProvider.OpenAi through the new OpenAiApi enum and the withApi and withReasoningEffort methods. The SDK passes both settings to the runtime, which calls the OpenAI Responses API when api is "responses". On that API the runtime asks OpenAI not to store the response, and sends the encrypted reasoning of a reasoning model back with the next call. The documentation describes what thinking, reasoning-effort and the token limits do on each API, and it includes a compiled example configuration.

The defaults are "chat-completions" and an empty reasoning effort. An application that sets neither key gets the same SPI provider as before, and a test checks this.

@github-actions github-actions Bot added the documentation documentation related label Nov 9, 2026

@johanandren johanandren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once runtime is out

🤖 Review

Nits

  1. The max-completion-tokens row in the docs and the reference.conf comment don't say it is the fallback limit with api = "responses" (the javadoc does).
  2. The reasoning-effort comment in reference.conf doesn't say it applies to both APIs (the docs do).

@patriknw
patriknw force-pushed the wip-openai-responses-api-patriknw branch from 8dc6d9e to 8f672d4 Compare November 9, 2026 15:46
@patriknw

patriknw commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

incorporated feedback, and rebased

@johanandren
johanandren merged commit 519faaa into main Nov 10, 2026
38 checks passed
@johanandren
johanandren deleted the wip-openai-responses-api-patriknw branch November 10, 2026 11:10
@patriknw

Copy link
Copy Markdown
Contributor Author

For the record, I tried this with a few samples and real openai gpt-5 responses api. Seems to be working!

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

Labels

documentation documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants