Skip to content

fix(model_metadata): drop duplicate 'stepfun' entry in _PROVIDER_PREFIXES#65812

Open
waroffchange wants to merge 1 commit into
NousResearch:mainfrom
waroffchange:fix/model-metadata-duplicate-stepfun-prefix
Open

fix(model_metadata): drop duplicate 'stepfun' entry in _PROVIDER_PREFIXES#65812
waroffchange wants to merge 1 commit into
NousResearch:mainfrom
waroffchange:fix/model-metadata-duplicate-stepfun-prefix

Conversation

@waroffchange

Copy link
Copy Markdown
Contributor

Problem

"stepfun" is listed twice inside the same frozenset literal in agent/model_metadata.py:

  • Line 50 — the canonical provider block, alongside gemini, zai, minimax, anthropic, deepseek.
  • Line 63 — the # Common aliases block, alongside opencode, zen, go, kilo, dashscope.

stepfun is a canonical provider name, not an alias, so the second copy is both redundant and filed under the wrong heading. frozenset dedupes on construction, so the alias-block entry has never had any effect — it is dead weight that misleads the next reader into thinking stepfun is an alias of something.

Fix

Removes the duplicate from the alias block. One line, one file.

     "ollama",
-    "stepfun", "opencode", "zen", "go", "kilo", "dashscope", "aliyun", "qwen",
+    "opencode", "zen", "go", "kilo", "dashscope", "aliyun", "qwen",
     "mimo", "xiaomi-mimo",

Why this is behavior-preserving

_PROVIDER_PREFIXES is only ever consumed as a membership test, so a duplicate element is a strict no-op and removing it cannot change any outcome:

  • "stepfun" in _PROVIDER_PREFIXES is still True — line 50 still provides it.
  • The set's contents, size, and every lookup against it are unchanged.

No logic, no control flow, and no public surface is touched. The unrelated api.stepfun.ai / api.stepfun.comstepfun endpoint-host map further down the file is deliberately left alone.

Verification

Provable by reading the literal — the same string appears twice in one frozenset({...}). Confirmed mechanically with an AST scan of the file (ast.Set element counting), which reports the frozenset going from 2 stepfun entries to 1 while the file's other two occurrences (the endpoint map) stay untouched.

…IXES

"stepfun" is listed twice in the same frozenset literal: once in the
canonical provider block and again in the "Common aliases" block. The
frozenset dedupes it, so the alias-block copy is dead weight that also
misfiles a canonical provider as an alias.

Removes the duplicate only; membership is unchanged.
@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels Jul 16, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Drops duplicate 'stepfun' entry in _PROVIDER_PREFIXES. Trivial cleanup. No security concerns.


Reviewed by Hermes Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants