-
Notifications
You must be signed in to change notification settings - Fork 421
docs: Document Azure Foundry OpenAI v1 BYOK support #38641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,7 +185,7 @@ Set `COPILOT_PROVIDER_BASE_URL` in `engine.env` to activate BYOK mode. The crede | |
|
|
||
| | Variable | Required | Description | | ||
| |---|---|---| | ||
| | `COPILOT_PROVIDER_BASE_URL` | ✅ for BYOK | Base URL of the external provider (e.g. `https://api.openai.com/v1`) | | ||
| | `COPILOT_PROVIDER_BASE_URL` | ✅ for BYOK | Base URL of the external provider (e.g. `https://api.openai.com/v1` or `https://RESOURCE.openai.azure.com/openai/v1` for Azure Foundry OpenAI) | | ||
| | `COPILOT_MODEL` | ✅ for BYOK | Model to use (e.g. `claude-sonnet-4`, `gpt-4o`); required by most providers | | ||
| | `COPILOT_PROVIDER_API_KEY` | Optional | API key for cloud providers (OpenAI, Anthropic, etc.); not needed for local providers | | ||
| | `COPILOT_PROVIDER_BEARER_TOKEN` | Optional | Bearer token alternative to `COPILOT_PROVIDER_API_KEY`; takes precedence when set | | ||
|
|
@@ -216,6 +216,50 @@ network: | |
| > [!NOTE] | ||
| > Credentials are kept out of the agent container — only a dummy API key activating the AWF BYOK detection path is visible to the agent process; the real credential is isolated in the AWF API proxy sidecar. See [AWF sandbox architecture](/gh-aw/reference/sandbox/). | ||
|
|
||
| #### Azure Foundry OpenAI | ||
|
|
||
| Azure Foundry OpenAI supports the newer OpenAI v1 URL style. Set | ||
| `COPILOT_PROVIDER_BASE_URL` to the resource endpoint with the `/openai/v1` | ||
| path, then choose one authentication method: | ||
|
|
||
| ```yaml wrap | ||
| engine: | ||
| id: copilot | ||
| model: o4-mini-aw | ||
|
zarenner marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 Suggested fixAdd a brief clarifying note in the BYOK section explaining that
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 Suggested fixReplace model: o4-mini # or your Azure deployment labelAnd add a note: "Replace with the model label that matches your Azure deployment name (see |
||
| env: | ||
| COPILOT_PROVIDER_BASE_URL: https://RESOURCE.openai.azure.com/openai/v1 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [/grill-with-docs] The 💡 Suggested clarificationIf the default COPILOT_PROVIDER_BASE_URL: (resource.openai.azure.com/redacted)
# COPILOT_PROVIDER_TYPE defaults to "openai" — correct for the v1 URL shape
COPILOT_PROVIDER_API_KEY: ${{ secrets.FOUNDRY_API_KEY }}
COPILOT_PROVIDER_WIRE_API: responsesThis is especially helpful because the existing docs already mention
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot add
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Azure deployment names typically differ from model IDs — 💡 Suggested fixAdd engine:
id: copilot
model: o4-mini-aw
env:
COPILOT_PROVIDER_BASE_URL: (resource.openai.azure.com/redacted)
COPILOT_PROVIDER_API_KEY: ${{ secrets.FOUNDRY_API_KEY }}
COPILOT_PROVIDER_MODEL_ID: your-deployment-name # set if deployment name ≠ model label
COPILOT_PROVIDER_WIRE_API: responsesOr at minimum add a prose note: "If your Azure deployment name differs from the model label, set |
||
| COPILOT_PROVIDER_API_KEY: ${{ secrets.FOUNDRY_API_KEY }} | ||
| COPILOT_PROVIDER_WIRE_API: responses | ||
|
zarenner marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 Suggested fixUpdate the Alternatively, add a brief inline note here explaining why |
||
|
|
||
| network: | ||
| allowed: | ||
| - defaults | ||
| - RESOURCE.openai.azure.com | ||
| ``` | ||
|
|
||
| For Entra authentication, omit `COPILOT_PROVIDER_API_KEY` and configure | ||
| GitHub OIDC in `engine.auth`: | ||
|
|
||
| ```yaml wrap | ||
| engine: | ||
| id: copilot | ||
| model: o4-mini-aw | ||
| auth: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This Entra example will fail to compile: the compiler ( 💡 Suggested fixAdd a permissions:
id-token: write
engine:
id: copilot
model: o4-mini-aw
auth:
type: github-oidc
env:
COPILOT_PROVIDER_BASE_URL: (resource.openai.azure.com/redacted)
COPILOT_PROVIDER_WIRE_API: responses
network:
allowed:
- defaults
- RESOURCE.openai.azure.comThis is enforced by
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Entra example will fail at runtime — 💡 Suggested fixExpand the engine:
id: copilot
model: o4-mini-aw
auth:
type: github-oidc
audience: (cognitiveservices.azure.com/redacted)
azure-tenant-id: ${{ vars.AZURE_TENANT_ID }}
azure-client-id: ${{ vars.AZURE_CLIENT_ID }}
azure-scope: (cognitiveservices.azure.com/redacted)
env:
COPILOT_PROVIDER_BASE_URL: (resource.openai.azure.com/redacted)
COPILOT_PROVIDER_WIRE_API: responsesThese map to |
||
| type: github-oidc | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [/grill-with-docs] 💡 Suggested additionA brief prerequisite note would make the example self-contained for users who are unfamiliar with OIDC federation: > [!NOTE]
> Entra authentication requires a Federated Identity Credential configured on your Azure
> Managed Identity or App Registration. See the [GitHub OIDC authentication docs](/gh-aw/reference/auth/#github-oidc)
> and the [Azure workload identity federation guide]((learn.microsoft.com/redacted)Without this, users will hit a 401 from Azure without a clear debugging path.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot proposed suggestion looks good, add. |
||
| env: | ||
| COPILOT_PROVIDER_BASE_URL: https://RESOURCE.openai.azure.com/openai/v1 | ||
| COPILOT_PROVIDER_WIRE_API: responses | ||
|
|
||
| network: | ||
| allowed: | ||
| - defaults | ||
| - RESOURCE.openai.azure.com | ||
| ``` | ||
|
Copilot marked this conversation as resolved.
Outdated
|
||
|
|
||
| See the | ||
|
zarenner marked this conversation as resolved.
Outdated
|
||
| [Azure Foundry OpenAI API key smoke test](https://github.com/github/gh-aw/actions/workflows/smoke-copilot-aoai-apikey.lock.yml) | ||
| for a working workflow run. | ||
|
|
||
| ### Engine Command-Line Arguments | ||
|
|
||
| All engines support custom command-line arguments through the `args` field, injected before the prompt: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/grill-with-docs] "Azure Foundry OpenAI" is not the official Microsoft product name — the studio is Azure AI Foundry and the API surface is the Azure OpenAI Service. Readers searching the official docs will not find "Azure Foundry OpenAI".
💡 Suggested heading and intro tweak
Consider:
Using the canonical names avoids confusion when users cross-reference the [Azure AI Foundry docs]((learn.microsoft.com/redacted)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot I believe new name is actually "Microsoft Foundry". Change wording to
Azure OpenAI in Microsoft Foundry