mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-19 16:39:15 +00:00
Upstreams like justwoker/tabitoken sit behind Cloudflare geo/IP blocks and only respond through a proxy. A global env proxy is wrong (intranet sources trae/localzen must stay direct), so add an explicit per-source proxy_url that overrides http.ProxyFromEnvironment for just that source. Sources without proxy_url keep the existing env/direct behavior. Also accepts a User-Agent header per source (config already supported headers) so CF-fronted resellers can be reached. Verified e2e: tabitoken and justwoker now return tool_calls through 127.0.0.1:7890 (clash); trae stays direct. Full go test -tags luajit passes.