feat: add OpenAI Responses API provider#255
Open
ObesityChow wants to merge 4 commits intotheJayTea:mainfrom
Open
feat: add OpenAI Responses API provider#255ObesityChow wants to merge 4 commits intotheJayTea:mainfrom
ObesityChow wants to merge 4 commits intotheJayTea:mainfrom
Conversation
Add OpenAIResponsesProvider as a selectable provider option alongside
the existing Gemini, OpenAI Compatible, and Ollama providers.
Key differences from the existing OpenAICompatibleProvider:
- Uses /v1/responses endpoint (not /v1/chat/completions)
- Input field is 'input' (list of message dicts or string)
- Output parsed from response.output[0].content[0].text
- Stateful multi-turn via previous_response_id (no full history replay)
Changes:
- Windows_and_Linux/aiprovider.py: add OpenAIResponsesProvider class
- API key, base URL, model dropdown (gpt-4o-mini / gpt-4o / o3-mini / o1 + custom)
- Obfuscated key storage matching existing pattern
- Stateful follow-up caching via _last_response_id
- Windows_and_Linux/WritingToolApp.py:
- Import and register OpenAIResponsesProvider
- Add provider-specific branch in process_followup_question for
stateful Responses API multi-turn
…macOS versions The x-apple.systemsettings: scheme stopped working on macOS 26+. Consolidate all Privacy pane opening logic into a single helper that tries x-apple.systempreferences: first and falls back to x-apple.systemsettings: for older versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom base URLs without /v1 (e.g. https://newapi.example.com) would result in requests to /chat/completions instead of /v1/chat/completions, hitting the web UI instead of the API and causing "Failed to parse API response" errors. Also add placeholder hint in the Base URL text field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Some third-party API proxies require stream=true and reject non-streaming requests. Add a toggle in OpenAI settings that, when enabled, uses SSE streaming internally and accumulates chunks into a single response. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
What
This PR now includes three related updates:
Included
1) Windows/Linux — OpenAI Responses API provider
OpenAI Responses APIPOST /v1/responsesresponse.output[0].content[0].textprevious_response_idgpt-4o-mini,gpt-4o,o3-mini,o1, plus customFiles:
Windows_and_Linux/aiprovider.pyWindows_and_Linux/WritingToolApp.py2) macOS — Privacy & Security settings fallback
Files:
macOS/WritingTools/Views/Onboarding/OnboardingView.swiftmacOS/WritingTools/Views/OnboardingPermissionsStep.swift3) macOS — OpenAI base URL + Force Streaming
stream=trueFiles:
macOS/WritingTools/Models/Providers/OpenAIProvider.swiftmacOS/WritingTools/Views/Settings/Providers/OpenAISettingsView.swiftmacOS/WritingTools/App/AppSettings.swiftmacOS/WritingTools/App/AppState.swiftNotes