Skip to content

feat: add SiliconFlow CN and Global providers#565

Merged
warren618 merged 1 commit into
HKUDS:mainfrom
UNHNQ:add-siliconflow-providers
Jul 20, 2026
Merged

feat: add SiliconFlow CN and Global providers#565
warren618 merged 1 commit into
HKUDS:mainfrom
UNHNQ:add-siliconflow-providers

Conversation

@UNHNQ

@UNHNQ UNHNQ commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add SiliconFlow CN and Global as selectable OpenAI-compatible LLM providers.
  • Wire both providers into settings metadata, runtime provider capability mapping, and CLI onboarding.
  • Add focused tests for provider defaults, env mapping, and settings persistence.

Why

SiliconFlow provides OpenAI-compatible MaaS API endpoints for both China and Global users. Exposing both endpoints as first-class provider presets lets users configure SiliconFlow without manually overriding provider/base URL settings.

Changes

  • Added siliconflow-cn with default endpoint https://api.siliconflow.cn/v1.
  • Added siliconflow-global with default endpoint https://api.siliconflow.com/v1.
  • Set both presets to the SiliconFlow model id deepseek-ai/DeepSeek-V3.1-Terminus.
  • Added provider capability mappings so both presets map their provider-specific env vars into the OpenAI-compatible runtime path.
  • Added both providers to legacy and interactive CLI onboarding.
  • Added focused regression coverage for provider defaults, CLI onboarding metadata, runtime env mapping, and settings API persistence.

Test Plan

  • Existing tests pass (pytest --ignore=agent/tests/e2e_backtest --tb=short -q)
  • New tests added (if applicable)
  • Tested manually (describe below)

Focused validation run locally:

python -m pytest agent/tests/test_settings_api.py -k siliconflow -q

Result:

2 passed, 18 deselected, 5 warnings

python -m pytest agent/tests/test_llm_provider_defaults.py agent/tests/test_llm.py -k siliconflow -q

Result:

3 passed, 39 deselected

I did not run the full test suite locally.

  • No changes to protected areas (src/agent/, src/session/, src/providers/) without prior discussion
  • No hardcoded values (API keys, file paths, magic numbers)
  • Code follows CONTRIBUTING.md guidelines
  • Documentation updated (if user-facing change)

Signed-off-by: zhanghuiying <20434979+UNHNQ@users.noreply.github.com>
@warren618
warren618 merged commit 83c88e6 into HKUDS:main Jul 20, 2026
warren618 added a commit that referenced this pull request Jul 20, 2026
…537) inserts

Both PRs insert providers ahead of ollama/openai-codex in the init menu; the
combined order puts ollama at 17 and openai-codex at 18.
@warren618

Copy link
Copy Markdown
Collaborator

Thanks @UNHNQ — merged. Clean additive SiliconFlow CN/Global registration with separate env namespaces.

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.

2 participants