Skip to content

BYOK with external Azure AI Foundry deployment — model not found in proxy catalog (HTTP 404) #30356

Closed

Description

@arthurfvives

When configuring BYOK mode with engine: copilot to route inference to a custom model deployment on Azure AI Foundry,
the agent step fails immediately with:

Model '<model-name>' not found on provider at http://172.30.0.30:10002 (HTTP 404)

This happens regardless of whether COPILOT_MODEL is set to the generic model family name or the deployment name.

From the logs, the harness fetches a fixed list of ~25 models from the proxy (api-proxy:10002/models). These appear
to be the standard GitHub Copilot models. The external BYOK provider's deployment never appears to be registered or
discoverable in that list.

Expected behaviour: In BYOK mode, inference requests for a model that exists on the external provider should be
routed there — either by merging the external provider's model list into the proxy catalog, or by accepting any
COPILOT_MODEL value when COPILOT_PROVIDER_BASE_URL is set.

Config used:

 engine:
   id: copilot
   env:
     COPILOT_PROVIDER_BASE_URL: ${{ secrets.COPILOT_PROVIDER_BASE_URL }}
     COPILOT_MODEL: gpt-5-mini-mycustom (also tried gpt-5-mini, same result)
     COPILOT_PROVIDER_API_KEY: ${{ secrets.COPILOT_PROVIDER_API_KEY }}
     COPILOT_PROVIDER_TYPE: azure
     COPILOT_PROVIDER_WIRE_API: responses
     COPILOT_PROVIDER_MODEL_ID: gpt-5-mini-mycustom

I followed the BYOK documentation as closely as I could, so it's entirely possible I'm misconfiguring something (first time working with Foundry too)
Thanks in advance

Activity

  1. locked and limited conversation to collaborators on May 5, 2026
  2. unlocked this conversation on May 5, 2026
  3. arthurfvives commented on May 5, 2026

    @arthurfvives
    Author

    Update: Changing COPILOT_PROVIDER_TYPE from azure to openai made the run complete without errors. However, I'm not confident BYOK actually activated.

    The activation summary shows:

    engine id: copilot
    engine name: GitHub Copilot CLI
    model: claude-sonnet-4.6
    

    But the agent itself reports it's running on my custom deployment (gpt-5-mini-mycustom). After digging into the agent artifact, I found:

    • sandbox/firewall/logs/access.log — the only outbound HTTPS connection was to api.githubcopilot.com:443. No traffic to my Azure AI Foundry endpoint.
    • sandbox/firewall/logs/api-proxy-logs/models.json — "openai": { "configured": false }, "copilot": { "target": "api.githubcopilot.com" }
    • agent-stdio.log — health check says ✓ Copilot CLI offline+BYOK mode configured, but the proxy appears to have fallen back to GitHub Copilot anyway

    The agent's self-report seems to be based on reading its own COPILOT_MODEL/COPILOT_PROVIDER_MODEL_ID env vars rather than reflecting its actual backend.

    My question: Should the activation summary model field reflect the BYOK model when BYOK is active? If so, claude-sonnet-4.6 being shown there suggests BYOK never routed to my provider — and I still don't know why the proxy ignores the secret.

  4. locked and limited conversation to collaborators on May 5, 2026
  5. unlocked this conversation on May 5, 2026
  6. pelikhan commented on May 15, 2026

    @pelikhan
    Collaborator

    Please try again on the latest prerelease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions