Skip to content

feat: add StepFun China direct API support - #902

Merged
Astro-Han merged 1 commit into
mainfrom
feat/stepfun-provider-support
Jul 13, 2026
Merged

Astro-Han merged 1 commit into
mainfrom
feat/stepfun-provider-support

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Add the China StepFun direct API as the stable stepfun provider at https://api.stepfun.com/v1.
  • Reuse the shared provider registry, protocol model discovery, OpenAI-compatible runtime, exact model-id persistence, and Desktop brand rendering seams across Desktop, CLI, storage, headless, and runtime.
  • Vendor the official StepFun mark byte-for-byte from Lobe Icons with provenance, integrity, and MIT notice coverage.

Why

Issue #860 Phase 3 requires a complete direct-provider slice rather than a catalog-only entry. This provider needs one registry-owned identity, authenticated account model discovery with a deterministic models.dev snapshot fallback, exact model IDs through every host, and a verified reasoning/tool-call loop.

Refs #860.

Scope

This PR implements only the China direct API identity stepfun (https://api.stepfun.com/v1). The separate Global direct identity stepfun-ai, Step Plan identities, later provider-matrix extensions, and Phase 7 are explicit non-goals.

The runtime conformance fixture follows StepFun's default reasoning response field. The existing generic OpenAI-compatible adapter parses it and performs the second-stage assistant/tool replay; no StepFun-specific runtime override or parallel provider path was added.

Verification

  • npm run typecheck — passed for every workspace on the final HEAD.
  • npm test — passed across all workspaces during pre-review validation.
  • npm --workspace @maka/runtime test -- --test-name-pattern='StepFun China preserves' — passed on the final HEAD; the runtime script executed the full suite: 1,399 passed, 7 existing skips, 0 failed.
  • Core StepFun registry/catalog/auth contracts — 3/3 passed in independent review.
  • npm --workspace @maka/desktop run build:renderer — passed; the packaged third-party notice checker confirmed byte-identical notice inclusion.
  • npm run check:stale — passed.
  • git diff --check origin/main...HEAD — passed.
  • Immutable upstream SVG comparison — byte-identical. SHA-256: f46fbd1eee00a3dc7874395484bcc3e25a803e9eb4b79f07b7eec377a1e2f25c.
  • Independent reviewer pass — 0 P0–P3 findings after one verified protocol-fixture correction.

Local Desktop E2E was intentionally deferred to CI per the delivery boundary. There is no new layout or interaction to capture manually: catalog and detail rendering use the existing shared ProviderAssetMask path, covered by deterministic renderer/E2E contracts and the byte-exact asset governance test. A real API smoke was not run because no safe StepFun credential was available; no credential or raw provider response was recorded.

Impact

Users can configure the China StepFun direct API, discover account-visible models, fall back to the checked-in models.dev snapshot when discovery is unavailable, and retain exact StepFun model IDs across Desktop, CLI, storage, headless, and runtime. Existing providers and persisted provider IDs are unchanged. No migration is required.

Reviewer notes

Brand source: lobehub/lobe-icons, package release @lobehub/[email protected], immutable commit e4302041fbb3039608d25f9f618bd462783b875e, path packages/static-svg/icons/stepfun.svg, MIT license. The file is vendored byte-for-byte and rendered through the existing monochrome mask/currentColor seam.

Rollback is a single squash revert; the provider has one registry owner and introduces no separate state or discovery mechanism.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

@Astro-Han
Astro-Han merged commit a436235 into main Jul 13, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the feat/stepfun-provider-support branch July 13, 2026 17:28
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