pub fn normalize_local_base(input: &str) -> StringExpand description
Reduce a user-entered server address to its origin/base, tolerating both
a bare http://127.0.0.1:1234 and a fully-qualified
http://127.0.0.1:1234/v1/chat/completions. Trailing slashes and the
known OpenAI-compat path suffixes are stripped so the result can have a
fresh path appended.