You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: auto-sync provider models from OpenRouter API (#433)
* feat: add script to fetch models from OpenRouter API
* feat: add script to sync OpenRouter models into provider packages
* fix: harden regex and replacement patterns in sync script
Use replacer functions in String.replace() to prevent $-character
interpretation, and use non-greedy regex for array matching to handle
potential ] characters in comments.
* feat: add generate:models:fetch and generate:models:sync scripts
* ci: add daily model sync workflow
* fix: include openrouter.models.ts in CI commit
* fix: use actual input modalities, exclude non-chat models, reduce CI noise
- Use OpenRouter's actual input_modalities instead of blindly copying
reference model's modalities (fixes text-only models claiming image support)
- Filter modalities to only include types valid for each provider's interface
- Add blocklist for non-chat model families (lyria, veo, imagen, sora, dall-e, tts)
- Swap field order to supports-before-pricing matching existing convention
- CI only creates PR when package files actually changed (not just openrouter.models.ts)
* ci: apply automated fixes
* fix: fix YAML parsing in sync-models workflow
* fix: address PR review feedback
- Exclude non-chat model families (lyria, veo, imagen, sora, dall-e, tts)
from OPENROUTER_CHAT_MODELS in the convert script
- Add 30s fetch timeout via AbortSignal.timeout
- Fix import ordering (dirname before resolve)
- Remove redundant isNonChatModel check in chatModels filter
* ci: apply automated fixes
* refactor: rename scripts and move changeset creation into sync script
- generate:models is now the full pipeline (fetch + convert + sync)
- regenerate:models is the old openrouter-only convert
- Sync script now creates changeset file when models are added
- CI workflow simplified (no longer creates changeset, just commits)
- Restored missing workflow file lost during merge
* chore: sync model metadata from OpenRouter API
* ci: apply automated fixes
* feat: add model age filtering and provider skip patterns
- Skip deprecated/legacy model families per provider:
- OpenAI: gpt-3.5-*, gpt-4-*, gpt-4o*, gpt-oss-*, chatgpt-*
- Google: gemma-* (open-source, not Gemini API models)
- Skip models created >30 days before last sync run
- Track last run timestamp in scripts/.sync-models-last-run
- Re-sync with filters: 5 models added (was 47 without filters)
* ci: apply automated fixes
* fix: reuse existing sync-models changeset instead of creating duplicates
* ci: apply automated fixes
* chore: sync model metadata from OpenRouter API
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
0 commit comments