Skip to content

daily-model-inventory: add Copilot artifact fallback when Copilot API is unavailable#31623

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/model-inventory-update-2026-05-12
Closed

daily-model-inventory: add Copilot artifact fallback when Copilot API is unavailable#31623
Copilot wants to merge 3 commits into
mainfrom
copilot/model-inventory-update-2026-05-12

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

  • Review new PR comment and determine requested action
  • Inspect current workflow tool configuration and patterns
  • Add tools.agentic-workflows to daily-model-inventory workflow
  • Recompile and validate the updated workflow
  • Run focused checks and scan for secrets
  • Commit changes and reply on the PR comment with commit hash

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update model alias inventory for 2026-05-12 daily-model-inventory: add Copilot artifact fallback when Copilot API is unavailable May 12, 2026
Copilot AI requested a review from pelikhan May 12, 2026 03:59
Copy link
Copy Markdown
Collaborator

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot enable tools.agentic-workflows

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 12, 2026

@copilot enable tools.agentic-workflows

Enabled tools.agentic-workflows in daily-model-inventory and added the required permissions.actions: read. Included regenerated lockfile updates in commit 9afc0bb.

@pelikhan pelikhan marked this pull request as ready for review May 12, 2026 04:09
Copilot AI review requested due to automatic review settings May 12, 2026 04:09
@pelikhan pelikhan closed this May 12, 2026
Copilot stopped work on behalf of pelikhan due to an error May 12, 2026 04:10
Copilot AI requested a review from pelikhan May 12, 2026 04:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the daily model inventory workflow to better handle Copilot API outages by enabling the agentic-workflows tool and adding prompt guidance to fall back to mining model IDs from GitHub Actions artifacts.

Changes:

  • Added actions: read permission to support reading workflow artifacts/runs for fallback scenarios.
  • Enabled the agentic-workflows tool in the daily-model-inventory workflow.
  • Updated the workflow prompt to instruct artifact-based fallback when Copilot /models returns HTTP errors or empty results.
Show a summary per file
File Description
.github/workflows/daily-model-inventory.md Adds permissions, enables agentic-workflows, and documents Copilot artifact fallback behavior in the agent prompt.
.github/workflows/daily-model-inventory.lock.yml Recompiled lockfile reflecting the new tool and permissions; includes additional runtime steps and MCP configuration updates.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines 421 to +427
empty `models` array. Skip providers with errors or empty model lists.

If the Copilot provider returns an HTTP error (for example HTTP 400) or an empty model list, use
GitHub Actions artifacts from a recent successful run that used `engine: copilot` as a fallback
source for Copilot model IDs. Mine model IDs from the run artifacts, then include those IDs in your
analysis as artifact-derived Copilot inventory (and call out that source explicitly in the issue).

Comment on lines +519 to +544
- name: Install gh-aw extension
env:
GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
run: |
# Check if gh-aw extension is already installed
if gh extension list | grep -q "github/gh-aw"; then
echo "gh-aw extension already installed, upgrading..."
gh extension upgrade gh-aw || true
else
echo "Installing gh-aw extension..."
gh extension install github/gh-aw
fi
gh aw --version
# Copy the gh-aw binary to ${RUNNER_TEMP}/gh-aw for MCP server containerization
mkdir -p "${RUNNER_TEMP}/gh-aw"
GH_AW_BIN=""
GH_AW_BIN=$(command -v gh-aw 2>/dev/null) || true
if [ -z "$GH_AW_BIN" ]; then
GH_AW_BIN=$(find "${HOME}/.local/share/gh/extensions/gh-aw" -name 'gh-aw' -type f 2>/dev/null | head -1) || true
fi
if [ -n "$GH_AW_BIN" ] && [ -f "$GH_AW_BIN" ]; then
cp "$GH_AW_BIN" "${RUNNER_TEMP}/gh-aw/gh-aw"
chmod +x "${RUNNER_TEMP}/gh-aw/gh-aw"
echo "Copied gh-aw binary to ${RUNNER_TEMP}/gh-aw/gh-aw"
else
echo "::error::Failed to find gh-aw binary for MCP server"
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.

[model-inventory] Model alias inventory update - 2026-05-12

3 participants