mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
feat(infra): model profile bump tool (#35331)
This commit is contained in:
69
.github/workflows/refresh_model_profiles.yml
vendored
Normal file
69
.github/workflows/refresh_model_profiles.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
# Refreshes model profile data for all in-monorepo partner integrations by
|
||||
# pulling the latest metadata from models.dev via the `langchain-profiles` CLI.
|
||||
#
|
||||
# Creates a pull request with any changes. Triggered manually from the Actions UI.
|
||||
|
||||
name: "🔄 Refresh Model Profiles"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
refresh-profiles:
|
||||
name: "refresh all partner profiles"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "📋 Checkout"
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: "🐍 Set up Python + uv"
|
||||
uses: ./.github/actions/uv_setup
|
||||
with:
|
||||
python-version: "3.12"
|
||||
working-directory: libs/model-profiles
|
||||
|
||||
- name: "📦 Install langchain-profiles CLI"
|
||||
working-directory: libs/model-profiles
|
||||
run: uv sync
|
||||
|
||||
- name: "🔄 Refresh profiles"
|
||||
working-directory: libs/model-profiles
|
||||
run: |
|
||||
declare -A PROVIDERS=(
|
||||
[anthropic]=anthropic
|
||||
[deepseek]=deepseek
|
||||
[fireworks]=fireworks-ai
|
||||
[groq]=groq
|
||||
[huggingface]=huggingface
|
||||
[mistralai]=mistral
|
||||
[openai]=openai
|
||||
[openrouter]=openrouter
|
||||
[perplexity]=perplexity
|
||||
[xai]=xai
|
||||
)
|
||||
|
||||
for partner in "${!PROVIDERS[@]}"; do
|
||||
provider="${PROVIDERS[$partner]}"
|
||||
data_dir="../../libs/partners/${partner}/langchain_${partner//-/_}/data"
|
||||
echo "--- Refreshing ${partner} (provider: ${provider}) ---"
|
||||
echo y | uv run langchain-profiles refresh \
|
||||
--provider "$provider" \
|
||||
--data-dir "$data_dir"
|
||||
done
|
||||
|
||||
- name: "🔀 Create pull request"
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
branch: bot/refresh-model-profiles
|
||||
commit-message: "chore(model-profiles): refresh model profile data"
|
||||
title: "chore(model-profiles): refresh model profile data"
|
||||
body: |
|
||||
Automated refresh of model profile data for all in-monorepo partner
|
||||
integrations via `langchain-profiles refresh`.
|
||||
|
||||
🤖 Generated by the `refresh_model_profiles` workflow.
|
||||
add-paths: libs/partners/**/data/_profiles.py
|
||||
Reference in New Issue
Block a user