Pre-fill custom-provider model specs from an open-weight catalog in setup - #279
Open
gh0stwin wants to merge 8 commits into
Open
Pre-fill custom-provider model specs from an open-weight catalog in setup#279gh0stwin wants to merge 8 commits into
gh0stwin wants to merge 8 commits into
Conversation
|
@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
force-pushed
the
fm/feynman-setup-catalog
branch
from
September 10, 2026 05:16
625ea80 to
4d1edaa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
feynman setup(andfeynman model loginfor API-key providers, which sharesthe 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
src/model/spec-catalog.ts: typed static catalog (no network calls atsetup; 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 logincustom-provider setup prompts per model: recognizedids pre-fill official context/max-output/effort values as editable
defaults (enter accepts); unknown ids prompt with safe fallbacks. Every
value stays user-overridable.
thinkingLevelMapinmodels.json: unselected levels pin tonull,which Pi's
getSupportedThinkingLevelshonors as unsupported — so thesetup answer actually binds at runtime. Documented provider-specific
disable values (e.g. Hunyuan
no_thinkviachat_template_kwargs) arepreserved.
128k/1msuffixed forms;anything unparsable warns and falls back to the pre-filled default.
runs) that omit the new fields keep Pi's fallbacks untouched.
tests/spec-catalog.test.tscover catalog lookup, aliases anddated 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
without official documentation stays undefined so setup prompts for it
instead of guessing.