When the tracker proxies /v1/chat/completions to a first-shard node it already holds the full registry picture. It now resolves the downstream route inline via _select_route, strips the proxied node, and sends the result as X-Meshnet-Route header alongside the request body. The first-shard node reads this header in _get_remaining_route and returns it directly, skipping the second tracker HTTP call entirely. Falls back to the tracker query transparently when the header is absent (direct node-to-node calls or older tracker versions). Reduces per-inference tracker round-trips from 2 to 1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 KiB
24 KiB