Skip to content

Remote invocations failed to authorize copilot cli with GITHUB_TOKEN alone #831

Description

@ChenxiJiang333

Description:
Invoking the remote Copilot agent fails with a 401 authentication error with env GITHUB_TOKEN, and the service explicitly asks for a COPILOT_PROVIDER_API_KEY or COPILOT_PROVIDER_BEARER_TOKEN.
Image

Steps to Reproduce:

  1. Run azd ai agent init --manifest "https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/bring-your-own/invocations/github-copilot/azure.yaml"
  2. Run azd env set GITHUB_TOKEN "<github token>"
  3. Run azd up
  4. Run azd ai agent invoke --protocol invocations '{"input": "What can you help me with?"}'

Environment:

Expected Behavior:
azd ai agent invoke can get model response successfully.

@JeffreyCA and @RickWinter for notification.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions