Skip to main content

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:

  1. Open Settings. Select Model providers.
  2. Add an OpenAI-compatible provider only if it accepts a custom HTTP endpoint.
  3. Set that endpoint to http://127.0.0.1:41002/v1.
  4. Add a Verdictan client API token as the API key.
  5. Select an ID returned by the authenticated /v1/models route.
  6. 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 surfaceVerdictan coverage
Apple predictive completionNone. Inference occurs on the device.
GitHub-hosted Copilot requestsNone. The extension uses the GitHub service.
Copilot Chat BYOK request using the Verdictan endpointGoverned when Verdictan records a matching event.
A different extension with a custom OpenAI-compatible endpointGoverned only when the extension assigns an interaction to that endpoint.

Troubleshooting

SymptomCheck
No custom endpoint fieldThis Copilot flow cannot use the Verdictan model endpoint. Do not use a generic proxy setting.
Connection refusedMake sure that verdictan gateway status and port 41002 are correct.
401 UnauthorizedMake sure that the Model providers entry uses an active Verdictan client token.
Model rejectedCompare the configured name with the authenticated /v1/models response.
Xcode returns a response but the event is missingVerify gateway event delivery. Verify the CLI organization, region, event window, and filters. Make sure that the action uses the BYOK provider.

Next steps