Skip to content

feat(provider): add StepFun Token Plan#2002

Merged
zhangmo8 merged 1 commit into
devfrom
feat/stepfun-token-plan-provider
Jul 20, 2026
Merged

feat(provider): add StepFun Token Plan#2002
zhangmo8 merged 1 commit into
devfrom
feat/stepfun-token-plan-provider

Conversation

@zhangmo8

@zhangmo8 zhangmo8 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the existing stepfun pay-as-you-go profile on https://api.stepfun.com/v1
  • add a disabled stepfun-step-plan profile on https://api.stepfun.com/step_plan/v1
  • use the dedicated Step Plan provider-db catalog and step-3.7-flash connection check
  • document compatibility and cover defaults, registry, model discovery, and refresh classification

UI

Before

Providers
  StepFun                 https://api.stepfun.com/v1

After

Providers
  StepFun                 https://api.stepfun.com/v1
  StepFun Token Plan      https://api.stepfun.com/step_plan/v1

Validation

  • pnpm exec vitest --config vitest.config.ts --run test/main/provider/defaultProviders.test.ts test/main/provider/basicApiKeyProviders.test.ts test/main/shared/providerDbCatalog.test.ts
  • pnpm run format
  • pnpm run format:check
  • pnpm run i18n
  • pnpm run lint
  • pnpm run typecheck

Summary by CodeRabbit

  • New Features

    • Added a disabled StepFun Token Plan provider option with its own endpoint and API-key configuration.
    • Added support for discovering Token Plan models, including capabilities and token limits.
    • Added connection validation using the recommended step-3.7-flash model.
    • Preserved existing StepFun settings and kept both provider profiles independent.
  • Documentation

    • Added implementation guidance, specifications, integration details, compatibility expectations, and validation checklists.
  • Tests

    • Added coverage for provider discovery, configuration, model catalog mapping, endpoint validation, and disabled default settings.

Keep the standard StepFun billing endpoint unchanged while adding an
independent OpenAI-compatible profile backed by the Step Plan model
catalog and recommended check model.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 56068a13-2b2f-4bb1-ad14-3c6bd9bde7cf

📥 Commits

Reviewing files that changed from the base of the PR and between 9003ae5 and c2eb013.

📒 Files selected for processing (9)
  • docs/features/stepfun-token-plan-provider/plan.md
  • docs/features/stepfun-token-plan-provider/spec.md
  • docs/features/stepfun-token-plan-provider/tasks.md
  • src/main/provider/defaults.ts
  • src/main/provider/providerRegistry.ts
  • src/shared/providerDbCatalog.ts
  • test/main/provider/basicApiKeyProviders.test.ts
  • test/main/provider/defaultProviders.test.ts
  • test/main/shared/providerDbCatalog.test.ts

📝 Walkthrough

Walkthrough

Adds a disabled stepfun-step-plan provider profile with its Step Plan endpoint, provider-db model source, connection-check model, catalog classification, documentation, and focused test coverage while preserving the existing stepfun profile.

Changes

StepFun Token Plan Provider

Layer / File(s) Summary
Provider contract and implementation plan
docs/features/stepfun-token-plan-provider/*
Documents separate standard and Step Plan profiles, independent credentials and catalogs, endpoint and authentication requirements, compatibility constraints, and validation tasks.
Provider registration and catalog wiring
src/main/provider/defaults.ts, src/main/provider/providerRegistry.ts, src/shared/providerDbCatalog.ts
Registers the disabled stepfun-step-plan profile with the Step Plan URL, OpenAI-compatible settings, provider-db source, step-3.7-flash check model, and provider-db classification.
Provider behavior and metadata tests
test/main/provider/*, test/main/shared/providerDbCatalog.test.ts
Tests default metadata, provider registration, whitespace-normalized provider-db recognition, Token Plan model mapping, token conversions, and connection-check configuration.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding the StepFun Token Plan provider.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/stepfun-token-plan-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zhangmo8
zhangmo8 merged commit bfb1e78 into dev Jul 20, 2026
4 checks passed
@zhangmo8
zhangmo8 deleted the feat/stepfun-token-plan-provider branch July 20, 2026 07:49
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