Xcode with the Gateway
Only Xcode features with an OpenAI-compatible endpoint can send model traffic through Verdictan. Apple predictive completion runs on the device. It does not make an upstream HTTP request that the gateway can receive.
GitHub Copilot bring-your-own-key (BYOK) documents local BYOK for Xcode. An organization policy can disable local BYOK. Enterprise BYOK is a different public-preview path. Availability also depends on the provider and installed extension. BYOK availability does not prove that a custom endpoint is available.
Use Verdictan only when the provider settings accept a custom endpoint for the selected Copilot Chat action. Verdictan does not redirect GitHub-hosted Copilot traffic.
Prerequisites
- GitHub Copilot BYOK enabled for the applicable account or organization.
- A provider form that accepts a custom endpoint for the selected Chat action.
- A completed Gateway Setup for IDEs.
- A Verdictan client API token and a model configured on the gateway.
The client token authenticates the Xcode extension to the gateway. It is different from the connected gateway runtime token. It is also different from the upstream provider credential.
Add the gateway as a model provider
In the GitHub Copilot for Xcode app, first examine the available provider fields:
- Open Settings. Select Model providers.
- Add an OpenAI-compatible provider only if it accepts a custom HTTP endpoint.
- Set that endpoint to
http://127.0.0.1:41002/v1. - Add a Verdictan client API token as the API key.
- Select an ID returned by the authenticated
/v1/modelsroute. - Select that provider and model for the Copilot Chat action to govern.
If the provider screen does not accept a custom endpoint, that flow cannot use the Verdictan model endpoint. Do not put a Verdictan token in a form that sends it to a vendor hostname. Do not use operating-system proxy settings for this connection.
Verify the governed path
Before you test in Xcode, verify the same token and model directly:
export VERDICTAN_IDE_TOKEN="vdt_..."
curl -fsS \
-H "Authorization: Bearer $VERDICTAN_IDE_TOKEN" \
http://127.0.0.1:41002/v1/models
Then follow events. Trigger the BYOK-backed action in Xcode:
verdictan events tail --since 10m --follow
A matching Verdictan event proves that the action used the configured gateway. Test each Chat action independently. BYOK support for Copilot Chat does not prove that agent or completion traffic uses the same provider.
Traffic that is not governed
| Xcode surface | Verdictan coverage |
|---|---|
| Apple predictive completion | None. Inference occurs on the device. |
| GitHub-hosted Copilot requests | None. The extension uses the GitHub service. |
| Copilot Chat BYOK request using the Verdictan endpoint | Governed when Verdictan records a matching event. |
| A different extension with a custom OpenAI-compatible endpoint | Governed only when the extension assigns an interaction to that endpoint. |
Troubleshooting
| Symptom | Check |
|---|---|
| No custom endpoint field | This Copilot flow cannot use the Verdictan model endpoint. Do not use a generic proxy setting. |
| Connection refused | Make sure that verdictan gateway status and port 41002 are correct. |
401 Unauthorized | Make sure that the Model providers entry uses an active Verdictan client token. |
| Model rejected | Compare the configured name with the authenticated /v1/models response. |
| Xcode returns a response but the event is missing | Verify gateway event delivery. Verify the CLI organization, region, event window, and filters. Make sure that the action uses the BYOK provider. |