Repository navigation
feat(ai): support OpenAI Responses API channels - #15
Merged
Merged
Conversation
Add an "OpenAI Responses" channel provider (openai-responses) that calls
{Base URL}/responses, so models such as gpt-6.2-sol can use function tools
with reasoning effort in the AI assistant. The existing chat completions
provider is relabelled "OpenAI Chat" and keeps working unchanged.
- Assistant: streaming Responses loop with multi-round function calls,
store: false, and reasoning (plus encrypted reasoning content) only when
an effort is set
- Classify / summaries / JSON generation / connection test / model list
support the new provider; JSON mode puts the instructions in the input
messages as required by the Responses API
- Use the official openai SDK for both OpenAI providers instead of
hand-written HTTP and SSE parsing; keep reading reasoning_content from
OpenAI-compatible endpoints and skip the auth header when no key is set
- Error messages no longer repeat the HTTP status code
- Settings UI, zh/en strings and docs updated; tests added
Closes #14
gopkg-dev
force-pushed
the
fix/openai-responses-api
branch
from
November 26, 2026 05:07
4ceb3ba to
163aedf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Closes #14.
The AI assistant's OpenAI channel always called
{Base URL}/chat/completionsand senttoolstogether withreasoning_effort. Models such asgpt-6.2-solreject that combination on Chat Completions and return 400, asking for/v1/responsesinstead. There was no way to pick the Responses API.What
New channel provider: OpenAI Responses
openai-responses, which calls{Base URL}/responsesand/models.AI assistant
store: false. Model output items (reasoning, messages, function calls) are passed back, followed byfunction_call_output.reasoningandinclude: ['reasoning.encrypted_content']are sent only when an effort is set, since non-reasoning models reject them.Other AI features
inputas a developer message. The Responses API requires the word "json" in the input messages, andinstructionsdoesn't count.Official SDK
openaiSDK instead of hand-written HTTP and SSE parsing, the same way Anthropic already uses@anthropic-ai/sdk.reasoning_content/reasoningdeltas that OpenAI-compatible endpoints (DeepSeek, Qwen, etc.) send.Authorizationheader is sent.502: 502 …).UI and docs
Testing
pnpm typecheckpasses.pnpm testpasses: server 189, web 18.server/test/openai-responses.test.tscovers:reasoning/includeonly when an effort is setresponse.failed/response.incompleteerrorsreasoning_content, a tool call, and no auth header without a keygemini-3.5-flash-lite). That relay doesn't support/responses(502 even for a minimal request). OpenAI Responses has not yet been verified end to end against a realgpt-6.2-solendpoint.