## 背景 #842 已按 `primary.key{i}` 做 i2v 在途与 429 分车道,但成员身份仍是 CSV 下标:配置头部插 key 或删中间 key 时,Redis 在途/冷却会绑到另一把物理钥匙。同时 Admit 动态读 env、Gateway 启动冻住 `_routes`,两份名单可能分叉。 #843 总 Issue 分期交付;本 Issue 只覆盖 **P0**:稳定 `credential_id`、统一快照、#842 车道键迁移,以及四表 ORM 骨架(运行时仍可无 DB)。 ## 目标 - `credential_id = {endpoint_id}:{sha256(api_key)[:16]}`,禁止再生成 `primary.key{i}` 作为 `route_id` - Admit 与 Video/Image/Chat Gateway 均经 `get_pool_snapshot` / `pool_routes` 读同一份成员表 - i2v Redis 在途键:`windup:i2v:gate:inflight:cred:{credential_id}`;deploy 一轮内兼容 `primary.key{i}` → `credential_id` 映射 - 新增 `pool_models`(四表 ORM)、`pool_registry`、`import_gateway_pool_from_env.py`;无 DB 时退回 `AI_ROUTE_*` ## 不在本 Issue - disable / drain / AUTH 摘选路(P1) - capability 型号目录(P2) - `quota_scope=account` 账号舱壁(P3) 见 #843。 ## 验收标准 - [x] 配置头部插入或中部删除 key 后,旧任务 Redis 在途/冷却仍绑原物理凭证(`credential_id` 不变) - [x] Admit `try_acquire` 与 Gateway `poll_i2v(route_id=...)` 使用同一 `credential_id` - [x] 无 DB 时纯 env 行为与 #842 合入后一致(key 数、inflight_max、429 分车道) - [x] `uv run pytest tests/test_gateway_pool_ids.py tests/test_gateway_pool_models.py tests/test_i2v_admit.py tests/test_gateway_video.py tests/test_gateway_image.py tests/test_gateway_chat.py` 通过 ## 实现 PR - #849 ## 备注 - 依赖 #842 已合 `main` - 父 Epic:#843
Activity
feat(gateway): P0 凭证池稳定身份与统一快照
feat(gateway): P0 凭证池稳定身份与统一快照 (1024XEngineer#849)