feat: add StepFun and Nous Portal provider support (#140)

- Add StepFun provider (API key auth, STEPFUN_API_KEY)
- Add Nous Portal provider with full OAuth device code flow
  (device code request → poll for token → mint agent key → save to auth.json)
- Add NousLoginModal component for OAuth UI (user code display + verification link)
- Update ProviderFormModal to handle Nous OAuth flow (hide API key fields)
- Add nous-auth backend controller and routes
- Update PROVIDER_ENV_MAP with stepfun and nous entries
- Add i18n translations for Nous OAuth in all 8 locales

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-23 08:39:19 +08:00
committed by GitHub
parent 696d19298e
commit df797d09b2
16 changed files with 692 additions and 3 deletions
+46
View File
@@ -72,6 +72,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
base_url: 'https://api.kimi.com/coding/v1',
models: [
'kimi-for-coding',
'kimi-k2.6',
'kimi-k2.5',
'kimi-k2-thinking',
'kimi-k2-turbo-preview',
@@ -84,6 +85,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
builtin: true,
base_url: 'https://api.moonshot.cn/v1',
models: [
'kimi-k2.6',
'kimi-k2.5',
'kimi-k2-thinking',
'kimi-k2-turbo-preview',
@@ -247,6 +249,50 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
base_url: 'https://api.arcee.ai/v1',
models: ['trinity-large-thinking', 'trinity-large-preview', 'trinity-mini'],
},
{
label: 'Nous Portal',
value: 'nous',
builtin: true,
base_url: 'https://inference-api.nousresearch.com/v1',
models: [
'moonshotai/kimi-k2.6',
'xiaomi/mimo-v2.5-pro',
'xiaomi/mimo-v2.5',
'anthropic/claude-opus-4.7',
'anthropic/claude-opus-4.6',
'anthropic/claude-sonnet-4.6',
'anthropic/claude-sonnet-4.5',
'anthropic/claude-haiku-4.5',
'openai/gpt-5.4',
'openai/gpt-5.4-mini',
'openai/gpt-5.3-codex',
'google/gemini-3-pro-preview',
'google/gemini-3-flash-preview',
'google/gemini-3.1-pro-preview',
'google/gemini-3.1-flash-lite-preview',
'qwen/qwen3.5-plus-02-15',
'qwen/qwen3.5-35b-a3b',
'stepfun/step-3.5-flash',
'minimax/minimax-m2.7',
'minimax/minimax-m2.5',
'minimax/minimax-m2.5:free',
'z-ai/glm-5.1',
'z-ai/glm-5v-turbo',
'z-ai/glm-5-turbo',
'x-ai/grok-4.20-beta',
'nvidia/nemotron-3-super-120b-a12b',
'arcee-ai/trinity-large-thinking',
'openai/gpt-5.4-pro',
'openai/gpt-5.4-nano',
],
},
{
label: 'StepFun',
value: 'stepfun',
builtin: true,
base_url: 'https://api.stepfun.ai/step_plan/v1',
models: ['step-3.5-flash', 'step-3.5-flash-2603'],
},
{
label: 'OpenRouter',
value: 'openrouter',