Skip to content

feat: add StepFun Global direct API support - #906

Merged
Astro-Han merged 6 commits into
mainfrom
feat/stepfun-global-direct-api
Jul 13, 2026
Merged

Astro-Han merged 6 commits into
mainfrom
feat/stepfun-global-direct-api

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Add the StepFun Global direct API as the stable stepfun-ai provider at https://api.stepfun.ai/v1.
  • Reuse the shared registry, protocol discovery, OpenAI-compatible runtime, exact model-id persistence, and Desktop provider-brand seams across Desktop, CLI, storage, headless, and runtime.
  • Reuse feat: add StepFun China direct API support #902's byte-identical StepFun SVG, provenance, MIT notice, mask rendering, and integrity checker without vendoring a second asset.

Why

Issue #860 Phase 3 requires StepFun Global direct API access to remain separate from StepFun China and Step Plan because the console, API domain, credentials, billing path, and permitted models are separate account facts. This slice adds one registry-owned identity with account model discovery, a deterministic models.dev snapshot fallback, and a verified reasoning/tool-call loop.

Refs #860.

Scope

This PR implements only the Global direct API identity stepfun-ai (https://api.stepfun.ai/v1). The existing China direct identity stepfun, Step Plan China/global identities, other providers, and Phase 7 are explicit non-goals.

The complete models.dev snapshot remains available as metadata. The fallback selector is intentionally limited to the three models that the current StepFun Global Tool Call documentation explicitly lists: step-3.7-flash, step-3.5-flash-2603, and step-3.5-flash.

Verification

  • npm run typecheck — passed for every workspace.
  • @maka/core — 873 passed, 0 failed after the reviewer fix.
  • maka-agent CLI — 311 passed, 0 failed.
  • @maka/storage — 245 passed, 0 failed.
  • @maka/runtime — 1,465 passed, 7 existing skips, 0 failed; the StepFun Global deterministic contract covers authenticated discovery, exact model IDs, the default reasoning response field, tool execution/result replay, and the final assistant turn.
  • @maka/headless — 863 passed, 0 failed; post-fix provider-env and Harbor focused suites also passed.
  • npm --workspace @maka/desktop run build:renderer — passed; the packaged third-party notice checker confirmed the byte-identical notice.
  • npm run check:stale, the 14-test sync-model-metadata suite, and git diff --check origin/main...HEAD — passed.
  • Immutable upstream SVG hash comparison — matched lobehub/lobe-icons@e4302041fbb3039608d25f9f618bd462783b875e/packages/static-svg/icons/stepfun.svg; SHA-256 f46fbd1eee00a3dc7874395484bcc3e25a803e9eb4b79f07b7eec377a1e2f25c.
  • Independent reviewer — the initial P2 about over-broad fallback models was fixed and the re-review returned 0 findings.
  • Validation audit note: one chained local validation command yielded at the tool's 30-second observation window while Runtime was still running. It produced no assertion failure, non-zero exit, or stack trace; the wrapper had not retained the returned session metadata. Runtime was then run independently with explicit exit=0 and the 1,465/7/0 result above.

Local Desktop E2E was deferred to CI per the Issue #860 delivery boundary; CI E2E remains a merge gate. No new layout or interaction was introduced, so visual evidence is not applicable: catalog/detail rendering reuses the existing ProviderAssetMask path and the deterministic E2E contract now exercises both StepFun identities. A live API smoke was not run because no safe user credential was available; no credential or raw provider response was recorded.

Impact

Users can configure StepFun Global independently from StepFun China, discover account-visible models, fall back to the documented tool-capable snapshot subset when discovery is unavailable, and preserve exact model IDs across Desktop, CLI, storage, headless, and runtime. Existing persisted provider IDs and Step Plan paths are unchanged. No migration is required.

Reviewer notes

Authoritative protocol evidence:

Rollback is a sequence of independently revertible commits. The provider has one registry owner and introduces no parallel discovery, runtime, brand asset, provenance, or notice state.

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 f21315c into main Jul 13, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the feat/stepfun-global-direct-api branch July 13, 2026 18: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