Docs · Guide

StepCode on any model

StepCode is StepFun's coding agent in the terminal, the step command. Its default provider and model are in config.toml, and its providers in models.json, in Pi's provider format. packinggoods adds a provider named packinggoods to models.json and makes it the default in config.toml, so StepCode runs on any model in packinggoods: DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription.

Set up StepCode

  1. Add a provider in packinggoodsAdd an API key on the Providers page, or sign in to a subscription.
  2. Pick a model for StepCode on the Agents pagePick a model via packinggoods. On the command line, packinggoods step is the same agent.
  3. Start StepCodeStepCode reads both files when it starts, so a new session is on the model you picked.
Terminal
packinggoods stepcode deepseek/deepseek-v4-pro

config.toml and models.json

The files are in ~/.stepcode, or the folder above an absolute STEP_CODING_AGENT_DIR. A folder renamed with STEPCODE_CONFIG_DIR is followed on this computer. In config.toml packinggoods writes only these keys, and the rest of the file stays as it was:

Terminal
# ~/.stepcode/config.toml
defaultProvider = "packinggoods"
defaultModel = "deepseek/deepseek-v4-pro"
enabledModels = ["…", "packinggoods/deepseek/deepseek-v4-pro"]

In models.json packinggoods writes only providers.packinggoods: the gateway's /v1 as baseUrl, the openai-completions api, packinggoods's own key for StepCode, and packinggoods's models. models.json may have comments (JSONC). packinggoods checks it first: the root, providers and providers.packinggoods must be objects, or nothing is written, so a file it can't read safely isn't broken.

Terminal
// ~/.stepcode/models.json
{
  "providers": {
    "packinggoods": {
      "name": "packinggoods",
      "baseUrl": "http://127.0.0.1:3425/v1",
      "api": "openai-completions",
      "apiKey": "",
      "models": [ { "id": "deepseek/deepseek-v4-pro", … } ]
    }
  }
}

The enabledModels scope

enabledModels is a scope of patterns matched against models. At start-up StepCode uses the default model when a pattern in the scope takes it, and otherwise the scope's first entry, with any :level suffix taken off. So the default alone isn't enough: when you have a scope, packinggoods appends its pick to it and remembers that it did. Switching back takes out only those entries, never your own. A provider renamed takes its scope entries with it.

Switching back

Before its first write packinggoods saves the original provider, model and scope, the original providers.packinggoods text, and whether config.toml, models.json and providers existed. Switching back puts all of these back, and removes files packinggoods made.

Terminal
packinggoods stepcode default

FAQ

Can StepCode run on DeepSeek, GLM or a ChatGPT subscription?

Yes. Pick a via-packinggoods model for StepCode on packinggoods's Agents page, then start StepCode.

Why did StepCode start on another model when defaultModel was set?

With enabledModels set, the default is used only when the scope takes it. packinggoods appends its pick to the scope and removes only that entry when switching back.

Does a models.json with comments work?

Yes. packinggoods reads it as JSONC, and writes nothing when the root, providers or providers.packinggoods isn't an object.

Does switching back restore my settings?

Yes. The original provider, model, scope and providers.packinggoods go back, and files packinggoods made are removed.

More agents on the same models: Avibe on any model, MothX on any model, Pi on any model and omp on any model. Something fails? See Fixing common errors, or ask on Discord.