Repository navigation
Conversation
## summary - Derive initial new-service fields in ModelServiceForm from the selected default preset through a shared servicePresetDefaults helper also used by chooseProvider. - Fix new chat (agent) services starting with preset "custom" (OpenAI compatible) while keeping connectionType="self_hosted", authMode="none", and an empty URL, which caused trust_environment to bypass the system proxy even when proxyMode="system" was selected. - Clear stale model discovery errors when switching proxyMode. - Add unit and isolated browser assertions covering default chat preset fields and persisted connectionType/authMode. ## validation - npm test: 959 passed, 0 failed. - npm run build, npm run check:i18n, npm run check:browser-locale, npm run check:browser-manifest: all passed. - pytest tests/test_self_hosted_proxy.py tests/test_model_configs.py: 42 passed. - Isolated browser tests (Chrome + creation_server.py): tests/browser/provider_settings.mjs and tests/browser/first_run.mjs passed.
|
PASS 421680e (no linked issue)
Ran: Release checks green on 421680e (13/13, including Non-blocking: no issue is linked and the template line is unfilled, so there is no acceptance text to check this against — worth opening one so the regression has a home. Also note the product consequence: a new custom chat service now opens prefilled with a remote OpenAI URL, so anyone adding a self-hosted OpenAI-compatible endpoint has to overwrite it. That matches what Coordinator: ping after this Reviewer PASS and green CI on this SHA. This skill does not merge. |
Summary
When opening Settings → Model connections → Chat (agent) → Add service (or the first-run language-model form),
ModelServiceFormdefaultedpresetIdto"custom"(OpenAI compatible), but initialized the form state withconnectionType: "self_hosted",authMode: "none", and an emptyurlinstead of the preset's values (connectionType: "api",authMode: "bearer",url: "https://api.openai.com/v1").Because
http_settings.trust_environment()always bypasses system proxies forconnectionType == "self_hosted"origins, users configuring an OpenAI-compatible chat service behind a system proxy hitConnectErroreven after explicitly selecting Follow system proxy (proxyMode: "system")—whereas the Image tab worked because users had to manually switch fromvllm-omni-imagetoOpenAI compatible, which invokedchooseProvider("custom")and setconnectionType: "api".servicePresetDefaults()helper insrc/canvas/providerPresets.tsand use it for both initial state andchooseProvider()insrc/canvas/ModelServiceForm.tsx, keepingvideo/image/audioself-hosted defaults unchanged while aligning newagentforms with the"custom"preset.discoveryErrorwhenproxyModechanges.tests/providerPresetDefaults.test.tsand real-browser assertions intests/browser/provider_settings.mjsandtests/browser/first_run.mjsverifying the initial URL, Bearer auth state, and persistedconnectionType: "api"/authMode: "bearer".Linked issue
No existing issue applies (discovered and reproduced locally when configuring an OpenAI chat API behind a system proxy).
Fixes #NorRefs #Nis included, or no issue appliesLabels
Requested labels:
type:bug,area:provider(fork authors cannot apply repository labels directly; left for repository automation / maintainer).Test plan
npm test(959 passed, 0 failed, includingtests/providerPresetDefaults.test.ts)npm run build(tsc --noEmit && vite build)npm run check:i18n,npm run check:browser-locale,npm run check:browser-manifest.venv/bin/python -m pytest tests/test_self_hosted_proxy.py tests/test_model_configs.py(42 passed)tests/browser/creation_server.py:tests/browser/provider_settings.mjsandtests/browser/first_run.mjs(both passed)check-merge-conflict,end-of-file-fixer,mixed-line-ending,trailing-whitespace) passed on commitEvidence that it works
provider_settings.mjsandfirst_run.mjs) asserting initial OpenAI compatible URL (https://api.openai.com/v1), unchecked "No key required" checkbox, and persistedconnectionType: "api"/authMode: "bearer"receipt, plus local reproduction oftrust_environment()returningTrueforapi + systemvsFalseforself_hosted + system. No layout or visual design changed.Provider verification
creation_server.pyand in-memory HTTP mocks). A local unauthenticatedGET https://api.openai.com/v1/modelsprobe confirmedConnectErrorunderdirectvs HTTP401undersystemproxy (127.0.0.1:7897).Bilingual UI
npm run check:i18npassed with 0 issues)