Gateway: count_tokens falls through to a non-primary upstream and fails; consider skipping upstreams that don't serve the endpoint
With upstreams [bedrock, anthropic], client count_tokens calls route to the anthropic upstream (bedrock doesn't serve the endpoint) and return 400 there. Clients tolerate it, but two consequences: (1) token-counting features silently degrade for all gateway users behind a bedrock-primary config; (2) the failures land in the inference log stream attributed to the anthropic upstream — in our case three overnight count_tokens 400s, with no other anthropic traffic, exactly matched our "all failures, no successes" outage heuristic and paged the on-call at 4:50am. If count_tokens can't be served by any configured upstream, a clean 501 from the gateway itself (or serving it locally) would be kinder than forwarding to an upstream that will reject it.