Files
magpie/internal
yetoneandggbdpq d5fea7f02e gateway: a relay whose list names gpt-image-2 under a namespace draws it (#4432)
loscoy's retest (v0.1.2670) still got 404 "magpie knows no model
"gpt-image-2" to draw with" for the bare name a Codex harness asks for:
the relay's cached list names the family under a namespace
(openai/gpt-image-1, openai/gpt-image-2 …), and drawsFamily, which
a130035a0 narrowed to a drawer whose id starts gpt-image-, read those as
none of the family, so the relay that draws was passed over.

drawsFamily now reads each drawer by the part of its id past the last
"/". The narrowing stands: only a relay whose own list draws a GPT Image
takes the family. A new drawnAs sends the relay the id its list names
the model by (openai/gpt-image-2 for gpt-image-2), on both the images
route (resolveDrawing) and Codex's native image tool (drawingModel);
a name the list doesn't carry goes as asked, for the vendor to serve or
refuse in its own words. ggbdpq's patch (via gua2100) sent the bare name
upstream; loscoy asked whether the namespace had to be kept, and a
relay that lists only openai/… may not know the bare one, so the listed
id is sent.

Run at this tree on mote: go test ./internal/gateway -run
'Draw|Drawing|Relay|Codex|UpBytes' -count=1: ok. gofmt -l clean.
Broken by hand: drawsFamily back to the whole id: TestRelayDrawsThe
GPTImageFamilyFromANamespacedList, TestCodexNativeDrawsItsOwnModelOnA
NamespacedRelay and TestCodexNativeDrawsByTheRelaysNamespacedName red;
drawnAs returning the bare id: the first and last red.
Not tried: loscoy's real relay; the namespaced id is what its list says,
not seen on its wire.

Co-authored-by: ggbdpq <ggbdpq@gmail.com>
2026-11-03 05:08:38 +08:00
..
…
…
…
…
…
…