Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
provider: a local server's address is a field shown first, and address= on the command line (LM Studio on another computer)
yetone41b0445ccf93
diff --git a/docs/subsystems/providers-accounts.md b/docs/subsystems/providers-accounts.mdindex 495d84f1d..0f5ad5faa 100644--- a/docs/subsystems/providers-accounts.md+++ b/docs/subsystems/providers-accounts.md@@ -54,7 +54,7 @@ keys and accounts per request is in [Gateway routing and fallback](gateway-routi| Account names and seats | `AccountNames` (by the account, in lower case, like `AccountCaps`) are names the user gives accounts, set by `SetAccountName` (GUI `provider/accountname`, `magpie accounts alias`); they live in providers.json only, never in a vendor's or plugin's sign-in. A GLM Coding Plan read with a key (`glmPlan`) and a ZCode account (built-in or `zcode-plugin`) whose windows' resets agree are one seat (`seatMatch`, #90/#953), shown once, on the account's card (`seatCards`, used by `quotas`, `Allotted` and `CachedCards`). A match is remembered in `seats.json` beside `quotas.json`: a failed read or a window with no reset yet is unknown and keeps the key's card off while the account is signed in; windows that disagree forget it (#1515). Cards carry `Seat` (the key provider's name, and the key's when it has several) and `Alias` (the user's name, else `Seat`), as `/v1/magpie/quotas`, `magpie quota` and `magpie accounts` do. Records (a trace's `who`, usage's `ProviderAccount`) keep the vendor's name, the key the user's name is kept by, and every list of them looks the name up as it is shown (`AccountShown`, `AccountShownOf`, `AccountRef.Shown`), so a request from before a rename reads by the new name too: the Routing page's accounts and requests (`userShown` in `plugins/routing/client.js`, from `/api/providers`' `accountNames`), its Several accounts pools (`onOf`), the Usage page's Accounts and the request log's Account filter (`usageapi`), `magpie usage`, and a gateway key's accounts (`AccountNames`, `/api/caller-keys`). Before plugins#310 (a renamed Kiro account read by its old name on every request after) those showed the vendor's name. | [`account_names.go`](../../internal/provider/account_names.go), [`account_seats.go`](../../internal/provider/account_seats.go) || Last served | `served.json` records when each account, plan or key last answered, shown as `lastServedAt` (#570) on `/v1/magpie/quotas` and on the Usage page's own cards (`Quotas` → `cardsServed`, this computer's cards only, the caches left alone). The Usage page and the tray panel show the last-answered account in full, and a menu bar card that follows the account in use (`codex|*`) takes the one that answered within the last hour, else `InUseLogin`'s guess, else the one that answered last at all (a plugin's accounts, #1516) (`trayInUseCard`; okingkee on X: A spent, B answering, the menu bar stayed on A). `NoteServed` calls `OnServedMoved` when a provider's answers move to another account or key, and `SwitchLogin` after a switch, so the menu bar reads its cards again at once. | [`served.go`](../../internal/provider/served.go), [`trayusage.go`](../../internal/gui/trayusage.go) || Partners | Services that pay to be listed first in the add sheet, under a heading of their own ("Partners · magpie's sponsors"). The list is `site/partners.js`, served at `usemagpie.ai/api/partners`: a change reaches users with a deploy, not a release. `Partners` never waits: it returns what was fetched last and fetches again behind the call on a process's first ask, whatever the kept list's age, and hourly after (10 minutes after a failure), keeping the list in `partners.json` in the cache folder. The magpie serving the gateway fetches it when it starts and whenever it is due, asked for or not (`KeepPartnersFresh`), so an app left open on another page still learns of a partner added. The file also says when the last fetch started (`tried`) and, when it failed, why (`error`, logged once until a fetch gets the list again), so a list that stops changing tells a fetch that fails from one that never came back (`tried` after `at`, no error) and from none asked (#3362). Each entry is checked again on every read (`validPartners`): its own id, never a built-in preset's, a name, an endpoint, https only, at most 12; what only magpie's presets may set (a decision API, no key, a user endpoint) is cleared. Its logo is fetched through `FetchIcon` and kept as an uploaded icon, used as it is while its `iconUrl` stays the same; the prune after a save of `providers.json` (`pruneIcons`) leaves the logos of the partners listed now (`keptPartnerIcons`), as it leaves a plugin's. A partner is a preset to the rest of magpie (`Preset`, `FromPreset`, the editor), and one no longer listed still is to the providers added from it (`Seen`), without the sponsored mark. The window lists a partner in the languages it names (`langs`) only and shows its tagline in the page's language (`notes`, else `en`). `MAGPIE_PARTNERS` points it elsewhere, `off` lists none; tests list none unless they name a list. How often each listed partner was shown, opened (its row, its key page) and added is counted per UTC day (`CountPartner`, capped at 20 of each and 5 adds, kept in `partner-counts.json` in the cache folder) and sent with the next day's stats event as `magpie partner` events (`internal/stats`); nothing is counted with the stats or their usage part off. A listed partner the add sheet (or the TUI's, or `magpie providers presets`) hasn't shown yet is new (`NoticePartners` keeps those shown, as `noticed` in `partners.json`, whatever the stats); the window's add button carries a small dot for it, with its name in the title, until the sheet shows it. | [`partners.go`](../../internal/provider/partners.go), [`partner_events.go`](../../internal/provider/partner_events.go), [`site/partners.js`](../../site/partners.js) |-| Local servers | A preset of `KindLocal` (Ollama, LM Studio, oMLX, MLX-Serve) is at its server's default port on this machine. Another address — a port, or another computer — is given in the window's editor, under Server address, or in the TUI (asked on adding, `w` after); on the command line the URLs themselves (`url=`, `anthropic=`, `responses=`). `AtAddress` replaces only each URL's scheme, host and port, each API keeping its path; `AddressOf` is the address an editor starts from. The window sends the URLs moved only when the address was changed, so a Save doesn't move URLs set apart (another app's import). A provider of the user's own (no preset) has `w` in the TUI too: each base URL it has is asked in turn, typed in as it is, Enter alone keeping one (`customURLsAsk`). | [`local_address.go`](../../internal/provider/local_address.go) |+| Local servers | A preset of `KindLocal` (Ollama, LM Studio, oMLX, MLX-Serve) is at its server's default port on this machine. Another address — a port, or another computer — is given in the window's editor, in its Server address field, shown first above the key and never folded (a folded one read as an LM Studio whose base URL can't be changed, mengxiangziyou on X), or in the TUI (asked on adding, `w` after); on the command line with `address=` (`atAddress` in `providers_cli.go`: every URL moves, from the preset's when the provider was saved with none, and `address=` alone puts a local server back at its preset's), or the URLs themselves (`url=`, `anthropic=`, `responses=`). `AtAddress` replaces only each URL's scheme, host and port, each API keeping its path; `AddressOf` is the address an editor starts from. The window sends the URLs moved only when the address was changed, so a Save doesn't move URLs set apart (another app's import). A provider of the user's own (no preset) has `w` in the TUI too: each base URL it has is asked in turn, typed in as it is, Enter alone keeping one (`customURLsAsk`). | [`local_address.go`](../../internal/provider/local_address.go), [`providers_cli.go`](../../internal/cli/providers_cli.go) || Protocol detection | Works out which of Chat, Responses, Anthropic Messages and Gemini generateContent a base URL speaks when a provider is added. Each is asked at the URL as it takes it (`DetectBase`); Gemini's at the `…/v1beta` beside a typed `…/v1` or bare host, a Gemini model from the list picked for it, with the key in `x-goog-api-key` (#1346). Detection, endpoint tests and model tests share `probe`, which adds `anthropic-version` only for Anthropic Messages; OpenAI probes omit that default so a relay that refuses it can answer. User-supplied headers still apply through `Sign`. The editor asks with the form as it stands, before any Save (#1545): the URL, key and models typed (`picked`, else the saved picks, else the vendor list); a key not typed again is the saved provider's, or for an unsaved copy the copied one's (`copyOf`). The probe writes nothing and adds no provider, and the route stays behind `magpie web`'s key. | [`detect.go`](../../internal/provider/detect.go), [`test.go`](../../internal/provider/test.go) || A pasted curl command | A curl command from a vendor's docs pasted into a custom provider's Base URL or API key fills the editor in (@mark_li21 on X). `curlOf` reads it as a shell would (lines joined by `\`, cmd's `^` or PowerShell's backtick; `curl.exe`; quotes and escapes), and takes: the API its URL's endpoint names (`…/chat/completions` Chat, `…/messages` Anthropic Messages, `…/responses` Responses) with the base URL before it, spelled as that API wants it (`respellURL`: Anthropic at its root, `/v1` after a bare host); the key from `Authorization: Bearer`, `x-api-key` or `api-key`, unless it only stands for one (`$OPENAI_API_KEY`, `${X}`, `%X%`, `<token>`, `YOUR_API_KEY`), when the key's box is left empty and focused; and the `model` of its JSON body, added to a new provider's models (a saved one's picks are left alone, since adding to none would narrow what it serves). A preset's editor takes only the key. A note (`editorError`, kind `note`) says what was taken, a placeholder like `{WorkspaceId}` left in the URL, and a URL with no known endpoint. Text that isn't a curl command pastes as before, several keys included. Tested on the docs' own examples (`fixtures/curl`). | [`app.js`](../../internal/gui/assets/app.js) (`curlOf`, `fromCurl`), [`provider-curl-paste.test.cjs`](../../internal/gui/tests/provider-curl-paste.test.cjs) |diff --git a/internal/cli/provider_address_cli_test.go b/internal/cli/provider_address_cli_test.gonew file mode 100644index 000000000..274641aa2--- /dev/null+++ b/internal/cli/provider_address_cli_test.go@@ -0,0 +1,90 @@+package cli++import (+ "net/http"+ "net/http/httptest"+ "strings"+ "sync"+ "testing"++ "github.com/yetone/magpie/internal/provider"+)++// An LM Studio on another computer (mengxiangziyou on X: "baseUrl 不能改"):+// address= puts the preset's provider there, its models listed from that+// server, and address= alone puts it back at the preset's port.+func TestProviderAddressMovesALocalServer(t *testing.T) {+ var mu sync.Mutex+ var asked []string+ srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ mu.Lock()+ asked = append(asked, r.Method+" "+r.URL.Path)+ mu.Unlock()+ w.Header().Set("Content-Type", "application/json")+ if r.URL.Path == "/v1/models" {+ w.Write([]byte(`{"object":"list","data":[{"id":"qwen3.5-9b-mlx","object":"model","owned_by":"organization_owner"}]}`))+ return+ }+ http.NotFound(w, r)+ }))+ defer srv.Close()++ if err := addProvider([]string{"lmstudio", "address=" + strings.TrimPrefix(srv.URL, "http://")}); err != nil {+ t.Fatal(err)+ }+ p, err := provider.Find("lmstudio")+ if err != nil {+ t.Fatal(err)+ }+ if p.Chat != srv.URL+"/v1" {+ t.Fatalf("chat %q, want %s/v1", p.Chat, srv.URL)+ }+ mu.Lock()+ got := strings.Join(asked, ",")+ mu.Unlock()+ if !strings.Contains(got, "GET /v1/models") {+ t.Fatalf("its models were not asked of the server it was moved to: %q", got)+ }+ if ids := p.Exposed(); len(ids) != 1 || ids[0].ID != "qwen3.5-9b-mlx" {+ t.Fatalf("models %+v, want the server's", ids)+ }++ // back where the preset puts it+ if err := providerCmd([]string{"provider", "set", "lmstudio", "address="}); err != nil {+ t.Fatal(err)+ }+ if p, _ = provider.Find("lmstudio"); p.Chat != "http://localhost:1234/v1" {+ t.Fatalf("chat %q after address=, want the preset's", p.Chat)+ }+}++// Every URL of a local server moves with its address, each keeping its+// path: Ollama's chat, Anthropic and decision APIs, from the preset's when+// it was saved with none; anything that is no address is refused, the URLs+// left as they were.+func TestProviderAddressPairs(t *testing.T) {+ p := provider.Provider{ID: "ollama", Name: "Ollama", Preset: "ollama"}+ if err := applyPairs(&p, []string{"address=192.168.1.5:11434"}); err != nil {+ t.Fatal(err)+ }+ if p.Chat != "http://192.168.1.5:11434/v1" || p.Anthropic != "http://192.168.1.5:11434" || p.Decide != "http://192.168.1.5:11434/v1" {+ t.Fatalf("not moved: %+v", p)+ }+ if err := applyPairs(&p, []string{"address=https://studio.lan:8443/v1"}); err != nil {+ t.Fatal(err)+ }+ if p.Chat != "https://studio.lan:8443/v1" || p.Anthropic != "https://studio.lan:8443" {+ t.Fatalf("not moved again: %+v", p)+ }+ if err := applyPairs(&p, []string{"address=ftp://box"}); err == nil || p.Chat != "https://studio.lan:8443/v1" {+ t.Fatalf("ftp://box: %v, chat %q", err, p.Chat)+ }+ // a provider of the user's own moves its own URLs+ c := provider.Provider{Name: "vLLM box", Chat: "http://10.0.0.7:8000/v1"}+ if err := applyPairs(&c, []string{"address=10.0.0.8:8001"}); err != nil || c.Chat != "http://10.0.0.8:8001/v1" {+ t.Fatalf("custom: %v, chat %q", err, c.Chat)+ }+ if err := applyPairs(&c, []string{"address="}); err == nil {+ t.Fatal("an empty address of a provider with no preset's to go back to was taken")+ }+}diff --git a/internal/cli/providers_cli.go b/internal/cli/providers_cli.goindex 92f661124..e8fb34a2c 100644--- a/internal/cli/providers_cli.go+++ b/internal/cli/providers_cli.go@@ -116,8 +116,10 @@ const providerUsage = `usage:magpie provider set my-relay search=yes(the relay answers Claude Code's WebSearch and Codex's web_search itself:those go to it as sent, not through magpie's own search)- magpie provider add ollama url=http://192.168.1.5:11434/v1 anthropic=http://192.168.1.5:11434- (Ollama, LM Studio, oMLX or MLX-Serve on another port or computer)+ magpie provider add lmstudio address=http://192.168.1.5:1234+ magpie provider set lmstudio address=192.168.1.5:1234+ (Ollama, LM Studio, oMLX or MLX-Serve on another port or computer: each of its+ URLs moves there, keeping its path; address= alone puts it back at the default)magpie provider set ollama unmasked=yes(a model on this computer or the local network: Settings' redaction leaves itsrequests as written; not for a local relay that passes them on to a vendor)@@ -924,6 +926,29 @@ func showProvider(p provider.Provider) error {return nil}+// atAddress moves p's URLs to addr (provider.AtAddress). A provider+// saved with none, the gateway taking its preset's, is moved from the+// preset's; an empty addr puts a local server's back at its preset's.+func atAddress(p *provider.Provider, addr string) error {+ pr := provider.Preset(p.Preset)+ if pr != nil && pr.Kind != provider.KindLocal {+ pr = nil+ }+ if pr != nil && (strings.TrimSpace(addr) == "" || p.Chat+p.Responses+p.Anthropic+p.Decide == "") {+ p.Chat, p.Responses, p.Anthropic, p.Decide = pr.Chat, pr.Responses, pr.Anthropic, pr.Decide+ }+ if strings.TrimSpace(addr) == "" {+ if pr == nil {+ return fmt.Errorf("address= needs an address, such as http://192.168.1.5:1234")+ }+ return nil+ }+ if p.Chat+p.Responses+p.Anthropic+p.Decide == "" {+ return fmt.Errorf("%s has no URL to move: url= gives its base URL", cmp.Or(p.Name, p.ID))+ }+ return p.AtAddress(addr)+}+func applyPairs(p *provider.Provider, pairs []string) error {workspace := ""for _, kv := range pairs {@@ -931,7 +956,7 @@ func applyPairs(p *provider.Provider, pairs []string) error {if !ok {return fmt.Errorf("expected key=value, got %q\n\n%s", kv, providerUsage)}- if p.IsVertex() && slices.Contains([]string{"url", "chat", "openai", "responses", "anthropic", "decide"}, strings.ToLower(k)) {+ if p.IsVertex() && slices.Contains([]string{"url", "chat", "openai", "responses", "anthropic", "decide", "address"}, strings.ToLower(k)) {// asked only at the address its project and location make, so// that its Google token goes nowhere else: one given here would// be dropped without a word@@ -946,6 +971,13 @@ func applyPairs(p *provider.Provider, pairs []string) error {p.Chat = vcase "responses":p.Responses = v+ case "address":+ // a local server (Ollama, LM Studio, oMLX …) on another port+ // or computer: every URL it has moves there, each API keeping+ // its path, as the window's Server address does+ if err := atAddress(p, v); err != nil {+ return err+ }case "anthropic":p.Anthropic = vcase "gemini":diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.jsindex 18fc5f89a..67a59a602 100644--- a/internal/gui/assets/app.js+++ b/internal/gui/assets/app.js@@ -9477,8 +9477,10 @@ function drawEditor(p, presetID) {// a server on this machine (Ollama, LM Studio, oMLX, MLX-Serve) can// listen on another port, or be another computer's: its address moves each URL, each API- // keeping its path, as provider.AtAddress does- let address = null, addressMore = null;+ // keeping its path, as provider.AtAddress does. Shown first and never+ // folded: folded under the key, an LM Studio on another computer read+ // as one whose base URL can't be changed (mengxiangziyou on X)+ let address = null, addressField = null;if (pr?.kind === "local") {// a saved provider's URLs (or a duplicate's) start it; a new one's are// the preset's, sent as none unless moved, so the gateway takes them@@ -9486,8 +9488,7 @@ function drawEditor(p, presetID) {// oMLX's decision API (#1641) is the same server's, and moves with itdraft.addressFrom ??= { chat: draft.chat ?? pr.chat ?? "", responses: draft.responses ?? pr.responses ?? "", anthropic: draft.anthropic ?? pr.anthropic ?? "", decide: draft.decide ?? (p?.decide || pr.decide || "") };draft.addressWas ??= own ? originOf(draft.addressFrom) : "";- const from = draft.addressFrom, addressWas = draft.addressWas;- draft.address ??= addressWas;+ draft.address ??= draft.addressWas;address = input(draft.address, originOf(pr));address.inputMode = "url";address.classList.add("address");@@ -9501,14 +9502,7 @@ function drawEditor(p, presetID) {};const keys = address.onkeydown;address.onkeydown = (e) => { keys(e); if (e.key === "Enter" && isNew) save(); };- // folded: most run where the preset says; open for one that doesn't,- // or an address typed before the editor was drawn again- addressMore = el("details", "more");- addressMore.open = (own && originOf(from) !== originOf(pr)) || draft.address.trim() !== addressWas;- addressMore.append(el("summary", "", t("Server address")));- const inner = el("div", "inner");- inner.append(...field(t("Address"), address, t("Where the server listens; change the port, or give another computer's address")));- addressMore.append(inner);+ addressField = field(t("Server address"), address, t("Where the server listens; change the port, or give another computer's address"));}// null, not false, when there is none: false?.key is undefined, and a@@ -9611,11 +9605,11 @@ function drawEditor(p, presetID) {...field(t("Service account"), box("impersonate", t("optional · a service account's email"), "vertex-impersonate"), t("Requests are then made as this service account, impersonated with the credentials above: their account needs roles/iam.serviceAccountTokenCreator on it.")),];};+ if (addressField) ed.append(...addressField);if (p?.keyList?.length) ed.append(...field(t("Accounts"), renderKeyAccounts(p), p.routing ? t("Tick every key to use; Routing says how requests spread over them.") : t("Tick every key to use. Requests go to the first; when it runs out of quota or hits a rate limit, the next ticked key takes over.")));if (p?.keyList?.filter((k) => k.on).length > 1) ed.append(...renderRouting(p));else if (vertex) ed.append(...vertexFields());else ed.append(...field(t("API key"), keyWrap, isNew ? t("Kept in ~/.config/magpie/providers.json, readable by you alone. Nothing is read from your shell.") : ""));- if (addressMore) ed.append(addressMore);// A user-defined provider can have its own picture; presets keep theirs.if (custom) ed.append(...field(t("Icon"), iconPicker(ed), ""));@@ -10129,7 +10123,7 @@ function drawEditor(p, presetID) {if (vertex && !body.vertex.project) { vertexProject?.focus({ preventScroll: true }); return editorError(t("Google Vertex AI needs the id of your Google Cloud project"), "warn"); }if (address) {const a = (draft.address || "").trim();- if (localAddress(a) === null) { addressMore.open = true; address.focus({ preventScroll: true }); return editorError(t("Address: {v} isn't an address like http://localhost:11434", { v: a }), "warn"); }+ if (localAddress(a) === null) { address.focus({ preventScroll: true }); return editorError(t("Address: {v} isn't an address like http://localhost:11434", { v: a }), "warn"); }Object.assign(body, movedURLs(draft));}editorError("");diff --git a/internal/gui/tests/local-address.test.cjs b/internal/gui/tests/local-address.test.cjsindex 7d6927a73..157ee662d 100644--- a/internal/gui/tests/local-address.test.cjs+++ b/internal/gui/tests/local-address.test.cjs@@ -1,9 +1,8 @@// Run with Node's test runner and Playwright on the module path; see README.md.// A server on this machine (Ollama, LM Studio, oMLX) is reached at another-// port, or on another computer, by its Address, under the key in a Server-// address section that is folded unless the provider is somewhere other-// than the preset's default, or an address typed or refused needs it open.-// The Address is empty with the preset's as its placeholder when it is+// port, or on another computer, by its Server address: a field shown first,+// above the key, and never folded away (mengxiangziyou on X read a folded+// one as an LM Studio whose base URL can't be changed). It is empty with the preset's as its placeholder when it is// added, the saved one's when it is edited. The// Endpoints follow what is typed, each API keeping its path; Add or Save// sends the URLs moved there, and one that left it alone sends them as@@ -97,8 +96,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",};const ed = page.locator(".editor");const address = ed.locator("input.address");- const more = ed.locator("details.more", { has: page.locator("input.address") });- const isOpen = () => more.evaluate((d) => d.open);+ const shown = () => address.isVisible();const eps = async () => (await ed.locator(".eps code").allTextContents()).join(" ");const press = async (name) => {const n = saves.length;@@ -114,21 +112,17 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",return asks.at(-1);};- // added: folded under the key, Server address its summary+ // added: shown at once, Server address its label, above the keyawait page.locator("#addProvider").click();await page.locator("#addSheet .tile .n", { hasText: /^Ollama$/ }).click();await ed.locator(".ehead b", { hasText: "Ollama" }).waitFor();- assert.equal(await isOpen(), false, "folded when added");- assert.equal(await address.isVisible(), false);- const summary = more.locator("summary");- assert.equal(await summary.textContent(), w.more);+ assert.equal(await shown(), true, "shown when added, nothing to open");+ assert.equal(await ed.locator("details.more", { has: page.locator("input.address") }).count(), 0, "in no fold");+ assert.equal(await ed.locator("label", { hasText: new RegExp("^" + w.more + "$") }).count(), 1);const key = ed.locator("input[type=password]").first();- assert((await key.boundingBox()).y < (await summary.boundingBox()).y, "the section under the key");- await shot("folded");- // opened: empty, the preset's address its placeholder- await summary.click();- assert.equal(await address.isVisible(), true);- assert.equal(await ed.locator("label", { hasText: new RegExp("^" + w.field + "$") }).count(), 1);+ assert((await address.boundingBox()).y < (await key.boundingBox()).y, "the address above the key");+ await shot("added");+ // empty, the preset's address its placeholderassert.equal(await address.inputValue(), "");assert.equal(await address.getAttribute("placeholder"), "http://localhost:11434");assert.equal(await address.locator("xpath=following-sibling::div[contains(@class,'hint')]").textContent(), w.hint);@@ -136,13 +130,10 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",assert(box.width >= 200 && box.x + box.width <= width, `the field keeps its width: ${JSON.stringify(box)}`);assert.equal(await eps(), "http://localhost:11434/v1 http://localhost:11434");- // no address: said, opened, focused, nothing sent, the page where it was+ // no address: said, focused, nothing sent, the page where it wasawait address.fill("ftp://box");- await summary.click();- assert.equal(await isOpen(), false);const y = await page.evaluate(() => document.scrollingElement.scrollTop);assert.equal(await press(w.add), null);- assert.equal(await isOpen(), true, "opened for the refused address");assert.equal(await ed.locator(".editor-error").textContent(), w.bad);assert.equal(await page.evaluate(() => document.activeElement?.classList.contains("address")), true);assert.equal(await page.evaluate(() => document.scrollingElement.scrollTop), y);@@ -163,7 +154,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",// edited: the address it is at; left alone, none is sentawait page.locator(".row.provider", { hasText: /^oMLX$|oMLX(?! Apart)/ }).first().click();await ed.locator(".ehead b", { hasText: /^oMLX$/ }).waitFor();- assert.equal(await isOpen(), true, "open for an address not the preset's");+ assert.equal(await shown(), true);assert.equal(await address.inputValue(), "http://192.168.1.5:8000");let s = await press(w.save);assert.equal("address" in s, false);@@ -201,7 +192,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",// URLs set apart, saved with the address untouched, stay apartawait page.locator(".row.provider", { hasText: "oMLX Apart" }).click();await ed.locator(".ehead b", { hasText: "oMLX Apart" }).waitFor();- assert.equal(await isOpen(), true);+ assert.equal(await shown(), true);assert.equal(await address.inputValue(), "http://10.0.0.2:8000");const apartEps = "http://10.0.0.2:8000/v1 http://10.0.0.3:9000";assert.equal(await eps(), apartEps);@@ -243,10 +234,11 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",assert.equal(s.chat, "http://10.0.0.2:8000/v1");assert.equal(s.anthropic, "http://10.0.0.3:9000");- // one where the preset puts it: folded, and saved as it is+ // one where the preset puts it: shown too, there to change, and+ // saved as it isawait page.locator(".row.provider", { hasText: "LM Studio" }).click();await ed.locator(".ehead b", { hasText: "LM Studio" }).waitFor();- assert.equal(await isOpen(), false, "folded at the preset's address");+ assert.equal(await shown(), true, "shown at the preset's address");assert.equal(await address.inputValue(), "http://localhost:1234");s = await press(w.save);assert.equal("address" in s, false);