Skip to content

模型目录不放图片模型:修带档位后缀的模型名 502 空回复 - #30

Merged
ifccod merged 1 commit into
mainfrom
fix/suffixed-models
Nov 30, 2026
Merged

ifccod merged 1 commit into
mainfrom
fix/suffixed-models

Conversation

@ifccod

@ifccod ifccod commented Nov 30, 2026

Copy link
Copy Markdown
Owner

问题

上游 0.1.160 起 provider.models 末尾加了 gemini-3.1-flash-image,是目录里唯一的 @ai-sdk/openai-compatible 模型。目录里有它时,Magpie 0.1.4479 把目录里找不到的模型名(gemini-4-hydrogen-medium 这类带档位后缀的,Sub2API 映射全是这种)按 /v1/chat/completions 交给插件。插件一律按 Messages 回复,Magpie 读不到内容,当成空回复重试 3–4 次(每次真跑 agy、扣额度),最后 502 an empty reply。

机群上从换 0.1.160(11-28 15:00 UTC)起,带后缀的请求 100% 这样失败。

验证

  • 生产容器 px-4:gemini-3.8-flash-low 走 chat/completions 返回空;临时去掉加图片模型那一行并重启后,走 /v1/messages,chat 和 responses 都正常。已还原。
  • 机群 14 台没有一条成功的出图请求。

改动

  • 第 6 个补丁 Chat routing (local patch):默认不列图片模型,AGY_BRIDGE_IMAGE_MODEL=1 恢复。
  • fork/fork.sh test 跑上游测试时设 AGY_BRIDGE_IMAGE_MODEL=1(上游 test/images.mjs 需要),testkit 放行这个变量。
  • swap-agy-cli.sh 改成要求 6 个补丁标记。

测试

  • fork/patch-e2e.mjs 18/18;新用例在 AGY_BRIDGE_IMAGE_MODEL=1 时失败。
  • 上游 bun test 失败项和上游快照相同。

🤖 Generated with Claude Code

… route as Messages

Since 0.1.160 the catalog lists gemini-3.1-flash-image, its only
@ai-sdk/openai-compatible entry. With it there, magpie 0.1.4479 sends an id
it can't find in the catalog (an effort-suffixed gemini-4-hydrogen-medium,
which every Sub2API mapping uses) to the plugin as /v1/chat/completions. The
bridge answers as Messages, magpie reads no reply, retries up to 4 times
(each a real agy turn) and returns 502 "an empty reply". On the fleet every
suffixed request failed this way from the 0.1.160 rollout on. Reproduced on
a container and gone with the entry left out. AGY_BRIDGE_IMAGE_MODEL=1 lists
it again; no image request on the fleet ever succeeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ifccod
ifccod merged commit f6f02e6 into main Nov 30, 2026
1 check passed
@ifccod
ifccod deleted the fix/suffixed-models branch November 30, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant