litellm - 💡(How to fix) Fix [Feature Request]: Add native support and cost tracking for StepFun models (step-3.5-flash & step-tts-2) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23455Fetched 2026-04-08 00:44:10
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1
RAW_BUFFERClick to expand / collapse

Is your feature request related to a problem? Please describe.

StepFun has recently released highly competitive reasoning models (step-3.5-flash) and next-gen TTS models (step-tts-2).

While we can currently use them in LiteLLM via custom api_base (since they are 100% OpenAI-compatible), they lack native provider recognition and out-of-the-box cost tracking in LiteLLM's dashboard.

Describe the solution you'd like

Add stepfun as a native provider and register their models in model_prices_and_context_window.json so cost tracking works automatically.

API Details:

  • Format: OpenAI Compatible
  • Base URL: https://api.stepfun.ai/v1
  • Auth: Bearer Token

Model & Pricing Details for Registry

1. Reasoning Models (Chat)

Model NameInput (Cache Miss) / 1M tokensInput (Cache Hit) / 1M tokensOutput / 1M tokens
stepfun/step-3.5-flash$0.10$0.02$0.30

(Note: There is also a free tier exposed via OpenRouter as stepfun/step-3.5-flash:free which should be mapped if possible).

2. Audio/Speech Models

Model NameTypePrice
stepfun/step-tts-2Text-to-speech$50.00 / 1M characters

Links to official documentation

extent analysis

Fix Plan

To add stepfun as a native provider in LiteLLM, follow these steps:

  • Register the stepfun provider with its API details:
    • Base URL: https://api.stepfun.ai/v1
    • Auth: Bearer Token
  • Update model_prices_and_context_window.json to include the stepfun models:
    • Reasoning models: stepfun/step-3.5-flash with pricing details
    • Audio/speech models: stepfun/step-tts-2 with pricing details

Example Code

// model_prices_and_context_window.json update
{
  "stepfun": {
    "step-3.5-flash": {
      "input_cache_miss": 0.10,
      "input_cache_hit": 0.02,
      "output": 0.30
    },
    "step-3.5-flash:free": {
      "input_cache_miss": 0.00,
      "input_cache_hit": 0.00,
      "output": 0.00
    },
    "step-tts-2": {
      "price": 50.00
    }
  }
}
# Register stepfun provider
providers = {
    "stepfun": {
        "api_base": "https://api.stepfun.ai/v1",
        "auth": "Bearer Token"
    }
}

Verification

To verify the fix, check the LiteLLM dashboard for the stepfun provider and its models. Ensure that cost tracking is working automatically for the registered models.

Extra Tips

  • Refer to the official StepFun documentation for the latest pricing and model information.
  • Consider adding error handling for cases where the stepfun API is unavailable or returns an error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING