add workflow to automate running llm-sync-models script#9724
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to automate weekly synchronization of the LLM model catalog from models.dev into packages/llm-info/data/models.yml.
Changes:
- Adds scheduled and manual workflow triggers for syncing LLM model metadata.
- Runs
sync-models, code generation, and llm-info tests. - Creates a draft PR when catalog changes are detected and no existing update PR is open.
Contributor
There was a problem hiding this comment.
3 issues found across 1 file
Architecture diagram
sequenceDiagram
participant Scheduler as Weekly Cron (GitHub)
participant Workflow as GitHub Actions Workflow
participant Repo as Git Repository
participant ModelsDev as models.dev (External API)
participant LLMInfo as llm-info package
participant PRBot as PR Creation (gh CLI)
Note over Scheduler,PRBot: Sync LLM Model Catalog Workflow
Scheduler->>Workflow: Trigger (Monday 08:30 UTC or manual dispatch)
Workflow->>Repo: Checkout code (fetch-depth: 0)
Workflow->>LLMInfo: Install repo dependencies
Workflow->>LLMInfo: Run sync-models -n 5
LLMInfo->>ModelsDev: Fetch 5 newest models per provider
ModelsDev-->>LLMInfo: Return model data
LLMInfo->>LLMInfo: Update packages/llm-info/data/models.yml
Workflow->>LLMInfo: Run codegen
LLMInfo->>LLMInfo: Generate derived data
Workflow->>LLMInfo: Run tests
LLMInfo-->>Workflow: Test results
Workflow->>Repo: Check for changes in models.yml
alt Changes detected
Workflow->>Workflow: Set has_changes=true
Workflow->>Repo: Check for existing open PR with title "Update LLM model catalog"
alt No existing PR
Workflow->>Repo: Create new branch (automation/sync-llm-info-models-*)
Workflow->>Repo: Commit updated models.yml
Workflow->>Repo: Push branch
Workflow->>PRBot: gh pr create --draft
PRBot-->>Workflow: PR created
else Existing PR found
Workflow->>Workflow: Skip PR creation
end
else No changes
Workflow->>Workflow: Skip PR creation
end
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
6 tasks
Light2Dark
added a commit
that referenced
this pull request
Jun 26, 2026
**This pull request was authored by a coding agent.** ## 📝 Summary The weekly [Sync LLM models](https://github.com/marimo-team/marimo/actions/workflows/sync-llm-info.yml) workflow has failed on every run since it was added (#9724). Sync, codegen, tests, commit, and push all succeed, but `gh pr create` fails with: ``` Resource not accessible by integration (createPullRequest) ``` The release GitHub App token has `contents: write` (enough to push `automation/sync-llm-info-models`) but not `pull-requests: write`. I switched the PR lookup and creation steps to `GITHUB_TOKEN`, which the workflow already grants `pull-requests: write`. The app token is still used for checkout and push. ## 📋 Pre-Review Checklist - [ ] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [x] Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it. - [ ] Video or media evidence is provided for any visual changes (optional). ## ✅ Merge Checklist - [x] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [ ] Documentation has been updated where applicable, including docstrings for API changes. - [ ] Tests have been added for the changes made. Made with [Cursor](https://cursor.com) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/marimo-team/marimo/pull/9998?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> Co-authored-by: Cursor <cursoragent@cursor.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.
📝 Summary
models.deventries intopackages/llm-info/data/models.yml.📋 Pre-Review Checklist
✅ Merge Checklist