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
fix(providers): canonicalize baseUrl across paste/test/save/inference
Users pasting the full inference endpoint URL (e.g. .../v1/chat/completions)
caused the /models probe to build nonsense paths like .../v1/chat/completions/v1/models,
which many OpenAI-compatible gateways black-hole into "connection timeout".
Hardcoded /v1 also corrupted vendors that use other version segments:
Zhipu GLM (/api/paas/v4), Volcengine (/api/v3), Google AI Studio (/v1beta/openai).
Centralize all base-URL handling in @open-codesign/shared:
- stripInferenceEndpointSuffix: strip query/hash/trailing slash/endpoint suffix
- ensureVersionedBase: trust any /v<n>[a-z\d]* segment; default /v1 otherwise
- canonicalBaseUrl(url, wire): wire-aware root for config + SDK
- modelsEndpointUrl(url, wire): GET /models URL for the Test button
Wire into every call site so paste -> test -> save -> inference all resolve
to the same base: connection-ipc.buildEndpointForWire, onboarding-ipc
.runListEndpointModels, AddCustomProviderModal.handleSave, and
core/agent.buildPiModel (defensive net for legacy configs).
0 commit comments