Use AWF /reflect for Copilot model discovery in daily-model-inventory#31834
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Use AWF /reflect endpoint for Copilot models in daily model inventory
Use AWF May 13, 2026
/reflect for Copilot model discovery in daily-model-inventory
Contributor
There was a problem hiding this comment.
Pull request overview
Moves Copilot model discovery in the daily-model-inventory workflow from direct Copilot API calls (requiring COPILOT_GITHUB_TOKEN) to using the AWF api-proxy /reflect endpoint, aligning discovery with the runtime gateway path.
Changes:
- Removes the
collect_copilot_modelspre-job (and its artifact upload) from the workflow. - Adds tooling to fetch and query
http://api-proxy:10000/reflectfor Copilot model IDs. - Updates the workflow prompt/instructions to treat Copilot inventory as coming from
/reflectand to continue gracefully when/reflectis unavailable.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/daily-model-inventory.md | Removes direct Copilot model fetch job and switches Copilot model discovery instructions/tools to use AWF /reflect. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
.github/workflows/daily-model-inventory.md:363
- Per the documented /reflect response shape, endpoints[].models is a list of model IDs (or null while discovery runs) and does not include vendor/capabilities/billing metadata. The note that Copilot models from /reflect "may include vendor metadata" appears inaccurate and could mislead the analysis steps. Consider rewording to match /reflect (IDs only), and if vendor attribution is required, describe how it will be derived.
Note: Copilot model data must be read from the AWF `/reflect` endpoint. Copilot serves models from
multiple vendors (Anthropic, OpenAI, Google), and those models may include `vendor` metadata.
- Files reviewed: 1/1 changed files
- Comments generated: 2
Comment on lines
+301
to
+303
| - "mkdir -p /tmp/gh-aw/model-inventory && (curl -fsS http://api-proxy:10000/reflect > /tmp/gh-aw/model-inventory/reflect.json || printf \"%s\" \"{\\\"endpoints\\\":[],\\\"error\\\":\\\"reflect endpoint unavailable\\\"}\" > /tmp/gh-aw/model-inventory/reflect.json)" | ||
| - "jq . /tmp/gh-aw/model-inventory/reflect.json" | ||
| - "jq \".endpoints[] | select(.provider == \\\"copilot\\\") | .models\" /tmp/gh-aw/model-inventory/reflect.json" |
Comment on lines
+343
to
347
| - Copilot live provider metadata: available via `http://api-proxy:10000/reflect` (filter | ||
| `.endpoints[] | select(.provider == "copilot")`). If `/reflect` is unavailable, treat Copilot | ||
| data as unavailable for this run and continue with the remaining providers. | ||
|
|
||
| Each enriched `models.json` entry has the form (fields vary by provider): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Enhancement
daily-model-inventorywas relying on direct Copilot API calls withCOPILOT_GITHUB_TOKEN, which was failing with HTTP 400 and creating an unnecessary secret dependency. This change moves Copilot model discovery to the AWF api-proxy/reflectpath used by the runtime.What does this improve?
/reflectfor inventory and multiplier analysis.COPILOT_GITHUB_TOKENdependency for model discovery.Why is this valuable?
api.githubcopilot.com/modelsHTTP 400).Implementation approach:
collect_copilot_modelsjob from.github/workflows/daily-model-inventory.md./reflectonce, then query Copilot models from the saved payload.## Inputs: Copilot source is/reflectinstead of pre-step Copilot artifact./reflect./reflectplus docs-derived multiplier data./reflectunavailability so analysis continues for other providers.