Repository navigation
feat(secrets): allow editing the model of an Azure AI Foundry key - #1722
Open
vishrutha s gowda (vishruthasgowda) wants to merge 1 commit into
Open
vishrutha s gowda (vishruthasgowda) wants to merge 1 commit into
vishrutha s gowda (vishruthasgowda) wants to merge 1 commit into
Conversation
vishrutha s gowda (vishruthasgowda)
requested review from
Cedric Vidal (cedricvidal) and
Wassim Chegham (manekinekko)
as code owners
November 29, 2026 02:56
This branch has not been deployed
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
Closes #1386
Users can currently not change the model name of an existing Azure AI Foundry
secret. They have to delete it and create a new one.
This PR lets users swap the deployment/model name on an existing Foundry key
without re-entering the endpoint or API key.
PUT /api/v1/keys/:idaccepts an optionalmodel. Forazure-ai-foundrykeys it reads the stored secret, updates (or clears, whenempty/null) the
modelfield and writes the secret back, keepingendpointand
apiKeyunchanged. Non-Foundry keys get a 400, unknown keys a 404, and amalformed stored credential a 409.
model?: string | nulltoUpdateKeyRequest."Deployment / Model name" field for Foundry keys. Leaving it blank keeps the
current model, because the stored model is never sent to the browser.
Demos
N/A for now. I have not recorded a demo of the portal change; I can add a
before/after recording if reviewers want one.
Before
N/A
After
N/A
Testing
apps/token-manager/src/routes-foundry-model.test.ts(4 tests):swapping the model, clearing it, rejecting non-Foundry keys, and
404 / metadata-only updates leaving the secret untouched.
pnpm exec vitest run apps/token-manager/src→ 7 files, 71 tests passed.Documentation and compatibility
None. The change is backward compatible:
modelis optional, and existingrequests that omit it behave exactly as before.
Checklist
up()/down()and keep it CosmosDB-compatible. (N/A)NOTICE. (N/A, no dependency changes)