Skip to content

chore: land the Provider default model work on main - #80

Merged
yujiezhang-ops merged 3 commits into
mainfrom
chore/land-provider-default-model
Aug 6, 2026
Merged

chore: land the Provider default model work on main#80
yujiezhang-ops merged 3 commits into
mainfrom
chore/land-provider-default-model

Conversation

@yujiezhang-ops

@yujiezhang-ops yujiezhang-ops commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Brings #79's implementation onto main. No new code — this is the same 20 files and 547 lines that were already reviewed and passed CI there.

Why this is needed

#79 was stacked on #77's branch. #77 merged to main on its own, and #79 merged into chore/default-model-deepseek-v4-pro. Both PRs show as MERGED, but the implementation commit dceb73f is reachable only from that intermediate branch — main received the model-version bump and nothing else.

Verified before opening this: git log origin/main..HEAD is exactly the three expected commits, and git diff --stat origin/main...HEAD is the same 20 files / +547 −76 as #79.

What lands

Per-Provider default_model and key_management_url in the manifest, threaded through catalog.Providerprovider.Entry → the regenerated bindings. The model field arrives pre-filled instead of empty; the key button opens the Provider's key page instead of its marketing site. Full rationale in #79 and #76.

Verification on the merged tree

main moved since #79 (Hermes in #78, plus the bottom-bar button change), so I re-ran everything against the merge result rather than trusting the earlier run. The merge was conflict-free.

go vet ./..., go test ./..., go test -race ./... all clean. pnpm run typecheck passes and pnpm run test is 216 passing. python3 scripts/check-docs.py reports 50 files, links resolve, language split holds.

Also ran the app in server mode against the real Go backend and read the provider metadata React was rendering:

ppio    default_model = deepseek/deepseek-v4-pro
        key_management_url = https://ppio.com/settings/key-management
novita  default_model = deepseek/deepseek-v4-pro
        key_management_url = https://novita.ai/settings/key-management

Both fields arrive with the right values, and the probe model (deepseek-v4-flash) does not appear in the projection — which is the check that only works because the two fields hold different values. The Provider step renders the relabelled 获取 API Key button, and creating a Profile pre-fills the model field, still editable. No app-originated console errors or failed requests.

🤖 Generated with Claude Code

A first-time user on PPIO or Novita had to supply a model ID before
anything worked, with no basis for choosing one. The value they needed
already existed as fallback_probe_model, but the frontend could not read
it: PublicProviders zeroes that field, and a test asserted the public
projection contained no "deepseek" at all.

Adds two manifest fields rather than exposing the probe model, because
they answer different questions. default_model is a recommendation a user
sees and can edit; the probe model is the cheapest way to prove a key
works. Conflating them would have meant either probing with the expensive
model or recommending the cheap one. They now hold different values,
which also makes a probe-model leak detectable -- with identical values,
no substring test could see one.

default_model is required per built-in Provider and deliberately has no
global fallback: a custom endpoint gets no guessed model, since a guess
produces a config that fails on first use. key_management_url is optional
and falls back to home, so user-added Providers keep working.

Seeding lives in the wizard reducer, next to the Provider selection it
follows, rather than in each page. Every path that changes the Provider
re-seeds, since model IDs are not portable between Providers. Two
precedence traps came out of this: MODELS_RESULT used `state.model ||`,
which would now let the seeded default outrank a hand-typed probe model,
and STATUS_LOADED had to stay first-load-only so a refresh cannot
overwrite a half-typed field.

Store.Public rebuilt its overlay from scratch, so saving a key against a
built-in Provider would have silently dropped its default model.

Relabels the button: it opens a key page that needs an existing account,
so "Register and get a key" promised a sign-up flow it no longer starts.

Documents in public-site-operations.md that referral_url, relationship,
disclosure, order and protocols are site-only and discarded by
json.Unmarshal, with a test pinning it -- the guarantee rests on
providerFileEntry omitting them, which is invisible at the call site.

Leaves ProvidersPage's plain anchor alone: home is validated against
javascript:, data:, file: and embedded credentials when saved, so it can
only ever hold an http(s) URL.
…d-key-management

feat: pre-fill a Provider's default model and open its key page
PR #79 was stacked on #77's branch and merged there, while #77 merged to
main on its own. That left the implementation commit reachable only from
chore/default-model-deepseek-v4-pro.
@yujiezhang-ops
yujiezhang-ops merged commit bc33643 into main Aug 6, 2026
4 checks passed
@yujiezhang-ops yujiezhang-ops changed the title Chore/land provider default model chore: land the Provider default model work on main Aug 6, 2026
@yujiezhang-ops
yujiezhang-ops deleted the chore/land-provider-default-model branch August 7, 2026 09:52
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