Skip to content

feat: add AI service providers - #371

Open
SeyoZhou wants to merge 2 commits into
JOYCEQL:mainfrom
SeyoZhou:feat/add-ai-service-providers
Open

feat: add AI service providers#371
SeyoZhou wants to merge 2 commits into
JOYCEQL:mainfrom
SeyoZhou:feat/add-ai-service-providers

Conversation

@SeyoZhou

Copy link
Copy Markdown

Summary

  • Add Claude (Anthropic Messages API) and Grok (xAI OpenAI-compatible) as first-class AI providers in AI settings.
  • Support custom API endpoints for Claude, Grok, and the existing OpenAI-compatible provider (proxy/gateway friendly, inspired by flexible provider configs).
  • Centralize upstream adapters in src/lib/server/chatCompletion.ts for OpenAI-chat, Anthropic, and Gemini formats, and share credential resolution via src/lib/ai/credentials.ts.

User-visible impact

  • Dashboard → AI Config now lists 6 providers: DeepSeek, Doubao, OpenAI/Compatible, Gemini, Claude, Grok.
  • Grammar check and AI polish work with the newly selected providers.
  • Claude/Grok ship with sensible default model IDs and endpoints that users can override.

Validation

  • pnpm build passed
  • Manual: configure Claude/Grok keys and run polish + grammar check
  • zh/en locale strings updated

Notes

  • Full multi-provider CRUD like a dedicated provider manager was not added to keep the PR focused and aligned with the existing store model.
  • OpenAI-compatible custom endpoints remain the path for other gateways (OneAPI, NewAPI, local proxies, etc.).

SeyoZhou added 2 commits July 29, 2026 11:18
Add Claude and Grok as first-class providers with optional custom
endpoints, and centralize chat completion adapters for OpenAI-compatible,
Anthropic, and Gemini formats.
Use deepseek-v4-flash, claude-sonnet-5, and grok-4.5 as current defaults.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant