pub fn models_path(chat_path: &str) -> StringExpand description
Derive the model-discovery GET path as the sibling of the configured
chat path: swap the trailing …/chat/completions segment for …/models so
a non-default API root (e.g. a gateway mounted at /proxy/v1) keeps its
prefix. Anything that isn’t the canonical chat suffix falls back to the
absolute MODELS_PATH — discovery is best-effort, never a hard failure, so
guessing a plausible path beats refusing to probe.