You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`lm_proxy_url` is documented/felt to be an OpenAI-style base URL (`http://host:port/v1\`), but the proxy code prepends `/v1/*` itself. When users follow the `/v1` convention, URLs become `http://host:port/v1/v1/models\` and curl returns "Proxy connection failed" with nothing actionable in the log.
chat forwarding passes `/v1/chat/completions` through unmodified
streaming proxy same
Fix options
Normalize on parse. In `config.cpp`, strip a trailing `/v1` (with or without slash) from `lm_proxy_url` before storing. Simple, invisible, matches user expectation.
Normalize on use. In `forward_request`, if `base` ends in `/v1`, skip the `/v1` prefix in `path`. Slightly more magic, but handles CLI overrides too.
Document and leave strict. Update `settings.ini` template + docs to be explicit that `lm_proxy_url` is origin-only, no `/v1`.
Preferred: (1) + better error messaging — strip the suffix during parse, and if `curl_easy_perform` fails, include the actual `curl_easy_strerror(res)` string in the error log rather than the generic "Proxy connection failed." Latter helps diagnose any remaining issue (DNS, TLS, refused) without a rebuild.
Activity
Proxy: tolerate trailing /v1 in lm_proxy_url (issue #45)
diskerror commentedon Jun 7, 2026
no longer applicable
diskerror commentedon Sep 5, 2026
Done — commit 20feb93 (Proxy: tolerate trailing /v1 in lm_proxy_url, issue #45), merged via fix/issue-45-trailing-v1 (17a12d3).