feat: add GPT-5/Responses API support and secure API key storage#41
Open
bramburn wants to merge 3 commits intoSitoi:mainfrom
Open
feat: add GPT-5/Responses API support and secure API key storage#41bramburn wants to merge 3 commits intoSitoi:mainfrom
bramburn wants to merge 3 commits intoSitoi:mainfrom
Conversation
- Add OPENAI_API_TYPE setting (completion/response) with 'completion' as default - Add OPENAI_REASONING_EFFORT setting (minimal/low/medium/high) for Responses API - Add OPENAI_TEXT_VERBOSITY setting (low/medium/high) for Responses API - Add requiresResponsesAPI() function to detect GPT-5 and o-series models - Add chatWithResponsesAPI() function for the new Responses API - Auto-select API based on user setting and model type - Upgrade openai package from v4 to v6 for Responses API support
- add OPENAI_API_TYPE, OPENAI_REASONING_EFFORT, OPENAI_TEXT_VERBOSITY columns - expand notes for each new configuration option - include detailed API type guide for completion vs response - update package.json descriptions and enum values to match new docs - adjust table formatting for better readability in Markdown
- Move OPENAI_API_KEY and GEMINI_API_KEY from settings to SecretStorage - API keys now stored securely using VS Code's SecretStorage API - Keys backed by OS keychain (Keychain/Credential Manager) - Added commands: setOpenAIApiKey, setGeminiApiKey, clearOpenAIApiKey, clearGeminiApiKey - Removed OPENAI_API_KEY and GEMINI_API_KEY from package.json settings - Update README with secure storage documentation Benefits: - Keys never appear in settings.json, logs, or synced settings - Uses OS-level encryption - Independent of workspace configuration
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.
Summary
This PR adds support for GPT-5 and o-series reasoning models using OpenAI's new Responses API, along with secure API key storage using VS Code SecretStorage.
Changes
1. Responses API Support (GPT-5, o-series models)
OpenAI's new Responses API is recommended for GPT-5 and o-series reasoning models. This PR adds three new configuration options:
OPENAI_API_TYPEcompletioncompletion(Chat Completions) orresponse(Responses API)OPENAI_REASONING_EFFORTmediumminimal,low,medium,highOPENAI_TEXT_VERBOSITYmediumlow,medium,highWhen to use which API:
completion(Chat Completions)response(Responses API)Reasoning Effort Guide:
minimal- Fastest, for simple classification/formattinglow- Quick responses for extraction, short rewritesmedium- Balanced quality/latency/cost (recommended)high- Best accuracy for complex planning/agentsText Verbosity Guide:
low- Compact, concise for UI/chat widgetsmedium- Standard output with reasonable detail (default)high- Verbose for documentation, reports, audits2. Secure API Key Storage
API keys are now stored securely using VS Code's SecretStorage API (backed by OS keychain: Keychain on macOS, Credential Manager on Windows, etc.).
Why SecretStorage?
settings.json, logs, or synced settingsNew Commands:
Set OpenAI API Key (Secure)Set Gemini API Key (Secure)Clear OpenAI API KeyClear Gemini API KeyMigration Guide
For existing users:
API Keys: Run
Set OpenAI API Key (Secure)/Set Gemini API Key (Secure)from Command Palette to migrate your API keys to SecretStorage.Model Selection: If using GPT-5 or o-series models, set
OPENAI_API_TYPEtoresponsein settings.Breaking Changes:
OPENAI_API_KEYandGEMINI_API_KEYsettings removed from package.jsonTesting
To test the extension locally:
npm install npm run compile # Press F5 to run in Extension Development HostReferences