{"id":26597198,"url":"https://github.com/oaklight/onehub_prices","last_synced_at":"2025-03-23T17:32:00.904Z","repository":{"id":272620327,"uuid":"917215864","full_name":"Oaklight/onehub_prices","owner":"Oaklight","description":"fetch siliconflow prices via api","archived":false,"fork":false,"pushed_at":"2025-03-20T01:28:29.000Z","size":363,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T02:33:01.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://oaklight.github.io/onehub_prices/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oaklight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-15T15:19:28.000Z","updated_at":"2025-03-20T01:28:33.000Z","dependencies_parsed_at":"2025-01-15T17:22:14.505Z","dependency_job_id":"70e6510a-1e71-41df-9ea0-0374113ae032","html_url":"https://github.com/Oaklight/onehub_prices","commit_stats":null,"previous_names":["oaklight/siliconflow_prices","oaklight/onehub_prices"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oaklight%2Fonehub_prices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oaklight%2Fonehub_prices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oaklight%2Fonehub_prices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oaklight%2Fonehub_prices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oaklight","download_url":"https://codeload.github.com/Oaklight/onehub_prices/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245141255,"owners_count":20567555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-23T17:32:00.259Z","updated_at":"2025-03-23T17:32:00.865Z","avatar_url":"https://github.com/Oaklight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# onehub_prices\n\n本项目最初为 onehub 提供 siliconflow 价格数据，现已扩展为管理多个 AI 供应商的价格信息。所有价格数据每日自动更新，确保信息及时准确。\n\n项目维护者：[Oaklight](https://github.com/Oaklight)\n\n管理多个 AI 供应商的价格信息，支持自动获取和手动维护多种来源的价格数据。\n\n```bash\nSILICONFLOW_API_KEY=\"sk-xxxxx\" python get_prices.py\npython merge_prices.py\n```\n\n## 主要文件说明\n\n- `siliconflow_models.json`: 来自 siliconflow 官方的原始模型数据\n- `oneapi_prices.json`: 适用于 one-hub 的最终价格表\n- `manual_prices.yaml`: 手工维护的价格表\n- `manual_prices/`目录: 包含各供应商的独立价格文件，包括：\n  - 阿里云百炼\n  - 零一万物\n  - 字节火山引擎\n  - Baidu\n  - Deepseek\n  - Google Gemini\n  - MiniMax\n  - Moonshot\n  - OpenRouter\n  - Pollinations.AI\n  - Zhipu\n  - 等\n\n## 使用说明\n\n对于 one-hub 使用：\n\n1. 进入`运营 -\u003e 模型价格 -\u003e 更新价格`\n2. 填入 [`https://oaklight.github.io/onehub_prices/oneapi_prices.json`](https://oaklight.github.io/onehub_prices/oneapi_prices.json)\n3. 点击`获取数据`\n4. 按需选择`覆盖数据`或`仅添加新增`\n\n## 更新说明\n\n从提交 6bcde110295e7d0a4bca69a0ec6c9381318f1e0d 之后的更新包括：\n\n1. **手工设置的价格表**：新增了一个手工设置的价格表 `manual_prices.yaml`，其中包含多个供应商的手动设置价格。\n2. **合并价格表**：新增了 `merge_prices.py` 脚本，用于合并上游的价格表。合并逻辑如下：\n   - 以 siliconflow 自动查询的价格为更新\n   - 手工价格作为主要价格（出现冲突时以手工表为准）\n3. **GitHub Workflow**：配置了 GitHub Action `.github/workflows/run_get_prices.yml`，内容如下：\n   - 每天 UTC 时间 00:00 执行，或者在 master 分支有推送时触发。\n   - 运行 `get_prices.py` 和 `merge_prices.py` 脚本。\n   - 自动提交并推送更新后的价格文件。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foaklight%2Fonehub_prices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foaklight%2Fonehub_prices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foaklight%2Fonehub_prices/lists"}