Repository navigation
模型目录不放图片模型:修带档位后缀的模型名 502 空回复 - #30
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
上游 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、扣额度),最后 502an empty reply。机群上从换 0.1.160(11-28 15:00 UTC)起,带后缀的请求 100% 这样失败。
验证
gemini-3.8-flash-low走 chat/completions 返回空;临时去掉加图片模型那一行并重启后,走/v1/messages,chat 和 responses 都正常。已还原。改动
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.mjs18/18;新用例在AGY_BRIDGE_IMAGE_MODEL=1时失败。bun test失败项和上游快照相同。🤖 Generated with Claude Code