feat(website): [refact] migrate chatui to published agent application endpoint#91
Open
ferantivero wants to merge 5 commits intoAzure-Samples:mainfrom
Open
Conversation
Add OpenAI SDK (v2.9.1) as a direct dependency. This is the GA, first-party .NET library co-maintained by OpenAI and Microsoft that natively supports the Responses API protocol used by published Agent Application endpoints. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c1fbb50 to
7c38ede
Compare
- Replace Azure.AI.Projects with Azure.AI.OpenAI + OpenAI (Responses API) - Build Foundry endpoint URL with /protocols/openai and api-version - Set auth audience to https://ai.azure.com for published agent - Move model deployment name to AgentModelDeploymentName app setting - Rename controller action from Completions to Responses Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fd38b63 to
d734cda
Compare
Move Azure AI User role assignment from Foundry account scope (web-app.bicep) to both Foundry project and Agent Application scope (ai-foundry-appdeploy.bicep). - Assign Azure AI User at project scope for workspaces/agents/action permission - Assign Azure AI User at application scope for least-privilege agent access - Remove foundry account/project references from web-app.bicep - Use hard stop/start in README to acquire fresh auth tokens - Document RBAC mechanics for onboarding and offboarding agent access Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Include wwwroot/favicon.ico (and .br/.gz compressed variants) in zip - Fixes App Gateway health probe 404 on /favicon.ico Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Recommend verifying zip integrity before uploading to blob storage - Show commands for both local (sha256sum) and jump box (Get-FileHash) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d734cda to
32b604e
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.
This moves the chat web app from the project-scoped Foundry platform SDK
to the OpenAI .NET SDK, now targeting the published Agent Application
endpoint, the stable production surface for deployed agents.
Why
After starting to publish and deploy agent applications (#87), the
recommended path is to consume the new published endpoint directly.
The OpenAI SDK (with Azure.AI.OpenAI handling auth) turned out to be
the thinnest GA client that speaks this protocol.
What changed
Backend
AIProjectClientforAzureOpenAIClient→ResponsesClientChatControllerto take the full message history (stateless now)Conversations()action, no server-side conversations anymoreAIProjectEndpoint+AIAgentIdinto a singleAgentBaseUrlsettingFrontend
createThread(), the client now keeps the message history locallysendPrompt()→sendMessages()to better reflect what it doesInfrastructure
workspaces/agents/action; the application-scope assignment gates access to the specific published agent. This two-level model enables fine-grained onboarding and offboarding of agent access — documented in the README.web-app.bicepto use a singleAgentBaseUrlapp settingAGENT_BASE_URLaz webapp restartto a hardstop/startcycle so the managed identity acquires a fresh authentication token after RBAC or configuration changesPackaging
wwwroot/static filesDocumentation
Dependencies
Azure.AI.OpenAI2.1.0,OpenAI2.9.1Azure.AI.Projects1.2.0-beta.5Test
web app updated and working

app gw test