feat: Add Deepseek & Zhipu API support with code quality improvements#147
Open
Alenryuichi wants to merge 1 commit intoj4wg:mainfrom
Open
feat: Add Deepseek & Zhipu API support with code quality improvements#147Alenryuichi wants to merge 1 commit intoj4wg:mainfrom
Alenryuichi wants to merge 1 commit intoj4wg:mainfrom
Conversation
Features: - Add Deepseek and Zhipu/GLM API providers alongside OpenAI, Gemini, Anthropic - Implement per-provider API key storage - Add GLM-4.5 and GLM-5 model options to Settings UI - Add collapsible "解题思路" section with markdown rendering - Fix malformed JSON from GLM API (Chinese quotes, single-quoted values) Security: - Add DOMPurify to sanitize AI-generated HTML content (XSS prevention) Code Quality: - Extract API URLs to constants (API_URLS) - Refactor Zhipu API calls into reusable callZhipuAPI() method - Remove unused variable (stringStart) - Remove debug console.log statements - Delete temporary test file (test-detect-quotes.js) Dependencies: - Add jsonrepair for JSON fixing - Add dompurify for HTML sanitization
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
Add support for Deepseek and Zhipu/GLM API providers, expanding the available AI backends for Chinese users.
Features
Security
Code Quality
Dependencies Added