Skip to content

Update daily model inventory Copilot /models discovery across API hosts - #48630

Closed
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/update-copilot-api-call
Closed

Update daily model inventory Copilot /models discovery across API hosts#48630
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/update-copilot-api-call

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The daily model inventory workflow was querying a single Copilot /models endpoint without the versioned API contract or workflow integration header. This change updates the inventory fetch path to use the current apiVersion, identify itself as agentic-workflows, and fall back across the public, individual, business, and enterprise Copilot API hosts.

  • Copilot API request path

    • Switch the inventory fetch to GET /models?apiVersion=2026-06-01
    • Add Copilot-Integration-Id: agentic-workflows on each request
    • Preserve the existing bearer-token auth flow
  • Host fallback

    • Try Copilot model inventory against:
      • api.githubcopilot.com
      • api.individual.githubcopilot.com
      • api.business.githubcopilot.com
      • api.enterprise.githubcopilot.com
    • Stop on the first successful 200 response
    • Emit structured failure output with attempted endpoints and statuses when all hosts fail
  • Workflow guidance

    • Update the workflow prompt/body text to describe the new versioned endpoint behavior and multi-host fallback so downstream analysis matches the collected artifact
  • Generated workflow

    • Recompile daily-model-inventory.lock.yml so the runtime workflow reflects the updated request logic
API_VERSION="2026-06-01"
curl -H "Authorization: ******" \
     -H "Copilot-Integration-Id: agentic-workflows" \
     "https://api.githubcopilot.com/models?apiVersion=${API_VERSION}"

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Update daily model inventory Copilot models fetch Update daily model inventory Copilot /models discovery across API hosts Jul 28, 2026
Copilot AI requested a review from pelikhan July 28, 2026 13:35
@pelikhan pelikhan closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants