-
Notifications
You must be signed in to change notification settings - Fork 238
fix(models): resolve reasoning capabilities from provider facts #3296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jackwener
wants to merge
1
commit into
main
Choose a base branch
from
codex/model-capability-resolution
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: Model metadata sync | ||
|
|
||
| on: | ||
| schedule: | ||
| # Keep newly released models from waiting for an unrelated code change. | ||
| - cron: '43 4 * * *' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| concurrency: | ||
| group: model-metadata-sync | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| sync: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Check out the repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: '24' | ||
|
|
||
| - name: Install validation dependencies | ||
| run: npm ci --ignore-scripts | ||
|
|
||
| - name: Refresh models.dev facts | ||
| run: npm run sync:model-metadata | ||
|
|
||
| - id: changes | ||
| name: Detect catalog changes | ||
| run: | | ||
| if git diff --quiet; then | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Validate generated catalog contracts | ||
| if: steps.changes.outputs.changed == 'true' | ||
| run: | | ||
| npm --workspace @maka/core run build | ||
| node -e "import('./packages/core/dist/provider-registry.js')" | ||
|
|
||
| - name: Open or update the sync pull request | ||
| if: steps.changes.outputs.changed == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| BRANCH: automation/models-dev-sync | ||
| run: | | ||
| git config user.name github-actions[bot] | ||
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
| git switch -C "$BRANCH" | ||
| git add packages/core/src/model-metadata.generated.ts packages/runtime/src/telemetry/model-pricing.generated.ts | ||
| git commit -m "chore(models): refresh models.dev metadata" | ||
| git push --force origin "HEAD:$BRANCH" | ||
|
|
||
| if [[ "$(gh pr list --head "$BRANCH" --state open --json number --jq length)" == "0" ]]; then | ||
| gh pr create \ | ||
| --base main \ | ||
| --head "$BRANCH" \ | ||
| --title "chore(models): refresh models.dev metadata" \ | ||
| --body "Automated refresh of bundled model capabilities and pricing from models.dev." | ||
| fi | ||
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Bind the existing-PR lookup to this repository branch
gh pr list --head "$BRANCH"filters by branch name and does not support an owner-qualified head. A fork PR whose head is also namedautomation/models-dev-synctherefore makes this count nonzero; the workflow then force-pushes the repository branch but skipsgh pr create, leaving that branch without its own sync PR. Query REST or GraphQL with the repository owner as part of the head identity (and exclude cross-repository PRs) before deciding that the automation PR already exists.