catalog: OpenRouter's image models come from /models?output_modalities=image, free variants too (AllenH__ on X)
recraft/recraft-v4.1-flash-v2:free wasn't among OpenRouter's image
models (AllenH__ on X, tweet 2121621559152673242). magpie read them
from /api/v1/images/models, which lists every image model but none of
their variants: on 2026-11-14 its 68 rows had recraft-v4.1-flash-v2 and
not the :free one. /api/v1/models?output_modalities=image, keyless too,
lists all 68 plus the :free variant plus the three routers
(openrouter/auto, auto-beta, auto-code, output text+image). Each row
there names its endpoints; the free one's is ["/api/v1/images"].
PublicCatalogs now asks that URL for openrouter.ai. openRouterDrawer
keeps a row whose output has an image and, when its endpoints are a
list, one asked at /api/v1/images, so the routers stay out. The free
model's output is ["image"] alone, so answersInImages sends it to
OpenRouter's /images under its own id, ":free" included, as the other
Recraft models go. The site's OpenRouter page (en, zh, ja) and
llms-full.txt say the new URL.
Tests:
- TestOpenRouterImageModelsComeFromItsImageAPI serves
testdata/openrouter_models_image_2026-11-14.json, the whole
/models?output_modalities=image answer recorded from openrouter.ai, and
wants 69 image models with the :free one and no router. On the old
public.go it is red ("asked 0 times"). With the endpoints check
broken by hand it is red (71 models, auto-beta and auto-code listed).
- TestOpenRouterImageOnlyModelsDrawAtItsImageAPI also draws
openrouter/recraft/recraft-v4.1-flash-v2:free and checks it goes to
/api/v1/images with model "recraft/recraft-v4.1-flash-v2:free". It
passes on the old code too, because it guards the path after the list,
not the list.
- The /images/models fixture of 2026-11-06 is gone. The fakes in
decide_openrouter_variant_test and multiproto_paged_test answer the
new URL.
Run (mote, through mote-run):
- At e7ae50043 (this change on 1edebf050): gofmt -l; go vet ./...;
GOOS=linux go vet -tags nogui ./...; GOOS=windows go vet ./...;
GOOS=linux go build -tags nogui; GOOS=windows go build;
go test -tags nogui -timeout 45m ./...: 100 ok, one red,
TestNoEagerPackageRegexps on internal/gateway/chatpage.go. That is
main's (6bdeedc6f), fixed by 0968cc68a. An earlier full run at
1107219fb (on 0b8c4bfc3) had cli's TestEveryRouteHasACommandOrIsNamed
and tui's TestEveryWordHasZh red. Both were main's, fixed by 4c86b0ab4
and e9fcc6229.
- At e111cccb2 (this change on 0968cc68a; the pushed head adds only
dd9cd59a1's routing GUI files beneath it): vet on three OSes and
go test -count=1 for ., internal/catalog, internal/provider and
internal/gateway: all four ok (gateway 1059s).
- site: node --test *.test.mjs, 121 pass; node llms-full.mjs.
- Real list: catalog.PublicDrawers against the real openrouter.ai gave
69 image models, recraft/recraft-v4.1-flash-v2:free among them
("Recraft V4.1 Flash V2 (free)", [image]), and no openrouter/auto.
Not tried: a real generation with the free model. The owner's
OpenRouter key answers 401 "User not found" (checked on /api/v1/key, and
through a sandbox magpie on mote). No GUI files changed, so no GUI run.
This commit is contained in:
@@ -20,10 +20,13 @@ import (
|
||||
// there; FLUX, Seedream, Riverflow, Recraft, GPT Image and the rest, which
|
||||
// answer with an image alone, are listed by its Image API's own
|
||||
// /images/models (iwinux on Discord). They draw at its /images, as the
|
||||
// gateway asks it.
|
||||
// gateway asks it. That list leaves out a model's variants, though:
|
||||
// recraft/recraft-v4.1-flash-v2:free is listed by /models asked for image
|
||||
// output alone (AllenH__ on X), which lists every model /images/models
|
||||
// does as well, each row with the endpoints it is asked at.
|
||||
var PublicCatalogs = map[string]string{
|
||||
"aihubmix.com": "https://aihubmix.com/api/v1/models",
|
||||
"openrouter.ai": "https://openrouter.ai/api/v1/images/models",
|
||||
"openrouter.ai": "https://openrouter.ai/api/v1/models?output_modalities=image",
|
||||
}
|
||||
|
||||
// PublicDrawers are the image models the public catalog for base's host
|
||||
@@ -63,7 +66,9 @@ func PublicDrawers(ctx context.Context, base string) []Model {
|
||||
var out []Model
|
||||
for _, raw := range list.Data {
|
||||
if d, ok := openRouterDrawer(raw); ok {
|
||||
out = append(out, d)
|
||||
if d.ID != "" {
|
||||
out = append(out, d)
|
||||
}
|
||||
continue
|
||||
}
|
||||
var m struct {
|
||||
@@ -94,11 +99,14 @@ func PublicDrawers(ctx context.Context, base string) []Model {
|
||||
return out
|
||||
}
|
||||
|
||||
// openRouterDrawer reads a row of OpenRouter's /images/models: {"id",
|
||||
// "name": "Black Forest Labs: FLUX.2 Pro", "created": <unix seconds>,
|
||||
// "architecture": {"input_modalities", "output_modalities"}}. Every one it
|
||||
// lists makes images; one whose output has no image isn't kept. ok is false
|
||||
// for a row of another shape (AIHubMix's model_id).
|
||||
// openRouterDrawer reads a row of OpenRouter's /models?output_modalities=image
|
||||
// or /images/models: {"id", "name": "Black Forest Labs: FLUX.2 Pro",
|
||||
// "created": <unix seconds>, "architecture": {"input_modalities",
|
||||
// "output_modalities"}, "endpoints"}. One whose output has no image isn't
|
||||
// kept, nor, when its endpoints are a list (/models'), one not asked at
|
||||
// /api/v1/images: openrouter/auto, a router that may answer with an image.
|
||||
// ok is false for a row of another shape (AIHubMix's model_id), and a
|
||||
// row of OpenRouter's that isn't kept is ok with no ID.
|
||||
func openRouterDrawer(raw json.RawMessage) (Model, bool) {
|
||||
var m struct {
|
||||
ID string `json:"id"`
|
||||
@@ -108,10 +116,16 @@ func openRouterDrawer(raw json.RawMessage) (Model, bool) {
|
||||
In []string `json:"input_modalities"`
|
||||
Out []string `json:"output_modalities"`
|
||||
} `json:"architecture"`
|
||||
// /images/models' is the URL of the model's endpoints, a string
|
||||
Endpoints json.RawMessage `json:"endpoints"`
|
||||
}
|
||||
if json.Unmarshal(raw, &m) != nil || m.ID == "" || m.Architecture == nil || !slices.Contains(m.Architecture.Out, "image") {
|
||||
return Model{}, false
|
||||
}
|
||||
var at []string
|
||||
if json.Unmarshal(m.Endpoints, &at) == nil && at != nil && !slices.Contains(at, "/api/v1/images") {
|
||||
return Model{}, true
|
||||
}
|
||||
d := Model{ID: m.ID, Name: m.Name, Draws: true, OutputModalities: Kinds(m.Architecture.Out)}
|
||||
// the vendor's prefix ("Black Forest Labs: ") is the provider's to say
|
||||
if _, rest, ok := strings.Cut(d.Name, ": "); ok && rest != "" {
|
||||
|
||||
@@ -370,16 +370,18 @@ func TestOpenRouterImageOnlyModelsDrawAtItsImageAPI(t *testing.T) {
|
||||
if err := catalog.SaveLive("openrouter", "https://openrouter.ai/api/v1", []catalog.Model{
|
||||
{ID: "sourceful/riverflow-v2-fast", Draws: true, OutputModalities: []string{"image"}},
|
||||
{ID: "recraft/recraft-v4-vector", Draws: true, OutputModalities: []string{"image"}},
|
||||
{ID: "recraft/recraft-v4.1-flash-v2:free", Draws: true, OutputModalities: []string{"image"}},
|
||||
{ID: "google/gemini-2.5-flash-image", Draws: true, OutputModalities: []string{"image", "text"}},
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
p, _ := provider.Find("openrouter")
|
||||
for model, want := range map[string]drawVia{
|
||||
"sourceful/riverflow-v2-fast": viaImages,
|
||||
"recraft/recraft-v4-vector": viaImages,
|
||||
"google/gemini-2.5-flash-image": viaChat,
|
||||
"openai/gpt-5-image": viaChat,
|
||||
"sourceful/riverflow-v2-fast": viaImages,
|
||||
"recraft/recraft-v4-vector": viaImages,
|
||||
"recraft/recraft-v4.1-flash-v2:free": viaImages,
|
||||
"google/gemini-2.5-flash-image": viaChat,
|
||||
"openai/gpt-5-image": viaChat,
|
||||
} {
|
||||
if got := viaFor(*p, model); got != want {
|
||||
t.Errorf("%s: %s, want %s", model, got, want)
|
||||
@@ -411,6 +413,12 @@ func TestOpenRouterImageOnlyModelsDrawAtItsImageAPI(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// a variant (AllenH__ on X) is asked by its own id, ":free" and all
|
||||
got, path = nil, ""
|
||||
code, _, raw := postImages(t, s, "/v1/images/generations", "application/json", `{"model":"openrouter/recraft/recraft-v4.1-flash-v2:free","prompt":"a magpie"}`)
|
||||
if code != http.StatusOK || path != "/api/v1/images" || got["model"] != "recraft/recraft-v4.1-flash-v2:free" {
|
||||
t.Fatalf("the free Recraft: %d at %q as %v: %s", code, path, got["model"], raw)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOpenRouterImagesAPIFailureIsReturnedWithoutChatRetry(t *testing.T) {
|
||||
|
||||
@@ -25,7 +25,8 @@ const (
|
||||
)
|
||||
|
||||
// fakeOpenRouterLists serves orChatList and orDecisionsList for
|
||||
// openrouter.ai, and an empty image model list (/images/models), and
|
||||
// openrouter.ai, and an empty image model list
|
||||
// (/models?output_modalities=image), and
|
||||
// records the path and model of every other request.
|
||||
func fakeOpenRouterLists(t *testing.T) (asked func() []string) {
|
||||
t.Helper()
|
||||
@@ -33,17 +34,16 @@ func fakeOpenRouterLists(t *testing.T) (asked func() []string) {
|
||||
var got []string
|
||||
srv := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path == "/api/v1/models" {
|
||||
if r.URL.Query().Get("output_modalities") == "decisions" {
|
||||
switch r.URL.Query().Get("output_modalities") {
|
||||
case "decisions":
|
||||
w.Write([]byte(orDecisionsList))
|
||||
} else {
|
||||
case "image":
|
||||
w.Write([]byte(`{"data":[]}`))
|
||||
default:
|
||||
w.Write([]byte(orChatList))
|
||||
}
|
||||
return
|
||||
}
|
||||
if r.URL.Path == "/api/v1/images/models" {
|
||||
w.Write([]byte(`{"data":[]}`))
|
||||
return
|
||||
}
|
||||
var q struct{ Model string }
|
||||
json.NewDecoder(r.Body).Decode(&q)
|
||||
mu.Lock()
|
||||
|
||||
@@ -245,8 +245,9 @@ func TestFetchDoesNotMergeOpenRoutersNamespacedList(t *testing.T) {
|
||||
t.Errorf("asked the Anthropic base %d times, want none", n)
|
||||
}
|
||||
// the fetch is the Chat base's list and the image models' list
|
||||
// (/images/models, catalog.PublicCatalogs), where before this it asked
|
||||
// the Anthropic base as well and merged a page of the catalog this one is
|
||||
// (/models?output_modalities=image, catalog.PublicCatalogs), where
|
||||
// before this it asked the Anthropic base as well and merged a page of
|
||||
// the catalog this one is
|
||||
if n := urls(); n != 2 {
|
||||
t.Errorf("asked %d URLs, want the Chat base's list and the image models'", n)
|
||||
}
|
||||
|
||||
@@ -14,31 +14,34 @@ import (
|
||||
|
||||
// OpenRouter's /models lists only the models that answer in text, so its
|
||||
// image models were Nano Banana and GPT-5 Image alone; FLUX, Seedream,
|
||||
// Riverflow, Recraft, GPT Image and the rest are listed by its Image API's
|
||||
// /images/models, which needs no key (iwinux on Discord). The fixtures are
|
||||
// rows of what openrouter.ai answered both on 2026-11-06, served at its
|
||||
// own host.
|
||||
// Riverflow, Recraft, GPT Image and the rest answer with an image alone
|
||||
// (iwinux on Discord). /images/models listed those but no model's
|
||||
// variants, so recraft/recraft-v4.1-flash-v2:free was in no list magpie
|
||||
// read (AllenH__ on X); /models?output_modalities=image, which needs no
|
||||
// key, lists both. The fixtures are what openrouter.ai answered: /models
|
||||
// (rows of it) on 2026-11-06, and /models?output_modalities=image, whole,
|
||||
// on 2026-11-14, served at its own host.
|
||||
func TestOpenRouterImageModelsComeFromItsImageAPI(t *testing.T) {
|
||||
oneHome(t)
|
||||
models, err := os.ReadFile("testdata/openrouter_models_2026-11-06.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
images, err := os.ReadFile("testdata/openrouter_images_models_2026-11-06.json")
|
||||
images, err := os.ReadFile("testdata/openrouter_models_image_2026-11-14.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var asked atomic.Int32
|
||||
srv := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case "/api/v1/models":
|
||||
w.Write(models)
|
||||
case "/api/v1/images/models":
|
||||
switch {
|
||||
case r.URL.Path == "/api/v1/models" && r.URL.Query().Get("output_modalities") == "image":
|
||||
asked.Add(1)
|
||||
if r.Header.Get("Authorization") != "" {
|
||||
t.Errorf("the image model list was sent the key")
|
||||
}
|
||||
w.Write(images)
|
||||
case r.URL.Path == "/api/v1/models" && r.URL.RawQuery == "":
|
||||
w.Write(models)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
@@ -59,7 +62,7 @@ func TestOpenRouterImageModelsComeFromItsImageAPI(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if asked.Load() != 1 {
|
||||
t.Fatalf("/images/models asked %d times", asked.Load())
|
||||
t.Fatalf("/models?output_modalities=image asked %d times", asked.Load())
|
||||
}
|
||||
for _, m := range chat {
|
||||
if m.ID == "black-forest-labs/flux.2-pro" || m.ID == "recraft/recraft-v4-vector" {
|
||||
@@ -76,17 +79,22 @@ func TestOpenRouterImageModelsComeFromItsImageAPI(t *testing.T) {
|
||||
for _, id := range []string{
|
||||
// from /models, as before
|
||||
"google/gemini-2.5-flash-image", "openai/gpt-5-image",
|
||||
// from /images/models
|
||||
// from /models?output_modalities=image, what /images/models lists
|
||||
"black-forest-labs/flux.2-pro", "bytedance-seed/seedream-4.5", "sourceful/riverflow-v2-fast",
|
||||
"recraft/recraft-v4-vector", "recraft/recraft-v4.1-flash", "openai/gpt-image-2",
|
||||
"x-ai/grok-imagine-image-2.0", "krea/krea-2-medium", "microsoft/mai-image-2.5",
|
||||
"recraft/recraft-v4.1-flash-v2",
|
||||
// and what it leaves out
|
||||
"recraft/recraft-v4.1-flash-v2:free",
|
||||
} {
|
||||
if _, ok := got[id]; !ok {
|
||||
t.Errorf("%s isn't among the image models", id)
|
||||
}
|
||||
}
|
||||
if len(got) != 11 {
|
||||
t.Errorf("%d image models, want 11: %v", len(got), slices.Sorted(func(yield func(string) bool) {
|
||||
// the list's 72 rows but its three routers (openrouter/auto,
|
||||
// auto-beta, auto-code)
|
||||
if len(got) != 69 {
|
||||
t.Errorf("%d image models, want 69: %v", len(got), slices.Sorted(func(yield func(string) bool) {
|
||||
for id := range got {
|
||||
if !yield(id) {
|
||||
return
|
||||
@@ -94,8 +102,16 @@ func TestOpenRouterImageModelsComeFromItsImageAPI(t *testing.T) {
|
||||
}
|
||||
}))
|
||||
}
|
||||
if _, ok := got["openrouter/auto"]; ok {
|
||||
t.Error("openrouter/auto, a router that may answer with an image, is listed as an image model")
|
||||
for _, id := range []string{"openrouter/auto", "openrouter/auto-beta", "openrouter/auto-code"} {
|
||||
if _, ok := got[id]; ok {
|
||||
t.Errorf("%s, a router that may answer with an image, is listed as an image model", id)
|
||||
}
|
||||
}
|
||||
// the free one answers with an image alone, so the gateway asks it at
|
||||
// /images as the rest (answersInImages)
|
||||
if free := got["recraft/recraft-v4.1-flash-v2:free"]; free.Name != "Recraft V4.1 Flash V2 (free)" ||
|
||||
!slices.Equal(free.OutputModalities, []string{"image"}) || free.Images {
|
||||
t.Errorf("the free Recraft kept as %+v", free)
|
||||
}
|
||||
flux := got["black-forest-labs/flux.2-pro"]
|
||||
if flux.Name != "FLUX.2 Pro" {
|
||||
|
||||
@@ -1,571 +0,0 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": "recraft/recraft-v4.1-flash",
|
||||
"name": "Recraft: Recraft V4.1 Flash",
|
||||
"description": "Recraft V4.1 Flash is a text-to-image model from Recraft, the speed and cost tier of the V4.1 family. It generates ~1K raster images in about 1.5 seconds end to end,...",
|
||||
"created": 1790177946,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"4:3",
|
||||
"3:4",
|
||||
"16:9",
|
||||
"9:16",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 6
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/recraft/recraft-v4.1-flash/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "x-ai/grok-imagine-image-2.0",
|
||||
"name": "xAI: Grok Imagine Image 2.0",
|
||||
"description": "Grok Imagine Image 2.0 is an image generation and editing model from xAI. It is suited for creating images from text prompts and editing images from references, with low and...",
|
||||
"created": 1786486044,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"resolution": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1K",
|
||||
"2K"
|
||||
]
|
||||
},
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"3:4",
|
||||
"4:3",
|
||||
"9:16",
|
||||
"16:9",
|
||||
"2:3",
|
||||
"3:2",
|
||||
"9:19.5",
|
||||
"19.5:9",
|
||||
"9:20",
|
||||
"20:9",
|
||||
"1:2",
|
||||
"2:1",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"quality": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"low",
|
||||
"medium"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 3
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/x-ai/grok-imagine-image-2.0/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "krea/krea-2-medium",
|
||||
"name": "Krea: Krea 2 Medium",
|
||||
"description": "Krea 2 Medium is Krea's balanced, cost-efficient image generation model and a practical starting point for a broad range of use cases. Its extensive post-training supports stable, consistent generations, with...",
|
||||
"created": 1784574928,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"resolution": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1K"
|
||||
]
|
||||
},
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"4:3",
|
||||
"3:2",
|
||||
"16:9",
|
||||
"4:5",
|
||||
"2:3",
|
||||
"9:16"
|
||||
]
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 1
|
||||
},
|
||||
"seed": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/krea/krea-2-medium/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "openai/gpt-image-2",
|
||||
"name": "OpenAI: GPT Image 2",
|
||||
"description": "OpenAI's latest image generation model. Supports high-fidelity image generation and editing via the dedicated Images API.",
|
||||
"created": 1782264714,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"3:2",
|
||||
"2:3",
|
||||
"4:3",
|
||||
"3:4",
|
||||
"16:9",
|
||||
"9:16",
|
||||
"21:9",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"quality": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"auto",
|
||||
"low",
|
||||
"medium",
|
||||
"high"
|
||||
]
|
||||
},
|
||||
"background": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"auto",
|
||||
"opaque"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 10
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 16
|
||||
},
|
||||
"output_compression": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 100
|
||||
}
|
||||
},
|
||||
"supports_streaming": true,
|
||||
"endpoints": "/api/v1/images/models/openai/gpt-image-2/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "microsoft/mai-image-2.5",
|
||||
"name": "Microsoft AI: MAI-Image-2.5",
|
||||
"description": "Microsoft AI's MAI-Image-2.5 is a high-quality image generation model available via Azure AI Foundry. It produces photorealistic and artistic images from text prompts with support for various aspect ratios.",
|
||||
"created": 1780424896,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"4:3",
|
||||
"3:4",
|
||||
"16:9",
|
||||
"9:16",
|
||||
"3:2",
|
||||
"2:3",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/microsoft/mai-image-2.5/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "recraft/recraft-v4-vector",
|
||||
"name": "Recraft: Recraft V4 Vector",
|
||||
"description": "Recraft V4 Vector is the vector (SVG) variant of Recraft V4. It supports text and image inputs and produces vector image output across multiple aspect ratios. Compared to the raster...",
|
||||
"created": 1778707333,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"4:3",
|
||||
"3:4",
|
||||
"16:9",
|
||||
"9:16",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"output_format": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"svg"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 6
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/recraft/recraft-v4-vector/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "sourceful/riverflow-v2-fast",
|
||||
"name": "Sourceful: Riverflow V2 Fast",
|
||||
"description": "Riverflow V2 Fast is the fastest variant of Sourceful's Riverflow 2.0 lineup, best for production deployments and latency-critical workflows. The Riverflow 2.0 series represents SOTA performance on image generation and...",
|
||||
"created": 1770051423,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"resolution": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1K",
|
||||
"2K",
|
||||
"4K"
|
||||
]
|
||||
},
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"4:3",
|
||||
"3:4",
|
||||
"3:2",
|
||||
"2:3",
|
||||
"16:9",
|
||||
"9:16",
|
||||
"21:9",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 4
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/sourceful/riverflow-v2-fast/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "bytedance-seed/seedream-4.5",
|
||||
"name": "ByteDance Seed: Seedream 4.5",
|
||||
"description": "Seedream 4.5 is the latest in-house image generation model developed by ByteDance. Compared with Seedream 4.0, it delivers comprehensive improvements, especially in editing consistency, including better preservation of subject details,...",
|
||||
"created": 1766519506,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"image",
|
||||
"text"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"resolution": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1K",
|
||||
"2K",
|
||||
"4K"
|
||||
]
|
||||
},
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"1:2",
|
||||
"2:1",
|
||||
"2:3",
|
||||
"3:2",
|
||||
"3:4",
|
||||
"4:3",
|
||||
"4:5",
|
||||
"5:4",
|
||||
"9:16",
|
||||
"16:9",
|
||||
"9:19.5",
|
||||
"19.5:9",
|
||||
"9:20",
|
||||
"20:9",
|
||||
"9:21",
|
||||
"21:9",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 10
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 14
|
||||
},
|
||||
"seed": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/bytedance-seed/seedream-4.5/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "black-forest-labs/flux.2-pro",
|
||||
"name": "Black Forest Labs: FLUX.2 Pro",
|
||||
"description": "A high-end image generation and editing model focused on frontier-level visual quality and reliability. It delivers strong prompt adherence, stable lighting, sharp textures, and consistent character/style reproduction across multi-reference inputs....",
|
||||
"created": 1764030274,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"text",
|
||||
"image"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"4:3",
|
||||
"3:4",
|
||||
"3:2",
|
||||
"2:3",
|
||||
"16:9",
|
||||
"9:16",
|
||||
"21:9",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"output_format": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"png",
|
||||
"jpeg"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 8
|
||||
},
|
||||
"seed": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/black-forest-labs/flux.2-pro/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "openai/gpt-5-image",
|
||||
"name": "OpenAI: GPT-5 Image",
|
||||
"description": "[GPT-5](https://openrouter.ai/openai/gpt-5) Image combines OpenAI's GPT-5 model with state-of-the-art image generation capabilities. It offers major improvements in reasoning, code quality, and user experience while incorporating GPT Image 1's superior instruction following,...",
|
||||
"created": 1760447986,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"image",
|
||||
"text",
|
||||
"file"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"3:2",
|
||||
"2:3",
|
||||
"auto"
|
||||
]
|
||||
},
|
||||
"quality": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"auto",
|
||||
"low",
|
||||
"medium",
|
||||
"high"
|
||||
]
|
||||
},
|
||||
"background": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"auto",
|
||||
"transparent",
|
||||
"opaque"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 10
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 16
|
||||
},
|
||||
"output_compression": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 100
|
||||
}
|
||||
},
|
||||
"supports_streaming": true,
|
||||
"endpoints": "/api/v1/images/models/openai/gpt-5-image/endpoints"
|
||||
},
|
||||
{
|
||||
"id": "google/gemini-2.5-flash-image",
|
||||
"name": "Google: Nano Banana (Gemini 2.5 Flash Image)",
|
||||
"description": "Gemini 2.5 Flash Image, a.k.a. \"Nano Banana,\" is now generally available. It is a state of the art image generation model with contextual understanding. It is capable of image generation,...",
|
||||
"created": 1759870431,
|
||||
"architecture": {
|
||||
"input_modalities": [
|
||||
"image",
|
||||
"text"
|
||||
],
|
||||
"output_modalities": [
|
||||
"image",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"supported_parameters": {
|
||||
"aspect_ratio": {
|
||||
"type": "enum",
|
||||
"values": [
|
||||
"1:1",
|
||||
"2:3",
|
||||
"3:2",
|
||||
"3:4",
|
||||
"4:3",
|
||||
"4:5",
|
||||
"5:4",
|
||||
"9:16",
|
||||
"16:9",
|
||||
"21:9"
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"type": "range",
|
||||
"min": 1,
|
||||
"max": 1
|
||||
},
|
||||
"input_references": {
|
||||
"type": "range",
|
||||
"min": 0,
|
||||
"max": 3
|
||||
}
|
||||
},
|
||||
"supports_streaming": false,
|
||||
"endpoints": "/api/v1/images/models/google/gemini-2.5-flash-image/endpoints"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -233,7 +233,7 @@ magpie provider test openrouter</pre></div>
|
||||
<li><b>一覧の出どころ。</b>magpie は <code>https://openrouter.ai/api/v1/models</code> から一覧を取ります。各モデルのコンテキスト長もここから読みます。モデル名・推論レベル・価格は models.dev の <code>openrouter</code> カタログから来ます。</li>
|
||||
<li><b>ツールに見えるモデル。</b>OpenRouter のモデルは何百もあります。自分で選ばない限り、magpie は OpenRouter の一覧の先頭 24 個(新しい順)をツールに見せます。残りはプロバイダのモデル一覧で選ぶか、<span class="ui">系列の最新のみ</span> をオンにして各系列の最新だけに絞ります。</li>
|
||||
<li><b>新しいモデル。</b><code>auto-include</code> のルールに合うモデルはすぐに加わり、あとで一覧に初めて載ったものも加わります。<code>refresh-every</code> を設定すると、magpie が一覧を自分で取り直します。</li>
|
||||
<li><b>画像モデル。</b>OpenRouter の <code>/models</code> にはテキストモデルしか載らないので、FLUX・Seedream・Riverflow・Recraft・GPT Image などの画像モデルは <code>/api/v1/images/models</code> から読みます。<span class="ui">設定 → モデル → 画像</span> で選びます。</li>
|
||||
<li><b>画像モデル。</b>OpenRouter の <code>/models</code> にはテキストモデルしか載らないので、FLUX・Seedream・Riverflow・Recraft・GPT Image などの画像モデルとその無料版は <code>/api/v1/models?output_modalities=image</code> から読みます。<span class="ui">設定 → モデル → 画像</span> で選びます。</li>
|
||||
<li><b>判定モデル。</b>OpenRouter の判定モデル(<code>liquid/d1</code>、<code>cloudflare/clef</code>、<code>~typesafe/jev-latest</code> など)も一覧に入るので、ルーティンググループは同じキーで各ターンを分類できます。</li>
|
||||
</ul>
|
||||
<div class="code"><span class="lang">ターミナル</span><button class="copy" data-copy="ex-models">コピー</button><pre id="ex-models">magpie provider models openrouter +anthropic/claude-opus-5.5 # 一つ追加で見せる
|
||||
|
||||
@@ -233,7 +233,7 @@ magpie provider test openrouter</pre></div>
|
||||
<li><b>Where it comes from.</b> magpie fetches the list from <code>https://openrouter.ai/api/v1/models</code>, which gives each model’s context length. Names, reasoning levels and prices come from the <code>openrouter</code> catalog on models.dev.</li>
|
||||
<li><b>Which models agents see.</b> OpenRouter lists hundreds. Unless you pick some, magpie shows agents the first 24 OpenRouter lists, newest first. Pick the rest in the provider’s model list, or turn on <span class="ui">Best in family</span> to keep only the newest of each family.</li>
|
||||
<li><b>New models.</b> <code>auto-include</code> rules expose matching models now and each one a later fetch lists for the first time, and <code>refresh-every</code> has magpie fetch the list again by itself.</li>
|
||||
<li><b>Image models.</b> OpenRouter’s <code>/models</code> lists text models only, so magpie reads image models such as FLUX, Seedream, Riverflow, Recraft and GPT Image from <code>/api/v1/images/models</code>. Choose one in <span class="ui">Settings → Models → Images</span>.</li>
|
||||
<li><b>Image models.</b> OpenRouter’s <code>/models</code> lists text models only, so magpie reads image models such as FLUX, Seedream, Riverflow, Recraft and GPT Image, and their free variants, from <code>/api/v1/models?output_modalities=image</code>. Choose one in <span class="ui">Settings → Models → Images</span>.</li>
|
||||
<li><b>Decision models.</b> OpenRouter’s decision models (<code>liquid/d1</code>, <code>cloudflare/clef</code>, <code>~typesafe/jev-latest</code>…) are listed too, so a routing group can classify turns with the same key.</li>
|
||||
</ul>
|
||||
<div class="code"><span class="lang">Terminal</span><button class="copy" data-copy="ex-models">Copy</button><pre id="ex-models">magpie provider models openrouter +anthropic/claude-opus-5.5 # expose one more
|
||||
|
||||
@@ -233,7 +233,7 @@ magpie provider test openrouter</pre></div>
|
||||
<li><b>列表从哪来。</b>magpie 从 <code>https://openrouter.ai/api/v1/models</code> 拉取列表,里面有每个模型的上下文长度。模型名、推理档位和价格来自 models.dev 上的 <code>openrouter</code> 目录。</li>
|
||||
<li><b>工具能看到哪些模型。</b>OpenRouter 列出的模型有几百个。你没挑选时,magpie 给工具展示 OpenRouter 列表里的前 24 个(它按从新到旧排)。其余的可以在供应商的模型列表里勾选,也可以打开 <span class="ui">每系最新</span>,每个系列只留最新的一个。</li>
|
||||
<li><b>新模型。</b><code>auto-include</code> 规则会立刻加入匹配的模型,以后拉取列表时新出现的匹配模型也会自动加入;<code>refresh-every</code> 让 magpie 定期自己重新拉取列表。</li>
|
||||
<li><b>图像模型。</b>OpenRouter 的 <code>/models</code> 只列文本模型,所以 magpie 从 <code>/api/v1/images/models</code> 读取 FLUX、Seedream、Riverflow、Recraft、GPT Image 等图像模型。在 <span class="ui">设置 → 模型 → 图像</span> 里选用。</li>
|
||||
<li><b>图像模型。</b>OpenRouter 的 <code>/models</code> 只列文本模型,所以 magpie 从 <code>/api/v1/models?output_modalities=image</code> 读取 FLUX、Seedream、Riverflow、Recraft、GPT Image 等图像模型及其免费版本。在 <span class="ui">设置 → 模型 → 图像</span> 里选用。</li>
|
||||
<li><b>决策模型。</b>OpenRouter 的决策模型(<code>liquid/d1</code>、<code>cloudflare/clef</code>、<code>~typesafe/jev-latest</code>……)也会列出来,路由分组可以用同一个 Key 给每一轮做分类。</li>
|
||||
</ul>
|
||||
<div class="code"><span class="lang">终端</span><button class="copy" data-copy="ex-models">复制</button><pre id="ex-models">magpie provider models openrouter +anthropic/claude-opus-5.5 # 多展示一个
|
||||
|
||||
@@ -2294,7 +2294,7 @@ magpie doesn’t use OpenRouter’s Responses API. An agent that speaks Response
|
||||
- **Where it comes from..** magpie fetches the list from `https://openrouter.ai/api/v1/models`, which gives each model’s context length. Names, reasoning levels and prices come from the `openrouter` catalog on models.dev.
|
||||
- **Which models agents see..** OpenRouter lists hundreds. Unless you pick some, magpie shows agents the first 24 OpenRouter lists, newest first. Pick the rest in the provider’s model list, or turn on Best in family to keep only the newest of each family.
|
||||
- **New models..** `auto-include` rules expose matching models now and each one a later fetch lists for the first time, and `refresh-every` has magpie fetch the list again by itself.
|
||||
- **Image models..** OpenRouter’s `/models` lists text models only, so magpie reads image models such as FLUX, Seedream, Riverflow, Recraft and GPT Image from `/api/v1/images/models`. Choose one in Settings → Models → Images.
|
||||
- **Image models..** OpenRouter’s `/models` lists text models only, so magpie reads image models such as FLUX, Seedream, Riverflow, Recraft and GPT Image, and their free variants, from `/api/v1/models?output_modalities=image`. Choose one in Settings → Models → Images.
|
||||
- **Decision models..** OpenRouter’s decision models (`liquid/d1`, `cloudflare/clef`, `~typesafe/jev-latest`…) are listed too, so a routing group can classify turns with the same key.
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user