Conversation
…alysis
- Capture enriched metadata from each /models endpoint:
- OpenAI: owned_by, created
- Anthropic: display_name, created_at, type
- Gemini: display_name, description, input/output token limits,
supported_generation_methods, version
- Copilot: name, vendor, version, capabilities (limits, supports),
billing (potential multiplier field)
- Upload raw.json artifacts alongside models.json for each provider
- Add bash allowlist entries for agent to explore raw data and
model_multipliers.json
- Add Step 2 (Explore Raw API Fields) to agent prompt
- Add Step 3 (Infer Token Multipliers) with gap table against
model_multipliers.json
- Renumber old Steps 2-4 to Steps 4-6
- Expand issue template with Raw API Fields Discovered section and
Token Multiplier Analysis section (missing, stale, discrepant)
- Recompile lock file
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/acec121c-6c32-4b2d-bcc0-70192781e4a8
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
May 3, 2026 21:47
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Enhances the daily model inventory workflow to cache richer per-provider model metadata, preserve raw API responses as artifacts, and expand the agent prompt to analyze/validate token multipliers against live data.
Changes:
- Enrich provider
models.jsonwith additional metadata fields and uploadraw.jsonalongside it for OpenAI/Anthropic/Gemini/Copilot. - Expand the agent prompt to explore raw API fields and infer/validate ET token multipliers vs
pkg/cli/data/model_multipliers.json. - Extend the tool allowlist to enable querying
raw.jsonartifacts and the multiplier table.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/daily-model-inventory.md | Updates collection steps to produce enriched model metadata + raw artifacts; expands prompt steps and issue template; extends bash tool allowlist. |
| .github/workflows/daily-model-inventory.lock.yml | Regenerates the locked workflow to reflect the new artifact outputs and expanded tool allowlist. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (3)
.github/workflows/daily-model-inventory.md:205
- The Copilot fetch uses
curl -sf -o "$OUT/raw.json" ... || true; with-f, HTTP errors can preventraw.jsonfrom being written, but the upload step requires it and will fail. Ensureraw.jsonis always produced (either capture error bodies by dropping-for write a fallback JSON error response whencurlfails).
HTTP_STATUS=$(curl -sf -o "$OUT/raw.json" -w "%{http_code}" \
-H "Authorization: Bearer $COPILOT_GITHUB_TOKEN" \
-H "Copilot-Integration-Id: copilot-chat" \
https://api.githubcopilot.com/models) || true
.github/workflows/daily-model-inventory.md:96
- Same
curl -sf -o "$OUT/raw.json" ... || trueissue here: with-f,raw.jsonmay not be written for non-200 responses, but the artifact upload expects it and will error. Ensureraw.jsonis always present (capture error bodies by dropping-for write a fallback JSON error payload on failure) and avoid an emptyHTTP_STATUSin the error message.
HTTP_STATUS=$(curl -sf -o "$OUT/raw.json" -w "%{http_code}" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
https://api.anthropic.com/v1/models) || true
.github/workflows/daily-model-inventory.md:148
- With
curl -sf -o "$OUT/raw.json" ... || true, a non-200 response (or network failure) can result inraw.jsonnot being created because-fsuppresses output on HTTP errors. The subsequent artifact upload includesraw.jsonand will fail if it’s missing. Ensureraw.jsonis always created and consider capturing error bodies by removing-f.
HTTP_STATUS=$(curl -sf -o "$OUT/raw.json" -w "%{http_code}" \
"https://generativelanguage.googleapis.com/v1beta/models?key=${GEMINI_API_KEY}") || true
- Files reviewed: 2/2 changed files
- Comments generated: 3
Comment on lines
+258
to
+264
| - "jq '[.data[] | keys] | add | unique' /tmp/gh-aw/model-inventory/artifacts/openai-models/raw.json" | ||
| - "jq '[.data[] | keys] | add | unique' /tmp/gh-aw/model-inventory/artifacts/anthropic-models/raw.json" | ||
| - "jq '[.models[] | keys] | add | unique' /tmp/gh-aw/model-inventory/artifacts/gemini-models/raw.json" | ||
| - "jq '[.data[] | keys] | add | unique' /tmp/gh-aw/model-inventory/artifacts/copilot-models/raw.json" | ||
| - "jq '[.data[] | .capabilities | keys] | add | unique' /tmp/gh-aw/model-inventory/artifacts/copilot-models/raw.json" | ||
| - "jq '[.data[] | select(.billing != null)] | length' /tmp/gh-aw/model-inventory/artifacts/copilot-models/raw.json" | ||
| - "jq '.data[] | {id, billing}' /tmp/gh-aw/model-inventory/artifacts/copilot-models/raw.json" |
Comment on lines
1195
to
1197
| HTTP_STATUS=$(curl -sf -o "$OUT/raw.json" -w "%{http_code}" \ | ||
| -H "Authorization: Bearer $OPENAI_API_KEY" \ | ||
| https://api.openai.com/v1/models) || true |
Comment on lines
41
to
43
| HTTP_STATUS=$(curl -sf -o "$OUT/raw.json" -w "%{http_code}" \ | ||
| -H "Authorization: Bearer $OPENAI_API_KEY" \ | ||
| https://api.openai.com/v1/models) || true |
Copilot AI
added a commit
that referenced
this pull request
May 3, 2026
…alysis (#30018) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.
The workflow only cached model IDs and had no mechanism to validate or infer the ET multipliers in
model_multipliers.jsonagainst live API data.Data collection
Each provider's fetch job now extracts enriched metadata and uploads both
models.json(structured) andraw.json(full API response) as artifacts:owned_by,createddisplay_name,created_at,typedisplay_name,description,input_token_limit,output_token_limit,supported_generation_methods,versionname,vendor,version,capabilities(limits + supports flags),billingAgent prompt (6 steps, was 4)
raw.json, identifies which fields carry context limits, capability flags, or billing/pricing data, and summarizes what's worth caching going forward.model_multipliers.jsonusing provider-specific strategies (Copilotbilling.multiplierdirectly; GeminiinputTokenLimit/outputTokenLimitas a complexity heuristic; OpenAI/Anthropic naming conventions) and produces a gap table: missing entries, stale entries, and inferred-vs-stored discrepancies.Issue template
Adds Raw API Fields Discovered and Token Multiplier Analysis sections (with sub-tables for missing, stale, and discrepant multipliers) to the generated issue body.
Tools allowlist
Added bash allowlist entries so the agent can query
raw.jsonartifacts andmodel_multipliers.json.