Skip to content

feat(provider): add StepFun and Step Plan presets - #10153

Draft
Mola-maker wants to merge 1 commit into
AstrBotDevs:masterfrom
Mola-maker:feat/stepfun-provider-presets
Draft

Mola-maker wants to merge 1 commit into
AstrBotDevs:masterfrom
Mola-maker:feat/stepfun-provider-presets

Conversation

@Mola-maker

@Mola-maker Mola-maker commented Sep 20, 2026

Copy link
Copy Markdown

StepFun users currently have to choose OpenAI Compatible and enter an endpoint manually. This adds separate StepFun and StepFun Step Plan entries under Providers → Chat Completion → Add, with the standard and subscription endpoints prefilled as documented by StepFun.

Modifications

Both presets reuse openai_chat_completion, including editable API keys/base URLs, timeout, proxy, custom headers, model discovery, manual model selection, and per-model capabilities/context/custom request parameters. Each has a distinct source ID and a theme-aware StepFun icon. English and Chinese setup instructions include the actual selector screenshot.

  • This is NOT a breaking change.

Screenshots or Test Results

Visual evidence

In the existing dashboard, open Providers → Chat Completion → Add and search for StepFun. The base revision has no StepFun preset; this branch shows the two entries below. Select either entry to inspect its endpoint and advanced settings, save it with your API key, then fetch models or add a supported model ID manually.

StepFun and StepFun Step Plan shown as separate searchable provider presets

Validation

Local validation on Windows with Python 3.12: the existing full pytest suite passed (3488 passed, 82 skipped); the new four-case preset regression test also passed. The focused OpenAI/provider run passed with 114 passed and 1 skipped. The new tests exercise the real OpenAI SDK against an in-memory HTTP transport, checking model-list and streaming/non-streaming chat URLs, authentication, custom headers, timeout, and request parameters. All four fail against the base configuration because the presets are absent.

Ruff formatting/lint, dashboard typecheck/production build, and the bilingual documentation build passed. Browser checks covered the selector, endpoint fields, advanced settings, and manual model configuration. No live StepFun inference or account-specific model availability was tested; the screenshot is from a local instance without a real API key.

Checklist

Summary by Sourcery

Add ready-to-use StepFun and Step Plan provider presets for OpenAI-compatible chat completion APIs.

New Features:

  • Add separate StepFun and StepFun Step Plan chat-completion provider presets with preconfigured, editable API endpoints.
  • Provide StepFun-specific provider icons in the dashboard.

Documentation:

  • Document StepFun and Step Plan setup, endpoints, model configuration, and optional provider settings in English and Chinese guides.

Tests:

  • Add regression coverage for StepFun model discovery and streaming/non-streaming chat requests, including authentication, headers, timeouts, and custom parameters.

6. Click **Save and Fetch Models**, find the desired model, click `+`, and make sure it is enabled. If the model list cannot be fetched, click **Save Configuration**, then **Custom Model** and enter the model ID. Use **Test Model** beside the model to check connectivity.
7. Open **Config**, select the profile to use, and go to **AI → Model**. Set **Chat Model** to the model you just added, then click **Save Configuration** at the bottom right. This setting is for AstrBot built-in AI.

## Connecting StepFun and Step Plan

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add this document.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

收到

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