feat(api): 支持 88code 所有镜像站并智能构造 API URL#28
Merged
johnnyee merged 1 commit intobyebye-code:mainfrom Jan 9, 2026
Merged
Conversation
- 移除硬编码的 88code.org 和 88code.ai 域名 - 改用通配符 "88code" 匹配所有 88code 镜像站(如 88code.wu.ren) - 智能处理不同格式的 ANTHROPIC_BASE_URL: - /api 结尾 → /api/usage - /v1 结尾 → /api/usage - 无后缀 → /api/usage - 自动推断 subscription_url,确保与 usage_url 使用同一域名 - 修复跨域访问问题,提升 API 配置灵活性
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.
改动说明
本 PR 优化了 88code 镜像站的支持,提升了 API 配置的灵活性。
主要改动
移除硬编码域名
88code.org和88code.ai硬编码"88code"匹配所有 88code 镜像站88code.wu.ren、88code.ai、88code.org等所有镜像智能 URL 构造
ANTHROPIC_BASE_URL的不同格式自动构造正确的 API 路径/api结尾 →/api/usage/v1结尾 →/api/usage/api/usage自动推断 subscription_url
usage_url和subscription_url使用同一域名测试
https://www.88code.ai/api配置https://88code.wu.ren/api配置影响范围
src/api/mod.rs、src/core/segments/byebyecode_usage.rs、src/core/segments/byebyecode_subscription.rs相关 Issue
解决了使用非官方 88code 镜像站时无法正确识别的问题。