Skip to content

feat: add built-in provider presets for Anthropic API-compatible services#424

Open
octo-patch wants to merge 1 commit intoYishenTu:mainfrom
octo-patch:feature/add-provider-presets
Open

feat: add built-in provider presets for Anthropic API-compatible services#424
octo-patch wants to merge 1 commit intoYishenTu:mainfrom
octo-patch:feature/add-provider-presets

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Add one-click provider presets in Settings → Environment for popular Anthropic API-compatible services: MiniMax, OpenRouter, DeepSeek, Kimi (Moonshot), and GLM (Zhipu AI)
  • Users can apply a preset to auto-fill ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY, and ANTHROPIC_MODEL env vars, including context window limits where applicable
  • Add Custom Model Providers reference table in README with base URLs and model names

Changes

File Description
src/utils/providerPresets.ts New file: PROVIDER_PRESETS array + getProviderPreset() lookup
src/features/settings/ui/EnvSnippetManager.ts Render provider presets grid above user snippets
src/style/settings/env-snippets.css Styles for preset buttons grid
src/i18n/types.ts Add settings.providerPresets.name key
src/i18n/locales/*.json (10 files) Translated "Provider presets" label
README.md Add MiniMax to provider list + Custom Model Providers table
tests/unit/utils/providerPresets.test.ts 35 unit tests
tests/integration/utils/providerPresets.test.ts 12 integration tests

17 files changed, 368 additions, 1 deletion

Test plan

  • npm run typecheck — passes
  • npm run lint — passes
  • npm run test — 35 unit + 12 integration tests pass
  • npm run build — production build succeeds
  • Existing env and i18n tests (187 tests) still pass
  • Manual: Open Settings → Environment → verify preset buttons render and apply env vars
  • Manual: Verify MiniMax preset populates correct base URL, API key placeholder, and M2.7 model

…ices

Add one-click provider presets in Settings → Environment for popular
Anthropic API-compatible providers: MiniMax, OpenRouter, DeepSeek,
Kimi (Moonshot), and GLM (Zhipu AI). This makes it easy for users to
switch between model providers without manually configuring env vars.

- New providerPresets.ts with preset definitions and lookup function
- Provider presets grid in EnvSnippetManager settings UI
- MiniMax added to README compatible providers list
- Custom Model Providers table in README with base URLs and models
- i18n support for all 10 locales
- 35 unit tests + 12 integration tests
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