Skip to content

Pre-fill custom-provider model specs from an open-weight catalog in setup - #279

Open
gh0stwin wants to merge 8 commits into
advaitpaliwal:mainfrom
gh0stwin:fm/feynman-setup-catalog
Open

Pre-fill custom-provider model specs from an open-weight catalog in setup#279
gh0stwin wants to merge 8 commits into
advaitpaliwal:mainfrom
gh0stwin:fm/feynman-setup-catalog

Conversation

@gh0stwin

Copy link
Copy Markdown

Summary

feynman setup (and feynman model login for API-key providers, which shares
the same code path) previously configured a custom API-key provider with only
provider + model ids. At runtime Pi then fell back to hardcoded defaults:
128k context window, 16384 max completion tokens, thinking disabled, which is
undesirable. Instead, use a built-in, reviewable catalog as editable defaults.

What changed

  • New src/model/spec-catalog.ts: typed static catalog (no network calls at
    setup; extended by PR) of well-known open-weight model families with
    official-doc sources per row: DeepSeek, Kimi (Moonshot), GLM (Z.AI),
    Qwen (Alibaba), MiMo (Xiaomi), Hunyuan 3/4 (Tencent), MiniMax, and
    Nemotron (NVIDIA).
  • feynman model login custom-provider setup prompts per model: recognized
    ids pre-fill official context/max-output/effort values as editable
    defaults (enter accepts); unknown ids prompt with safe fallbacks. Every
    value stays user-overridable.
  • The selected reasoning efforts are written as an explicit
    thinkingLevelMap in models.json: unselected levels pin to null,
    which Pi's getSupportedThinkingLevels honors as unsupported — so the
    setup answer actually binds at runtime. Documented provider-specific
    disable values (e.g. Hunyuan no_think via chat_template_kwargs) are
    preserved.
  • Token input accepts plain integers plus 128k / 1m suffixed forms;
    anything unparsable warns and falls back to the pre-filled default.
  • Backward compatibility: pre-existing saved configs (and non-interactive
    runs) that omit the new fields keep Pi's fallbacks untouched.
  • Tests in tests/spec-catalog.test.ts cover catalog lookup, aliases and
    dated ids, the closed-weight absence guarantee, per-family official
    values, thinking-level-map derivation, token parsing, the
    non-interactive path, and models.json upsert including legacy entries.

Notes

  • Only values traceable to official docs are stored in the catalog; a value
    without official documentation stays undefined so setup prompts for it
    instead of guessing.
  • The catalog is static data.

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

@gh0stwin is attempting to deploy a commit to the Advait Paliwal's projects Team on Vercel.

A member of the Team first needs to authorize it.

…etup (#1)

* Add built-in model spec catalog to custom API-key provider setup

feynman setup / feynman model login for custom API-key providers now
pre-fills editable defaults (context length, max completion tokens,
supported reasoning efforts) from a typed, reviewable static catalog
covering OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Kimi,
GLM, Qwen, MiMo, Hunyuan 3/4, MiniMax, and Nemotron. Unknown model ids
prompt with safe fallbacks; every catalog value stays user-overridable,
and pre-existing saved configs that omit the fields keep Pi's fallbacks.

Runtime semantics verified against Pi's getSupportedThinkingLevels:
null mappings are honored as unsupported, so unselected efforts are
pinned to null. Token input accepts 128000 as well as 128k/1m forms.

* Restrict spec catalog to open-weight families

Per latest captain word: closed-weight models (GPT, Claude, Gemini,
Grok) no longer appear in the built-in catalog at all - their providers
ship their own runtime model registries, so their ids simply miss the
catalog and prompt at setup with safe fallbacks. The catalog now
carries the open-weight families only: DeepSeek, Kimi, GLM, Qwen,
MiMo, Hunyuan, MiniMax, and Nemotron. Generic thinking-level-map and
effort-derivation semantics are unchanged.

* Forward reasoning effort at first-party endpoints via compat overrides

* Document new setup per-model limit prompts in setup.md

* Correct GLM aliases and add qwen3.8-flash-next with doc-verified specs

Remove the aliases glm-5.3-highspeed and glm-5.2-highspeed: the
captain verified those model ids do not exist, so setup would have
mis-recognized them as the base rows. glm-5.3-flash and all other
real aliases stay.

Give qwen3.8-flash its own row with official Model Studio values
(1,000,000 context, 131,072 max output) instead of nesting it under
qwen3.8-max, and add qwen3.8-flash-next as its own entry per the
official Qwen3.8-Flash-Next card: 262,144 native context (1,000,000
only via self-hosted YaRN scaling), 131,072 recommended final-response
output, reasoning efforts xhigh (default) / medium / low.

* Scope per-model limit prompts to custom API-key provider flow only

* Make modelDefinitions optional to restore build

* Fill catalog limits from cited hosted catalogs

Fill contextWindow and maxTokens for every KNOWN_MODEL_SPECS row the
vendor docs leave silent, citing the public hosted catalogs per the
captain's verified readout (DeepInfra /v1/openai/models and Novita
model metadata, both read 2026-09-08): DeepSeek 1048576/1048576,
Kimi K3 1048576/1048576, K2.6/K2.7-Code 262144/262144, K2-0905 and
K2-0711 100352 output (Novita), GLM-5.2 1048576/131072, GLM-5.1
202752/202752 (captain-cited DeepInfra values), Qwen3.8-Max
1000000/131072 (Novita, consistent with the official flash family),
MiMo 131072 output, Hunyuan Hy3 262144 output, MiniMax M3/M2.7
131072 output, Nemotron Super/Ultra 262144 output.

Hosted deployments disagree in places (Novita vs DeepInfra on
DeepSeek/GLM-5.1/Qwen-Max output caps); the row comments name which
source backs each value and where a conflicting deployment differs.
Rows with no traceable source anywhere (Hunyuan Hy4, Nemotron Nano
Omni) keep the prompt fallback and say so.

* Refine setup.md sourcing wording to include hosted catalogs

* Update spec-catalog.ts

* Align spec-catalog tests with 33b19b3 values
feynman setup / feynman model login for custom API-key providers now
pre-fills editable defaults (context length, max completion tokens,
supported reasoning efforts) from a typed, reviewable static catalog
covering OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Kimi,
GLM, Qwen, MiMo, Hunyuan 3/4, MiniMax, and Nemotron. Unknown model ids
prompt with safe fallbacks; every catalog value stays user-overridable,
and pre-existing saved configs that omit the fields keep Pi's fallbacks.

Runtime semantics verified against Pi's getSupportedThinkingLevels:
null mappings are honored as unsupported, so unselected efforts are
pinned to null. Token input accepts 128000 as well as 128k/1m forms.
Fill contextWindow and maxTokens for every KNOWN_MODEL_SPECS row the
vendor docs leave silent, citing the public hosted catalogs per the
captain's verified readout (DeepInfra /v1/openai/models and Novita
model metadata, both read 2026-09-08): DeepSeek 1048576/1048576,
Kimi K3 1048576/1048576, K2.6/K2.7-Code 262144/262144, K2-0905 and
K2-0711 100352 output (Novita), GLM-5.2 1048576/131072, GLM-5.1
202752/202752 (captain-cited DeepInfra values), Qwen3.8-Max
1000000/131072 (Novita, consistent with the official flash family),
MiMo 131072 output, Hunyuan Hy3 262144 output, MiniMax M3/M2.7
131072 output, Nemotron Super/Ultra 262144 output.

Hosted deployments disagree in places (Novita vs DeepInfra on
DeepSeek/GLM-5.1/Qwen-Max output caps); the row comments name which
source backs each value and where a conflicting deployment differs.
Rows with no traceable source anywhere (Hunyuan Hy4, Nemotron Nano
Omni) keep the prompt fallback and say so.
The catalog lookup now resolves both model-id formats: the bare tag
("deepseek-v4-pro") and a company-qualified id
("deepseek/deepseek-v4-pro", "zai-org/glm-5.3-flash",
"moonshotai/kimi-k3"). Each row carries its catalog family key; a known
company segment scopes tag matching to that family's rows so a tag
shared across companies cannot mis-resolve, and an unknown segment
falls back to tag-only matching.

The DeepSeek rows now carry their officially documented reasoning
surface: reasoning_effort accepts only low / high / max (medium and
xhigh map to high server-side; low stays low, max stays max), and
thinking toggles through {"thinking": {"type": "enabled" |
"disabled"}} (enabled by default, default effort high) - expressed as
Pi's "deepseek" thinkingFormat with supportsReasoningEffort, citing
the DeepSeek docs in the rows.
@gh0stwin
gh0stwin force-pushed the fm/feynman-setup-catalog branch from 625ea80 to 4d1edaa Compare September 10, 2026 05:16
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