mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 16:04:01 +00:00
When every attempt died on the proxy route itself, the gateway answered with a generic 502 "all upstream attempts failed", pointing operators at the upstream instead of their proxies. Attempt errors that fail before a connection to the upstream exists (proxy dial, CONNECT/SOCKS handshake, tunnelled TLS) are now tagged as proxy failures on real proxies; direct transports are left untouched. The anonymous lane also reports a proxy failure when no proxy is healthy. When the final error is such a failure, the inference and System One handlers return 503 with type "proxy_error". Any upstream HTTP response is still forwarded as before, so genuine upstream errors are not mislabelled.