Backend (controller/ratio_sync.go): - Add built‑in official upstream to GetSyncableChannels (ID: -100, BaseURL: https://basellm.github.io) - Support absolute endpoint URLs; otherwise join BaseURL + endpoint (defaults to /api/ratio_config) - Harden HTTP client: - IPv4‑first with IPv6 fallback for github.io - Add ResponseHeaderTimeout - 3 attempts with exponential backoff (200/400/800ms) - Validate Content-Type and limit response body to 10MB (safe decode via io.LimitReader) - Robust parsing: support type1 ratio_config map and type2 pricing list - Use net.SplitHostPort for host parsing - Use float tolerance in differences comparison to avoid false mismatches - Remove unused code (tryDirect) and improve warnings Frontend: - UpstreamRatioSync.jsx: auto-assign official endpoint to /llm-metadata/api/newapi/ratio_config-v1-base.json - ChannelSelectorModal.jsx: - Pin the official source at the top of the list - Show a green “官方” tag next to the status - Refactor status renderer to accept the full record Notes: - Backward compatible; no API surface changes - Official ratio_config reference: https://basellm.github.io/llm-metadata/api/newapi/ratio_config-v1-base.json
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| billing.go | Loading commit data... | |
| channel-billing.go | Loading commit data... | |
| channel-test.go | Loading commit data... | |
| channel.go | Loading commit data... | |
| console_migrate.go | Loading commit data... | |
| github.go | Loading commit data... | |
| group.go | Loading commit data... | |
| image.go | Loading commit data... | |
| linuxdo.go | Loading commit data... | |
| log.go | Loading commit data... | |
| midjourney.go | Loading commit data... | |
| misc.go | Loading commit data... | |
| missing_models.go | Loading commit data... | |
| model.go | Loading commit data... | |
| model_meta.go | Loading commit data... | |
| oidc.go | Loading commit data... | |
| option.go | Loading commit data... | |
| playground.go | Loading commit data... | |
| prefill_group.go | Loading commit data... | |
| pricing.go | Loading commit data... | |
| ratio_config.go | Loading commit data... | |
| ratio_sync.go | Loading commit data... | |
| redemption.go | Loading commit data... | |
| relay.go | Loading commit data... | |
| setup.go | Loading commit data... | |
| swag_video.go | Loading commit data... | |
| task.go | Loading commit data... | |
| task_video.go | Loading commit data... | |
| telegram.go | Loading commit data... | |
| token.go | Loading commit data... | |
| topup.go | Loading commit data... | |
| topup_stripe.go | Loading commit data... | |
| twofa.go | Loading commit data... | |
| uptime_kuma.go | Loading commit data... | |
| usedata.go | Loading commit data... | |
| user.go | Loading commit data... | |
| vendor_meta.go | Loading commit data... | |
| wechat.go | Loading commit data... |