Repository navigation
Studio settings (c): a missing API Key says where to set it, and the film's now line says it waits on it - #235
Merged
Merged
Conversation
…ce's first download Measured on a clean Mac: 71 of the install's 90 s and 305 MB were the reference repos, which a first film does not use; the install ended with a 60-line doctor report that said ready even when uv or a render browser was missing (Linux); the local voice's first use downloaded about 2.5 GB without a word. - install.sh fetches the reference repos only with --refs; references/fetch.sh <dir> says what it fetches and how big first (a size table in the script, checked by CI), and an unknown name exits 2. - bin/vh doctor --first: ready for a first film or not, what is missing and how to get it, how a voice comes here; the installer ends with it, the skills step says one line, the example sentence is the README's silent one. - bin/vh tts: before the local voice's first download, one line with the size, the time it may take and the way around it (--provider edge); uv's download lines shown, the model's progress every 10 s. The default provider is set in tts.py alone (DEFAULT_PROVIDER). - README, homepage: the sizes measured.
…ail stopped the script there)
…vh too (it went on to uv run)
… checks run the behaviour - install.sh asks for python3 up front; bin/vh doctor --first with no python3 is not ready (exit 1). - doctor --first: a Chinese locale with no Chinese font is not ready; on Linux the render browser's missing system libraries are not ready, and libraries it cannot ask about are 'not checked' (exit 3, the installer then does not say ready); an outdated agent is told to update; Python 3 in the ready line; uv says what it is for. - tools/audio/firstuse.py: the local voice's and the local Whisper's first downloads in one table (sizes measured: 0.8 + 1.8 GB, 2.0 + 1.6 GB), the line before them, the model's progress written to the real stdout so a redirect_stdout around the loader cannot swallow it. bin/vh's first_use helper is used by tts, voices audition and pace; tts checks its script first. doctor and tts read the sizes from there; edge 'needs only a small package'. - references: one repo by name that does not come exits 1; a full fetch with no network is one line; 'under 1 MB'; doctor's references line is fine by default; setup says its size; four docs say the one-name fetch. - The example sentence follows the locale; the skill says to read the installer's last lines. - README sizes: no double count. CI: fetch.sh through a stand-in git, doctor --first's states, the bare doctor, the first-download lines through a stand-in uv, the progress inside a redirect.
…ts now writes the sample and fetches nothing)
…al npm registry does not answer, and every later download follows - tools/mirrors.txt: each kind of download, its variable, the official source, the mainland-China mirror, who runs it. - This machine's settings in $XDG_CONFIG_HOME/ovh/settings.json (tools/settings.py, bin/vh settings): mirror cn|off|auto. - bin/vh exports the mirror variables for everything it runs when the mirror is cn (a variable already set wins); HyperFrames' Chrome is fetched from the mirror by bin/vh new, install.sh and settings chrome, as HyperFrames has no setting for it. - install.sh tries registry.npmjs.org for 5 s; only when it does not answer and the mirror does, it keeps cn and says so; --mirror cn|off forces it either way. doctor says which sources are in use. - README: the China network line; homepage and overview: 74 commands.
… reads it); ci: bin/vh exec's into settings.py, known
…rge, keep the other keys, replace whole); save() goes through it Studio's settings panel and a terminal writing at once both land: the CI check runs two writers of 60 updates each (all 120 land; without the lock, 64 did).
…rror writes, without the saying (Studio calls it in-process)
…chine's defaults in one place A page at #/settings (the rail's foot, Cmd/Ctrl+, and the shell's Settings… menu item): General (language, look, where films are kept), Agent (the default agent, each one's model and effort once it has offered them), Film defaults (the download mirror, editable; LOCAL.md's lines shown only), This computer (what it lacks), About. Studio's own three settings (studio_lang, studio_theme, agent_default) are kept in this machine's settings file through tools/settings.py, so another port, a second window and the terminal see the same; the top bar's buttons stay and change the same settings. GET/POST /api/settings need the run's token and take only these names and values.
…lier bin/vh exported), a source of the person's own stays, every Chrome fetch through the mirror, the probe tries the right hosts twice settings.py: env_changes() is the one reader (bin/vh asks it when the file names a mirror or one was inherited), an inherited OVH_MIRROR with the setting not cn takes out exactly the values bin/vh exported; npm's registry in an .npmrc and uv's index or Python mirror in a uv.toml or pyproject.toml are left alone and said; a broken file kept as settings.json.bad, a newer version never written over, a relative XDG_CONFIG_HOME ignored, an unwritable folder one line. install.sh: npmjs through npm ping, Hugging Face and Google's storage through curl, all at once, twice each; the reason says what happened; the Chrome step cannot stop the install; -h prints the whole header. bin/vh: render, frames, textcheck and hf fetch HyperFrames' Chrome through the mirror with cn, with the @puppeteer/browsers HyperFrames' node_modules holds; settings chrome [project]; the hints name it. mirrors.txt says what is checked and what is trusted to the mirror, and what is not covered; README and the change note too.
…every start, so a file it names reaches every CI group
…takes the default agent, folders can be opened - The console writes Studio's look and language into the page it serves (no flip after the first paint); the language and look buttons are drawn from the settings file and every click saves; radio groups are one tab stop with arrow keys. - "New chat" and a new film on the space start with the default agent; the default must be an agent that is set up. - Where films are kept: only folders that exist, ~ for the home folder, each with a button that opens it (one of those folders only, $OVH_REVEAL stands in for the file browser). - LOCAL.md: only list items count, and a value's bracketed hint is left out; a model or effort that could not be written is an error, not "saved". - The rail marks the space only on the space; on the settings page the column says it is the space's chat; without this run's token the page says to open it in Studio's window, with the button that does. - Mirror: the page says that downloads Studio itself started in this run follow once it is reopened. - tools/ci-paths.txt keeps its four narrow lines: tools/settings.py says "the installer", the version comes from git, "What's new" links the release page; LOCAL.example.md also runs settings_page_checks. - Tests: the file wins over the browser's copy, the top bar's buttons save, the default agent for a new chat, the folder button, an agent not set up refused, LOCAL.md's list items.
…rd store, found by every command - tools/keys.py: a service's key from the environment first, else the one saved in Studio, kept in the Keychain (macOS) or the Secret Service (Linux, through secret-tool); written through standard input, never an argument, never in a file; only the names tools/modules.json's services need. tts, pace, image, lyria, doctor and bin/vh read keys through it; a command the agent column runs finds a saved key (the agent's own environment still has none). - The settings page's Services section: each service, what it is for, free or paid in a word, each key not set / set in Studio / set in the environment, Set up / Replace / Remove (asked twice) / Test (doctor's free probe), where to get a key; one sentence on where a saved key is kept; an API Key is not a budget. - bin/vh doctor says "set in Studio" or "set in the environment" (--json: key_source). tools/modules.json: cost and key_url on the four services. tools/ci.sh turns the store off (OVH_KEYSTORE=none): no check finds a key the person saved, so nothing paid is called. - Tests on a keychain of their own (made with HOME in the scratch folder, named on every call, deleted after; the person's search list checked unchanged) or a stand-in secret-tool elsewhere.
…ect in Studio at once - Merged first-film's reviewed tools/settings.py (Newer, env_changes, kept_own); Studio's three keys kept beside it. - Switching the mirror in the page applies settings.env_changes() to Studio's own environment, so the install it runs and the agents it starts next follow it; checked: Studio started under cn, switched to the official sources, a child of the console carries none of the mirror's variables (it did before: all six). - The page lists the sources of the person's own that stay theirs under cn (kept_own), says one plain line when the settings file was written by a newer version (Newer), and says "以后的下载只从官方源" again, with the one case that waits: a chat already open keeps its agent's own npm and uv until the next chat.
…mirror switch at once, and the services' checks beside it
…e store lookup per name, a readers check that finds indirect reads - the page and the change note: pictures and Lyria music stop without a budget; voices, word timing and auditions with these services are called directly and bill that account - tools/keys.py remembers each name's lookup per process (a missing key and a store that does not answer within 3 s too); a save or a removal refreshes that name; keys up to 2048 characters - the readers check searches bin/, tools/, engines/, components/, styles/ for a key read by name and, in files that touch keys, any read of the environment by a name the line does not spell; it is first tried on the old ways of reading - refusals carry a reason the page says in its own words; a failed save keeps the box open with the next step; no password box or form; a computer with no store gets plain words and a README section on how - doctor --probe asks with each key that is set (both of MiniMax's) - OVH_KEYSTORE=none passed on by the three doctor checks that build their own environment, and kept by acp.clean_env; the checks stage their store before any check
…here to set it and where to get one; Studio's now line says the film waits on it - tools/keys.py: one sentence for a missing key (the service, Studio's Settings → Services or the environment, where to get one, what works with none), put on the run's record as the new code no_key - tts (each provider, --align gemini, voices audition), pace --align gemini, music --provider lyria, image gen say it - tools/standing.py: needs_key while the newest run of a command stopped for a key that is still not set, with the way to Settings → Services (act kind settings); Studio's column renders that button - schemas, jsonerr's code list, the desk README
…hat the key was for and what this computer has, and it clears on a later run - lyria.py writes its run's end (bin/vh exec's into it): a stop for a key shows as one, and no Lyria run reads as cut off - the no_key record says what the key was for (voice, timing, music, image) and its names; the line under Studio's sentence follows it, not the command - what works with no key is per platform (Apple Silicon: the local voice and timing; an Intel Mac: macOS's say; Linux: none, said plainly), and Codex for pictures when it is there, in the command's words and in Studio's - a stop clears once a later run did the same kind of work fine, or a later run failed; read from the whole log (activity.key_stop), not the last five runs - the desk README: a key set only in a terminal's environment is not seen by a Studio opened elsewhere
ZLHad
marked this pull request as ready for review
November 22, 2026 07:57
ZLHad
enabled auto-merge (squash)
November 22, 2026 07:57
ZLHad
added a commit
that referenced
this pull request
Nov 22, 2026
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.
Stacked on #234 (
claude/settings-keys, 55aced6), which follows #233. Land those first.This is PR c of Studio's settings page: first-run guidance when a service's API Key is missing.
What changes
One sentence for a missing key, the same everywhere (
tools/keys.py'smissing(),local_way()andstopping()). It names:key_urlfrom Studio 的设置页里能填 API Key:存在这台电脑的钥匙串里,终端和 Studio 里的对话都用得上 #234);For example:
It goes on the run's record with a new error code,
no_key(intools/jsonerr.py's list anderror.schema.json). The record also says what the key was for (need:voice,timing,musicorimage) and lists its names (keys). Exit statuses are unchanged.What works with no key depends on this computer:
--align local(pace:--align whisper)say--provider edgeneeds no key but is an online serviceCodex means
image gen --provider codexon the ChatGPT plan. It's offered only when thecodexprogram is on the PATH, the waybin/vh doctorfinds it.Every command that stops for a key says it:
bin/vh tts, each online provider (need: voice), and--align gemini/--join transcribe(need: timing);voices audition(voice or timing). Its run goes in the film's log when its--textor--outis a file in the film, as with every command's project. Run from inside the film with a text file elsewhere, it is in no film's log, so no film shows it as waiting.pace --align gemini(timing);music --provider lyria(music).lyria.pynow writes its run's end line (bin/vhexecs into it), so this stop shows as a failure, and no Lyria run reads as cut off any more.image gen(image).The check comes before any call, so nothing is spent and nothing is voiced.
bin/vh statusand Studio's now line say the film waits on the key. The new code isneeds_key, withyou: decideand the amber tone. For example:In English: "The voice-over stopped: there's no Gemini API Key yet. Set it up in Settings → Services, then ask the agent to carry on. Or ask the agent to use this computer's own voice, with no service."
The second sentence follows what the key was for and what this computer has. A
tts --align geministop on the local voice says the timing line. Where there's no way without a key, it says so: "这台电脑上没有不用 API Key 的办法。"The space's card says "等 API Key" / "waiting for an API Key".
The action is a new kind,
{kind: "settings", sub: "services", label}. In Studio's column it is a button that opens Settings → Services; the terminal prints the words.When it stops being said:
A run stopped on purpose, a different kind of work that went fine, and the console's own run don't clear it.
It's worked out from the whole log, not the last five runs.
bin/vh statuspasses the result asactivity.key_stop, and the now line then checks whether the key is still missing.factsgainskeys,serviceandneed. The status and projects schemas gainneeds_key, thesettingskind and those facts. The activity schema's error gainsneedandkeys.modmay be null for thesettingskind.Not changed:
waiting_onkeeps whatbin/vh statuscomputes from the stations (usually "agent"); only the now record says the person decides. Stop messages written by an olderbin/vh(codefailed) aren't read asneeds_key. A key set only in a terminal's environment, with Studio opened elsewhere, is not seen by Studio, so it still says the film waits until that command runs again from the terminal. The desk README says so.Shared files touched (against
claude/settings-keys, 55aced6)tools/desk/static/studio.jssettingsact kind renders a link to#/settings/<sub>core.js,agent.js,server.py,tools/settings.pyOthers:
tools/standing.pytools/keys.pytools/audio/tts.pytools/jsonerr.pyreport()passes extra fields to the notetools/activity.pyno_keyerror'sneedandkeystools/status.pyactivity.key_stoplyria.py,pace.py,image.pytools/desk/README.mdHow it was checked
tools/desk/test_agents.py's status sentence check (agent_checks), on made-up records with no store, no key in the environment and a made-up platform:tts --align geministop;failedmessage isn't read as a key stop; a key that is set clears it;key_stopfrom the whole log wins over five unrelated runs in the window, and null means no wait;tools/desk/test_settings.py(settings_page_checks), on the store of its own:bin/vh tts <film> geminiwith no key: exit 1, the sentence, nothing voiced,no_keywithneed: voiceon the run's record.bin/vh status --jsonthen givesneeds_keywith the settings action, the key's name andneed: voice, and the text view prints thenow:line.bin/vh music <film> --provider lyria --prompt …with no key: exit 2, the sentence, and its run ends as failed (not gone).bin/vh statusthen givesneeds_keyfor music.No service is called.
By hand:
voices audition --provider geminiwith no key and--textin the film shows the film as waiting ("The voice trial stopped…"). With the text elsewhere, run from inside the film, it isn't recorded, as said above.pyflakes (through
uvx) is clean on every Python file this PR touches.tools/ci.sh --committedon 7d18d88: all checks passed (20 min 55 s; 8.4 GB free at the end; the usual skips: frames on a HyperFrames composition, plus shellcheck and pyflakes, whichci.shdoesn't find installed here). The person's keychain search list was the same before and after. The first version (b89fd5d) also passed a full run, in 20 min 33 s.Looked at in an isolated Studio, before this round (its own HOME, config and keychain; port 8875; the film's voice-over had stopped for a Gemini key):
Screenshots are in the architect's notes folder (
settings-first-run-shots/). This round changes only the words under the sentence, not the page, so I didn't take new pictures.Not looked at:
image genwith Codex installed (the check fakes it).