Skip to main content

models_path

Function models_path 

Source
pub fn models_path(chat_path: &str) -> String
Expand description

Derive the model-discovery GET path (RFC 0018 §5.4) 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.