4ca993c746
Fixes #89863. With a custom: provider pointing at a remote, API-keyed endpoint (sglang/vLLM/OpenAI-compat), every image turn triggered a 5-request probe waterfall without Authorization, spraying 401s at the backend. Two fixes: 1. _should_probe_ollama_vision now takes api_key and forwards it to detect_local_server_type so keyed local servers don't 401. 2. When provider != 'ollama', remote endpoints (per is_local_endpoint) are rejected early — server-fingerprint probing is only valid for local boxes. Non-Ollama remotes expose Ollama-compat endpoints that can misidentify and trigger unnecessary /api/show probes. _lookup_supports_vision resolves the runtime api_key via _runtime_main_value and forwards it to both helpers. New test class TestShouldProbeOllamaVision covers the contract in both directions.