diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index e58faa0e..2d4ab42e 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -25,15 +25,33 @@ jobs: const upstream = 'songquanpeng/one-api'; const [owner, repo] = upstream.split('/'); - // 获取上游仓库的PR - const pulls = await github.rest.pulls.list({ - owner, - repo, - state: 'open' - }); + // 使用分页获取所有上游仓库的PR + async function getAllPRs() { + let page = 1; + let allPulls = []; + while (true) { + const pulls = await github.rest.pulls.list({ + owner, + repo, + state: 'open', + per_page: 100, // 每页获取最大数量 + page: page + }); + + if (pulls.data.length === 0) break; + + allPulls = allPulls.concat(pulls.data); + page++; + } + return allPulls; + } + + // 获取所有PR + const pulls = await getAllPRs(); + console.log(`Found ${pulls.length} open PRs in upstream repository`); // 为每个PR创建或更新对应的PR - for (const pull of pulls.data) { + for (const pull of pulls) { try { const branchName = `upstream-pr-${pull.number}`; diff --git a/relay/billing/ratio/model.go b/relay/billing/ratio/model.go index 4279845b..6ef2a457 100644 --- a/relay/billing/ratio/model.go +++ b/relay/billing/ratio/model.go @@ -101,8 +101,6 @@ var ModelRatio = map[string]float64{ "claude-3-7-sonnet-20250219": 3.0 / 1000 * USD, "claude-3-7-sonnet-latest": 3.0 / 1000 * USD, "claude-3-opus-20240229": 15.0 / 1000 * USD, - "claude-3-7-sonnet-20250219": 3.0 / 1000 * USD, - "claude-3-7-sonnet-latest": 3.0 / 1000 * USD, // https://cloud.baidu.com/doc/WENXINWORKSHOP/s/hlrk4akp7 "ERNIE-4.0-8K": 0.120 * RMB, "ERNIE-3.5-8K": 0.012 * RMB,