ci(models): open PRs for Command Code catalog updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Command Code model metadata
|
name: Command Code catalog sync
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -6,6 +6,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- ".github/scripts/check-commandcode-model-metadata.ts"
|
- ".github/scripts/check-commandcode-model-metadata.ts"
|
||||||
- ".github/workflows/model-metadata.yml"
|
- ".github/workflows/model-metadata.yml"
|
||||||
|
- "src/commandcode-catalog.ts"
|
||||||
- "src/core.ts"
|
- "src/core.ts"
|
||||||
- "src/models.ts"
|
- "src/models.ts"
|
||||||
- "tests/test-model-metadata-check.ts"
|
- "tests/test-model-metadata-check.ts"
|
||||||
@@ -13,17 +14,17 @@ on:
|
|||||||
- cron: "17 6 * * *"
|
- cron: "17 6 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: commandcode-model-metadata
|
group: commandcode-catalog-${{ github.event_name == 'pull_request' && github.event.pull_request.number || 'sync' }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
@@ -32,8 +33,58 @@ jobs:
|
|||||||
cache: npm
|
cache: npm
|
||||||
registry-url: https://registry.npmjs.org
|
registry-url: https://registry.npmjs.org
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Compare static metadata with the latest Command Code CLI
|
- name: Compare with the latest Command Code CLI
|
||||||
run: npm run check:model-metadata | tee model-metadata-report.md
|
run: npm run check:commandcode-catalog | tee commandcode-catalog-report.md
|
||||||
- name: Publish metadata report
|
- name: Publish catalog report
|
||||||
if: always()
|
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
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Unreleased
|
## 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.
|
- 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 `/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.
|
- Add `zai-org/GLM-5.3` with its verified reasoning efforts and display pricing.
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ The following environment variables are intended for tests, local mocks, and com
|
|||||||
|
|
||||||
## Image input
|
## 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.
|
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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user