fix: use Jimeng request key for task polling - #5294
Conversation
WalkthroughThe change persists provider-specific request keys in task properties, resolves Jimeng request keys from request context, and includes upstream task and model metadata in polling requests. ChangesUpstream request key persistence and resolution
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant JimengAdaptor
participant TaskStore
participant PollingService
Client->>JimengAdaptor: Submit task with model and image context
JimengAdaptor->>JimengAdaptor: Resolve upstream request key
JimengAdaptor->>TaskStore: Persist task and UpstreamRequestKey
PollingService->>TaskStore: Load task properties
PollingService->>JimengAdaptor: Fetch task with task and request-key context
JimengAdaptor-->>PollingService: Return upstream task status
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Following up in case this fell through. This PR is focused on #5278: Jimeng task polling now uses the request key returned by task creation, with coverage for the polling path. Checks are green. Happy to adjust the key-selection behavior if you prefer a different source of truth. |
9ec62e4 to
80e90f6
Compare
80e90f6 to
957e37d
Compare
Important
📝 变更描述 / Description
Jimeng can transform the submitted request key before sending a task, especially for v30 image and first/last-frame modes. Polling previously did not retain that transformed key, so result queries could use a different provider key.
This change stores the actual request key used for submission in
upstream_request_keyand reuses it for asynchronous polling. Tasks created before that field existed keep the previous fixed polling key. Their original image count and transformed request key were not persisted, so deriving a replacement from model/action fields is not reliable.The external API and task response format are unchanged.
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
📸 运行证明 / Proof of Work
Run on commit
957e37d1withGOMAXPROCS=4and build caches under/www/codex-work/tmp/oss-build: