19 Nov 2026: a proposal, not what ships. What the running code shows today, in every Azure state, Mac and CLI, is azure-scenarios.html (generated from the code). Since this page was drawn: doctor calls only Azure's DeploymentNotFound a missing deployment, and says any other 404 in Azure's words ("HTTP 404: Resource not found") with no remedy line; the Mac pane still labels every 404 "Invalid key" (D4 open); the output-cap retry is in the Python client but reaches the Mac only with a rebuilt sidecar.
What we learned on a real Foundry resource, who holds what when they try to connect, the checks Bristlenose would run, and what the Mac Settings pane and the CLI would say in each state. Built to invent as little as possible: the pane keeps its fields, its status row and its message slot. Each failure has two layers that differ in kind: our interpretation (a sentence of about 20 words, in the researcher’s language) and, behind a Details button that opens the app’s existing popover, Azure’s own raw answer, verbatim, for whoever runs the resource.
docs/design-azure-connection.md.
What every surface says today, state by state: docs/design-azure-state-matrix.md (17 states against the Mac and the CLI, with the places they disagree).
What each open decision changes on screen: azure-decision-consequences.html (the Model row, a key leaving Azure, a key in the wrong field, a saved long URL, a failure deep in a run, the popover headline, the CLI record under -v, where the endpoint came from, the rename).
openai.azure.com and services.ai.azure.com hosts; GET /openai/v1/models checks the key and endpoint for free (200 / 401); a missing deployment is a clean 404 DeploymentNotFound; the reply names the real model; the classic route works on both hosts for a non-reasoning deployment.…/openai/v1/responses URL that today’s client turns into a broken request; a bad key is a 401 (code “401”).gpt-4.1-mini deployment failed; fixed in the Python client on 12 Nov (9dc0a4578), and in the Mac app once the sidecar is rebuilt; the 401 body is Azure’s “invalid subscription key or wrong API endpoint”. Not yet seen: a reasoning deployment’s refusals (waiting on quota); what a resource with key-based authentication off says; gateways.| A · Small team, has the portal | B · Organisation, is given values | C · Organisation, key access off | |
|---|---|---|---|
| Made the resource | The researcher or a colleague | IT or a cloud team, under policy | Same as B |
| Sees | Azure portal “Keys and Endpoint”; Foundry portal Models ▸ Deployments and each deployment’s Details (Endpoint and Key side by side) | Nothing. A ticket, an email or a secure message | Nothing |
| Holds | Endpoint, Key 1, a deployment name they chose (often arbitrary) | Usually an endpoint, a key and a name; sometimes two of three, or a “model name” that is really the deployment name | No key. Access is by sign-in (Microsoft Entra ID) and a role |
| Pastes | A clean host, or the long Endpoint from the deployment page | Whatever the message says, in whatever shape | Nothing that fits |
| Goes wrong | Quota wall before the app is involved; a damaged key; a wrong deployment name | The long URL; a missing or wrong deployment name; a region or data-zone rule they did not choose | A key-shaped hole |
| v1 | Works | Works | Recognise it and say so plainly; no sign-in |
| They paste | Example (resource name changed) | What we keep |
|---|---|---|
| A clean host | https://contoso.openai.azure.com/ | As is |
| The portal’s long Endpoint | https://contoso.services.ai.azure.com/openai/v1/responses | The host only |
| A full classic URL | …/openai/deployments/research-mini/chat/completions?api-version=2024-10-21 | The host; the deployment name and API version go into their fields |
| A project endpoint | https://contoso.services.ai.azure.com/api/projects/proj-default to test | The host only |
| No https:// | contoso.openai.azure.com | The shipped “must start with https://” sentence |
| Another domain | https://llm.example.org/ | As given (a gateway) |
doctor, configure azure; the Mac’s Settings check mirrors steps 0–2 natively (it runs before any sidecar exists) and is held to the Python by a shared contract fixture. Open (D13): the profile is meant to live in memory for the process, but the preflight result is cached for 24 hours and the serve-mode assistants never run the preflight, so “every run re-probes” is not yet true.https check, reduce to the host, lift a deployment name and API version if the URL carried them.
GET <host>/openai/v1/models with the key; redirects off; one attempt. Unbilled. Observed: 200 for a good key, 401 for a bad one, on both hosts.
Only if a deployment name is present. Send the run’s real request (strict structured output and the real output cap, 64000: never clamped for a deployment name, observed to be rejected, and now retried once at the ceiling Azure names) on the classic route, redirects off, one attempt; read the model from the reply. If the shape is refused: a 400 about max_tokens or temperature → retry once with max_completion_tokens and no temperature; a route or api-version refusal → retry once on /openai/v1.
Host, route, token parameter, whether temperature is sent, the model reported. The run’s client should read it so the check and the run cannot disagree; see D13 for where that holds today and where it does not.
Drawn at the real size: the window is 660pt wide (a 260pt provider list, a hairline, a 400pt detail pane), the cards are about 359pt, and the type is the shipped styles (table below). The red light comes first and is enough for many people; the sentence under it is our interpretation. For whoever runs the resource, a small Details button on the status line opens the app’s existing diagnostic popover (360pt wide, 320pt ceiling, scrolling inside, the header never scrolling) holding Azure’s raw answer: the request line, the HTTP status, the response body exactly as Azure sent it, and the identifying headers. The copy button lives in the popover’s header. The Settings pane gains nothing in height beyond the sentence, so a long record can never push the window (which never scrolls) off a small screen.
The popover is drawn overlapping the pane, as an NSPopover does, and may extend past the window’s right edge
(it is its own window; macOS keeps it on the screen, not inside Settings).
POST https://contoso.openai.azure.com/openai/deployments/research-mni/chat/completions?api-version=2024-10-21
HTTP 404
apim-request-id: 3d1fae88-0000-4000-8000-000000000000
x-ms-region: East US
date: Thu, 12 Nov 2026 14:32:07 GMT
{"error":{"code":"DeploymentNotFound","message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}
Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0GET https://contoso.openai.azure.com/openai/v1/models
HTTP 401
apim-request-id: 5e0b3f27-0000-4000-8000-000000000000
x-ms-region: East US
date: Thu, 12 Nov 2026 14:32:07 GMT
{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}
Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0GET https://contoso-test.openai.azure.com/openai/v1/models
No response: A server with the specified hostname could not be found. (NSURLErrorDomain error -1003)
Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0 · 12 Nov 2026 14:32 UTCPOST https://contoso.openai.azure.com/openai/deployments/research-legacy/chat/completions?api-version=2024-10-21
HTTP 400
apim-request-id: 9a41d7c0-0000-4000-8000-000000000000
x-ms-region: East US
date: Thu, 12 Nov 2026 14:32:07 GMT
[response body not yet observed: U11]
Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0GET https://contoso.openai.azure.com/openai/v1/models
HTTP 403
apim-request-id: 2c77b814-0000-4000-8000-000000000000
x-ms-region: East US
date: Thu, 12 Nov 2026 14:32:07 GMT
[response body not yet observed: U3]
Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0POST https://contoso.openai.azure.com/openai/deployments/research-interviews-structured-outputs-gpt-4-1-mini-eu-west-2026/chat/completions?api-version=2024-10-21
HTTP 404
apim-request-id: 3d1fae88-0000-4000-8000-000000000000
x-ms-region: East US
date: Thu, 12 Nov 2026 14:32:07 GMT
{"error":{"code":"DeploymentNotFound","message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
<p>The gateway could not reach the upstream service for this request. Ask whoever manages the network to check the route, the firewall and the private endpoint for this resource.</p>
Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0| What | Value | Where it comes from |
|---|---|---|
| Window content width | 660pt = 260 provider list + 1 hairline + 399 detail | LLMSettingsView.swift:83-87; the owner’s 13 Nov screenshot, 2× pixels ÷ 2 |
| Detail pane padding · card width · card inner padding | ≈20pt each side · ≈359pt · ≈10pt | Measured from that screenshot (grouped Form); not set in code |
| Row text: status label, “Use this provider”, field labels, provider name | Body, Regular 13pt / 16pt line | HIG macOS text styles table; no font modifier in code |
| The sentence, “Last verified”, the links row, the sidebar status line | Caption 1, Regular 10pt / 13pt line (.font(.caption)) | LLMSettingsView.swift:306, 855; HIG macOS text styles |
| Section headers (Status, API Key …) | ≈13pt bold | Read from the screenshot; unverified in code |
| Details button, popover copy button | Push button, .bordered, .controlSize(.small): 11pt label, ≈19pt tall | ProjectDiagnosticPopover.swift header; shipped “Show Details” is a plain button (RunCoverPane, BootView) |
| Popover size | 360pt wide, 16pt inset → 328pt of text; height follows content up to a 320pt ceiling, then scrolls; header does not scroll | ProjectDiagnosticPopover.swift:47-53, 76-80; docs/design-pipeline-popover-sizing.md |
| Popover headline | Headline, 13pt bold. Drawn as “Details”: the one wording still to choose (the sidebar popover’s headline names the state) | Owner call |
| Record text | Monospaced Caption 1, 10pt / 13pt (.system(.caption, design: .monospaced)), selectable | The pane’s own command chip, LLMSettingsView.swift:304 |
| Window height | ≈792pt for Azure connected (measured); the smallest default screen shows ≈800–820pt | Screenshot; design doc §13. CSS heights here run short, so read real ones from Diagnostics ▸ Azure Settings |
CAUSE_MESSAGE_MAX is 4096 bytes; “nothing is clamped, the text is the payload; it scrolls”), not a new one. Keyboard scrolling into a popover’s scroll view is the existing popover’s behaviour; Copy details gives the whole text either way.apim-request-id, x-ms-region).bristlenose configure azureToday it validates nothing and tells the researcher to hand-edit .env. Proposed: it
asks for the same three things the Mac pane has, in the house’s “Enter your … ” voice, runs the same
checks, and prints the house’s checkmark lines. A failure prints the sentence first, then Azure’s raw record as a dim block:
a terminal has no disclosure to collapse into, and what is on screen is what gets pasted into a
ticket. This is its own decision (D12), separate from the pane’s Details button. The
terminal text is English by design.
$ bristlenose configure azure Enter your Azure OpenAI API key: ········ Validating... ⚠ Could not validate: needs endpoint and deployment to validate Storing anyway... ✓ Stored in Keychain as "Bristlenose Azure API Key" Azure OpenAI also needs endpoint and deployment name. Add to .env or environment: BRISTLENOSE_AZURE_ENDPOINT=https://your-resource.openai.azure.com/ BRISTLENOSE_AZURE_DEPLOYMENT=your-deployment-name
$ bristlenose configure azure Enter your Azure endpoint: https://contoso.services.ai.azure.com/openai/v1/responses ℹ Using https://contoso.services.ai.azure.com Enter your Azure deployment name: research-mini Enter your Azure API key: ········ ✓ Key accepted by contoso.services.ai.azure.com ✓ Deployment “research-mini” answered (gpt-4.1-mini-2025-04-14) ✓ Stored in Keychain as "Bristlenose Azure API Key" ✓ Saved endpoint and deployment name to ~/.config/bristlenose/.env
$ bristlenose configure azure Enter your Azure endpoint: https://contoso.openai.azure.com Enter your Azure deployment name (Enter if you don’t know it): Enter your Azure API key: ········ ✓ Key accepted by contoso.openai.azure.com ℹ Deployment not checked. Find the name under Models ▸ Deployments in Microsoft Foundry. ✓ Stored in Keychain as "Bristlenose Azure API Key"
✓ Key accepted by contoso.openai.azure.com ✗ No deployment named “research-mni” on this resource. Key and endpoint are fine; check the name. POST https://contoso.openai.azure.com/openai/deployments/research-mni/chat/completions?api-version=2024-10-21 HTTP 404 apim-request-id: 3d1fae88-0000-4000-8000-000000000000 x-ms-region: East US date: Thu, 12 Nov 2026 14:32:07 GMT {"error":{"code":"DeploymentNotFound","message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}} Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0
✗ Azure didn’t accept this key (401). Check it and the endpoint in Keys and Endpoint. GET https://contoso.openai.azure.com/openai/v1/models HTTP 401 apim-request-id: 5e0b3f27-0000-4000-8000-000000000000 x-ms-region: East US date: Thu, 12 Nov 2026 14:32:07 GMT {"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}} Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0
✗ Key-based authentication is turned off for this resource, so Bristlenose can’t use it. GET https://contoso.openai.azure.com/openai/v1/models HTTP 403 apim-request-id: 2c77b814-0000-4000-8000-000000000000 x-ms-region: East US date: Thu, 12 Nov 2026 14:32:07 GMT [response body not yet observed: U3] Bristlenose: 12 Nov 2026 14:32 UTC · 0.46.0
doctor and the run’s preflight print the same lines, because they use the same module; the run log always records the raw record..env the key store already falls back to (decision D5).So a screenshot or a pasted line can be answered without a call.
| They read | They check (our understanding of Azure; to confirm against U3) |
|---|---|
401 or 403 | Keys and Endpoint: was Key 1 regenerated? Is key access turned off for the resource? Is a network rule blocking the caller? |
404 DeploymentNotFound | Foundry ▸ Models ▸ Deployments: does that exact name exist, and was it created in the last few minutes? |
400 naming a parameter or response_format | The deployment’s model family: a newer model refuses max_tokens and temperature; an older one can’t return structured outputs. |
429 | Quota: tokens-per-minute and requests-per-minute on that deployment; the Quota page for the region. |
| No answer, timed out, host not found | Inbound networking (firewall, private endpoint) and whether the host name is right. |
api-version, the deployment name as typed), the HTTP status, the response body verbatim, an allowlist of response headers (apim-request-id, x-request-id when present, x-ms-region), and our UTC time and version. It never carries request headers, the key, or any part of it, and it passes through the log redactor.| Say | Not | Seen in |
|---|---|---|
| Endpoint · Keys and Endpoint · Key 1 | “Target URI”, “API base”, a bare “URL” | Azure portal ▸ Resource Management; the deployment’s Details page |
| Deployment name · Models ▸ Deployments | “model name” for the deployment name | Foundry portal |
| Azure (our provider label) · Microsoft Foundry in help text | “Azure OpenAI” as our label (reads as OpenAI-only), “Azure Foundry” (not a Microsoft name), “Azure AI Studio”, “AI Services” | IT says Azure and the key lives on an Azure resource; Microsoft’s portal breadcrumb reads “Microsoft Foundry | Azure OpenAI” |
| Deployment type: Global Standard, Data Zone Standard, Standard | “tier”, “plan” | The Deploy dialog |
| Quota · Insufficient quota · Request quota | “limit”, “credit” | The Deploy dialog; Manage ▸ Quota |
| Microsoft Entra ID | “Azure AD”, “SSO” | Microsoft’s current name |
| # | Where | Sentence | Words |
|---|---|---|---|
| 1 | Key or endpoint not accepted (Azure only; 401 only) | {{provider}} didn’t accept this key ({{status}}). Check it and the endpoint in Keys and Endpoint. | 15 |
| 2 | No such deployment | No deployment named “{{name}}” on this resource. Key and endpoint are fine; check the name. | 15 |
| 3 | Model can’t do structured outputs held until U11 | This deployment’s model can’t do structured outputs, which Bristlenose needs. Use a chat model that can. | 16 |
| 4 | Key-based authentication off held until U3 | Key-based authentication is turned off for this resource, so Bristlenose can’t use it. | 13 |
| 5 | Help line under Azure Settings (only while the deployment name is empty) | Find the endpoint, key and deployment name under Models ▸ Deployments in Microsoft Foundry. | 14 |
| 6 | Host cannot be found | Couldn’t find that endpoint. Check the address. | 7 |
| L1 | The Azure status label on any failure | Not connected | 2 |
keyRejected sentence says “generate a new key in your provider dashboard”, which a researcher who is not allowed to make keys cannot do; string 1 replaces it for Azure only.| # | Decision | Recommendation |
|---|---|---|
| D1 | The free key-and-endpoint check first (GET /openai/v1/models)? | Yes: observed to split 401 from 404 at no cost. |
| D2 | A tolerant Endpoint field that reduces to the host and lifts the deployment name and API version, shown in the fields? | Yes, always visible and editable, never silent. |
| D3 | The new strings in Microsoft’s words: S1, S2, S5, S6 and the label L1 (S3 and S4 are held, D15)? | Approve wording, then 21 locales. |
| D4 | The Azure status label on any failure, the 401 and 403 included: “Not connected” instead of “Invalid key” (also for the shipped “not found” and “must start with https://” sentences), chosen from the failure’s key so ProviderStatus gains no case? One new string, 21 locales. | Yes: the frames in 5b and 5c show it. |
| D5 | configure azure asks for endpoint and deployment and saves them in the user config .env? | Yes. |
| D6 | Key-off organisations: recognise and say so; no sign-in in v1? | Yes. |
| D7 | Persist nothing and re-probe in every run’s preflight? | Not answerable as written: the preflight is cached 24 hours and serve-mode assistants skip it. Decide with D13. |
| D8 | Leave the Model row as it is; check first what it drives? | Yes. |
| D9 | Show the real model name on success? | Not in the pane for v1; in doctor and the CLI. |
| D10 | The provider label: “Azure” instead of “Azure OpenAI”? Decided 13 Nov (owner): yes. A Foundry deployment can be any model, IT and the key both say Azure, and “Azure OpenAI” reads as OpenAI-only. v1 is proven for OpenAI-model deployments; testing other Foundry models is a 100-days item. The code rename is built on a branch, unmerged, with the website docs and the man page still owed. | Yes. |
| D11 | Where the raw record lives on the Mac. Superseded (13 Nov, owner): not a disclosure inside the pane but a Details button on the status line that opens the app’s existing diagnostic popover, copy button in its header. Sidesteps the window-height budget (the Settings window never scrolls). | Yes. Frames in 5b and 5c. Open: the popover’s headline wording. |
| D12 | The CLI: print Azure’s raw record as a dim block after the failure sentence, by default? (Alternative: only with -v.) | By default: a terminal cannot collapse, and the output is what gets pasted into a ticket. |
| D13 | Where the connection result lives: the preflight cache and the serve-mode assistants. | Build the client from the finder in one place; make the cache key include route and parameters. |
| D14 | Security requirements: https only; no redirects; reject userinfo; validate the API-version field and refuse key-shaped input in the Endpoint, Deployment and API-version fields; confirm before a key goes to a non-Azure host. | Yes, as requirements. |
| D15 | The held strings: S3 (until U11) and S4 (until U3) do not ship until the real error bodies have been read. | Yes. |
Every path through the Azure pane and the CLI, in the order a researcher meets them, each tied to the frames above. Status says what exists: shipped works today, new proposed here, unverified waiting on a probe. “Gap” names what is still undecided or undrawn.
| # | Journey | What happens | Frames | Status | Gap |
|---|---|---|---|---|---|
| J1 | Connect: a small team with portal access (A) | Paste the portal’s long Endpoint: it is tidied to the host and shown in the field. Paste Key 1: a free key check runs. Type the deployment name: the deployment check runs, the light goes green. Switch on “Use this provider”. Today the long URL fails. | today, tidied, checking, online | new | D1, D2, D13 |
| J2 | Connect: an organisation hands you values (B) | A message holds an endpoint, a key and a name, sometimes a full classic URL: the empty fields fill from it. A typo in the name gives “No deployment named…”; Details opens Azure’s raw answer to forward to IT; corrected, the light goes green. | fill, 404, Details | new | S2 wording (D3), popover headline |
| J3 | Given a key and endpoint, no deployment name | A one-line help tells where the name is. The row stays grey “Not set up” and cannot be switched on: a key cannot list deployments, so nothing more can be said until the name arrives. | help line | new help line; today grey, silent | S5 wording (D3) |
| J4 | No key, or key access turned off (C) | No key: grey, nothing to say. Key present but key authentication off: the HTTP status and a Details record, and the website paragraph tells what to ask for. No sign-in in v1. | no key, key off | unverified S4 wording | U3 probe; D6, D15 |
| J5 | The key stops working later | Settings: red “Not connected” and “Azure didn’t accept this key (401)”. A run: “Run failed” in the sidebar, a popover saying the key was rejected, a toolbar pill only when the cause is structured. Today the pane says “Invalid key”. | 401, Details | new wording; run side shipped | D4; Details on a run has no Azure text (events keep none), see decision mockup F-run-failure |
| J6 | Azure is rate-limited or down | Orange “Unavailable”, still switch-on-able; the run says “rate limit reached” or “unavailable, try again shortly” with Retry. The doctor still shows green for 429 and 5xx (it cannot prove the key is bad) but now says “could not validate: HTTP 429” instead of staying silent (fixed 14 Nov). | 503, Details | shipped sentence; Details new | doctor and preflight wording still differ (matrix §3) |
| J7 | A mistyped resource name | “Couldn’t find that endpoint. Check the address.” Today it says “Check your connection”. | host, Details | new | S6 wording (D3) |
| J8 | A deployment with a lower output cap | The first analysis is refused once, retried at the ceiling Azure names, and carries on; nothing is shown. The Settings check stays green either way. The Mac gets this from a rebuilt sidecar. | none (invisible) | shipped (Python); Mac after rebuild | check on a real run: grep azure_output_cap in the project log |
| J9 | An upgrade with a saved long URL | The saved URL is tidied on first use; a deployment or version lifted from it fills a field only when that field is empty. Every Azure user gets one billed one-token recheck after the cache-key fix. | see decision mockup F-migrate | new | Q18; cache key branch not merged |
| J10 | The CLI | configure azure asks for the endpoint, deployment name and key, runs the same checks, saves what passed. A failure prints the sentence, then Azure’s record as a dim block. Today it asks for the key only and validates nothing. | six sessions in §6 | new | D5, D12 |
| J11 | A gateway or a host outside Azure domains | Confirm before the key is sent to it. Path-prefixed gateways are later. Undrawn on this page. | see decision mockup F-offdomain | new, undrawn here | Q16 (a new dialog: UX gate) |
| J12 | The surfaces agree with each other | Today the pane, the sidebar, the pill, the doctor, the preflight and the run still give different answers for some failures (403 has three diagnoses; a 404 says “Invalid key” and “the key is fine”). Offline, DNS, 429, 5xx and redirects were made consistent on 14 Nov. | matrix doc §3 | not done | the finder and one client builder (D13) |