修复 AGC 图片快速编辑被平台 400 拒绝:服务端认 ai-game-creator-client 来源别名

- `is_game_creator_resource_editor_generation` 增加 `GAME_CREATOR_CLIENT_GENERATION_SOURCE` 别名,与 `from_job` 的队列 consumer 判定同口径
- AGC 客户端发送前会把 `generationInputs.source` 改写成 `ai-game-creator-client`,原来只认 `game-creator-resource-editor`,导致该分支对真实请求永远不生效
This commit is contained in:
2026-09-10 19:00:44 +08:00
parent 7d0f5c68fe
commit 6a11032084
@@ -4142,7 +4142,15 @@ fn is_game_creator_resource_editor_generation(generation_inputs: Option<&Value>)
generation_inputs
.and_then(|value| value.pointer("/source"))
.and_then(Value::as_str)
.is_some_and(|source| source.trim() == GAME_CREATOR_RESOURCE_EDITOR_SOURCE)
.is_some_and(|source| {
// 中文注释:AGC 客户端在发送前会把 source 改写成 `ai-game-creator-client`
// 两个 source 是同一个 consumer 的别名(见 `from_job` 的 queue consumer 判定),
// 这里必须同口径,否则客户端实际发出的请求永远走不到 AGC 分支。
matches!(
source.trim(),
GAME_CREATOR_RESOURCE_EDITOR_SOURCE | GAME_CREATOR_CLIENT_GENERATION_SOURCE
)
})
}
fn ensure_editor_image_edit_source_kind_allowed_for_request(