ci(models): open PRs for Command Code catalog updates

This commit is contained in:
Patrick Wozniak
2026-08-25 15:08:29 +02:00
parent 3d8758fe3b
commit c3a383447c
3 changed files with 62 additions and 11 deletions
+60 -9
View File
@@ -1,4 +1,4 @@
name: Command Code model metadata
name: Command Code catalog sync
on:
pull_request:
@@ -6,6 +6,7 @@ on:
paths:
- ".github/scripts/check-commandcode-model-metadata.ts"
- ".github/workflows/model-metadata.yml"
- "src/commandcode-catalog.ts"
- "src/core.ts"
- "src/models.ts"
- "tests/test-model-metadata-check.ts"
@@ -13,17 +14,17 @@ on:
- cron: "17 6 * * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: commandcode-model-metadata
group: commandcode-catalog-${{ github.event_name == 'pull_request' && github.event.pull_request.number || 'sync' }}
cancel-in-progress: true
jobs:
check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
@@ -32,8 +33,58 @@ jobs:
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- name: Compare static metadata with the latest Command Code CLI
run: npm run check:model-metadata | tee model-metadata-report.md
- name: Publish metadata report
- name: Compare with the latest Command Code CLI
run: npm run check:commandcode-catalog | tee commandcode-catalog-report.md
- name: Publish catalog report
if: always()
run: cat model-metadata-report.md >> "$GITHUB_STEP_SUMMARY"
run: cat commandcode-catalog-report.md >> "$GITHUB_STEP_SUMMARY"
sync:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- name: Synchronize with the latest Command Code CLI
run: npm run sync:commandcode-catalog | tee commandcode-catalog-report.md
- name: Format and verify synchronized files
run: |
npm run format -- src/commandcode-catalog.ts README.md CHANGELOG.md
npm run typecheck
npm run test:models
npm run format:check
git diff --check
- name: Publish catalog report
if: always()
run: cat commandcode-catalog-report.md >> "$GITHUB_STEP_SUMMARY"
- name: Create or update synchronization PR
uses: peter-evans/create-pull-request@v8
with:
branch: automation/commandcode-catalog
delete-branch: true
commit-message: "chore(models): sync Command Code catalog"
title: "chore(models): sync Command Code catalog"
body: |
Automated synchronization with the latest published `command-code` CLI package.
This updates only machine-readable compatibility metadata:
- CLI version used in the `x-command-code-version` header
- image-input capabilities
- supported reasoning efforts
- documented catalog snapshot version
Pricing remains review-only because CLI documentation does not represent every pricing tier and temporary promotion used by the provider.
assignees: patlux
add-paths: |
src/commandcode-catalog.ts
README.md
CHANGELOG.md
+1 -1
View File
@@ -2,7 +2,7 @@
## Unreleased
- Add a daily GitHub Actions check that compares static image and reasoning metadata with the latest published Command Code CLI catalog.
- Add a daily GitHub Actions synchronization job that opens or updates a pull request for CLI version, image capability, and reasoning-effort changes in the latest published Command Code catalog.
- Refresh static model capabilities from `command-code@1.32.2`, including new image and reasoning metadata.
- Add `/commandcode-quota` with live credits, plan, usage totals, and rolling-limit diagnostics from Command Code's alpha usage endpoints.
- Add `zai-org/GLM-5.3` with its verified reasoning efforts and display pricing.
+1 -1
View File
@@ -144,7 +144,7 @@ The following environment variables are intended for tests, local mocks, and com
## Image input
The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.32.2`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions check compares the static image and reasoning metadata with the latest published CLI package and reports any drift.
The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.32.2`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions job synchronizes the CLI version, image capabilities, and reasoning efforts with the latest published CLI package and opens or updates a reviewable pull request when they change. Pricing remains manually reviewed because the CLI catalog does not expose every pricing tier and temporary promotion used by the provider.
For vision-capable models, Pi's native provider adapters forward image blocks from user messages and tool results using the documented OpenAI or Anthropic message schema. Unknown and text-only models remain marked text-only in Pi.