Files
magpie/internal
yetone baffcb65dd provider: Host asks a saved Gemini base without building a string again
16b8c300f made Base(Gemini) GeminiAsked(p.Gemini), which runs the base
through GeminiBase and url.Parse twice on every call. Provider.Host asks
Base for each protocol on every look, so a Gemini provider's Host
allocated 5 times a look and TestHostBuildsNoList was red on main
(e4ea31321: "d: Host allocated 5 times a look").

GeminiAsked now gives back a base that is already what geminiVersioned
would make (a scheme, a path of its own, no trailing slash, query,
fragment, /models or surrounding space) as it is, without allocating.
A bare host, a pasted endpoint and anything untrimmed still go through
geminiVersioned, so TestGeminiAsked's cases are unchanged.

Run (mica, -tags nogui): go test -run 'TestHostBuildsNoList|Gemini|Vertex'
./internal/provider ./internal/gateway ./internal/catalog ok; gofmt clean.
Red on the old code: the same test on a clean origin/main e4ea31321
worktree, "d: Host allocated 5 times a look".
2026-11-13 18:50:25 +08:00
..
…
…
…
…
…
…
…
…
…
…
…