fix(desktop): the Versa Azure setup card no longer writes or offers a deployment - #234
Open
Broccolito wants to merge 6 commits into
Open
fix(desktop): the Versa Azure setup card no longer writes or offers a deployment#234Broccolito wants to merge 6 commits into
Broccolito wants to merge 6 commits into
Conversation
… deployment With per-model Versa deployments (#230), `versa_azure` posts each model to its own deployment, and a configured VERSA_AZURE_DEPLOYMENT_NAME is an override only when the catalog does not know it -- in which case it serves EVERY request, whatever model the chat selected. The onboarding card wrote the shipped default (gpt-5.5-2026-04-24) on every connect, which that rule ignores, and its Advanced panel offered a free-text deployment box, where any name the catalog does not know pinned every model to one deployment while the chat kept showing the model it picked: the F1 label-only behaviour, reachable from a first-run form. Stop writing the key and drop the box. Writing only a non-catalog value was the alternative, but it needs a second copy of the catalog in the renderer and keeps an operator-only escape hatch in a first-run form. The API key, endpoint and API version writes are unchanged, and the tests now pin them. A value an earlier connect persisted is left alone: a catalog value is inert, and anything else is an override the daemon honours and logs. An operator who needs a deployment the catalog does not list yet still sets the key in config.
…efaults PROVIDER_KEY_DEFAULTS.versa_azure listed AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT_NAME (gpt-5.5-2026-04-24) and AZURE_OPENAI_API_VERSION. Both readers in DefaultProviderSetupForm look a default up per DECLARED config key, and providerConfigSubmitHandler only submits declared keys too; `versa_azure` declares VERSA_AZURE_API_KEY alone (on main as well as with per-model Versa deployments, #230). So the three entries were never read -- but they named the public `azure_openai` provider's keys and a deployment the model now chooses, and read as if Versa still wrote them. Remove the entry and say, beside the table, that an entry only reaches a declared key.
This was referenced Sep 11, 2026
…e-onboarding-no-deployment-write Brings in the two sibling fixes that landed on the shared base: Versa no longer reads the public Azure OpenAI card's keys (#238), and Versa Bedrock and the public Amazon Bedrock card no longer share config keys (#248). Both conflicts were unions: - DefaultProviderSetupForm.tsx: each side deleted a different dead PROVIDER_KEY_DEFAULTS entry (this branch versa_azure, the base versa_bedrock). Both stay deleted, and the comment beside the table now names both providers: each declares only its credentials. - InstitutionalSetupCard.test.tsx: each side added a helper next to the Azure connect helper (this branch writtenKeys, the base connectVersaBedrock). Both kept; the file now carries the five Azure tests from this branch and the two Bedrock tests from the base.
Broccolito
changed the base branch from
fix/versa-azure-per-model-deployment
to
main
September 11, 2026 21:22
…rding-no-deployment-write
…rding-no-deployment-write
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.
Follows per-model Versa deployments (#230), which is now on
maintogether with #238 and #248. This PR was stacked on #230 and has been retargeted tomain. Againstmain, its diff is only the card, the card's test and the setup form.This fixes the first follow-up #230 lists under known gaps: the onboarding card still writes a Versa deployment, and the setup form still carries dead Azure defaults for
versa_azure.What was wrong
With #230,
versa_azureposts each model to its own deployment. A configuredVERSA_AZURE_DEPLOYMENT_NAMEcounts as an override only when the catalog doesn't know the value. In that case it serves every request, whatever model the chat selected (explicit_override). Since the public Azure card's keys stopped steering Versa (#238), it is the only deployment key Versa reads.InstitutionalSetupCard, the UCSF Versa form in onboarding, had two problems:VERSA_AZURE_DEPLOYMENT_NAME = gpt-5.5-2026-04-24on every connect. That's a catalog deployment, so after fix(versa_azure): each model posts to its own deployment; an unmapped model is refused before it is sent (F1) #230 the daemon ignores it. The write only left a misleading key in the config.Decision: stop writing the key and remove the box
The alternative was to keep the box and write its value only when it isn't a catalog deployment. I rejected it:
VERSA_AZURE_DEPLOYMENTS, which fix(versa_azure): each model posts to its own deployment; an unmapped model is refused before it is sent (F1) #230 calls "the ONE list", or derive them fromknown_models. That only works while every model name equals its deployment name. It does in today's map, but nothing guarantees it: the catalog is a list of (model, deployment) pairs precisely so the two can differ. Either way the renderer would redo a judgement the daemon already makes, and the copy would drift.config.yaml. The daemon honours it and logs atinfothat an override is in force. The provider's own description already says "endpoint and deployment are pre-configured". fix(versa_azure): each model posts to its own deployment; an unmapped model is refused before it is sent (F1) #230 removedwith_unlisted_models()for the same reason: a first-run form shouldn't offer a choice that can only fail or only change the label.What changes
InstitutionalSetupCard.tsxdrops the deployment state, theVERSA_AZURE_DEPLOYMENT_NAMEupsert and the deployment field. The Advanced label now reads "endpoint, API version". A ⚠ comment atVERSA_AZURE_DEFAULTSexplains why, so the box doesn't come back by accident.DefaultProviderSetupForm.tsxlosesPROVIDER_KEY_DEFAULTS.versa_azure. The entries were never read:loadConfigValuesandgetPlaceholder, look up a default per declared config key.providerConfigSubmitHandlersubmits declared keys only.versa_azuredeclares onlyVERSA_AZURE_API_KEY, onmainas well as on fix(versa_azure): each model posts to its own deployment; an unmapped model is refused before it is sent (F1) #230, so the threeAZURE_OPENAI_*entries could never apply.A comment beside the table now states that rule. The Bedrock namespace split (fix(versa_bedrock): Versa Bedrock and the public Amazon Bedrock card stop steering each other #248) deleted the neighbouring
versa_bedrockentry for the same reason, so the comment names both providers.InstitutionalSetupCard.test.tsx: see Tests below.What stays the same
AZURE_OPENAI_*keys is written.gpt-5.5, which it used to do on every connect.Why this had to wait for #230
Before #230,
from_envfell back togpt-5.5-2026-04-24when the key was unset, so dropping the write alone would have changed nothing. Removing the box would have: on those builds, the box was the only way to make a model other than gpt-5.5 actually answer. #230 is merged, so that ordering now holds.Tests
The Azure tests in
InstitutionalSetupCard.test.tsxgo from 2 to 5. The file's two Bedrock tests came from #248 and are unchanged.AZURE_OPENAI_*keys. The helper now waits foronSuccess, so the test also sees the writes that happen aftercheckProvider.VERSA_AZURE_DEPLOYMENT_NAME.BIOROUTER_PROVIDER. This replaces the test that asserted the deployment write.Fail-before check. Run against the unmodified card, the 3 new and updated assertions fail for the intended reasons: the
gpt-5.5write, and two "deployment" matches (the label and the field). The two regression guards pass. After the fix, all 5 pass.npm run test:run -- InstitutionalSetupCardnpm run test:run(full suite)npm run lint:checknpm run format:checkmain:contexts.test.ts,toasts.autoClose.test.ts,catalogSubscription.test.ts,workdirOutsideHome.test.ts. All 3 files this PR touches pass.Updates since the first push.
main. Mergingmainwas clean, becausemainhad not touched these three files since the stack's merge-base.Re-run after each merge: the onboarding and provider-settings vitests (9 files, 104 passed, including all 7 card tests),
npm run lint:check, and Prettier on the 3 changed files all pass.I didn't check this in the running app. The change removes one field from a vertical stack and one word from a label, and the DOM assertions above cover both.
🤖 Generated with Claude Code