Inconsistent API Spec for QueueItem: `/api/queue` returns `output_node_ids` and `metadata` flipped.
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
The openapi API spec specified the following format:
```
QueueItem:
type: array
description: |
Queue item tuple format: [job_number, prompt_id, workflow_json, output_node_ids, metadata]
- [0] job_number (integer): Position in queue (1-based)
- [1] prompt_id (string): Job UUID
- [2] workflow_json (object): Full ComfyUI workflow
- [3] output_node_ids (array): Node IDs to return results from
- [4] metadata (object): Contains {create_time: }
```
### Actual Behavior
The server returned `[3]` and `[4]` in flipped order:
```bash
curl --location 'http://127.0.0.1:8188/api/queue' \
--header 'Accept: application/json' \
--header 'X-API-Key: ••••••'
```
```json
{
"queue_running": [
[
2,
"21cab374-a481-4f1d-8645-c72f981b3b35",
{
"11": {
"_meta": {
"title": "Focal length"
},
"class_type": "ArkGraphicsInputFloat",
"inputs": {
"default": 30.0,
"max": 500.0,
"min": 1.0,
"order": 0,
"value": 15.0
}
},
"2": {
"_meta": {
"title": "Load SHARP Model"
},
"class_type": "LoadSharpModel",
"inputs": {
"checkpoint_path": "",
"device": "cuda"
}
},
"7": {
"_meta": {
"title": "SHARP Predict (Image to PLY)"
},
"class_type": "SharpPredict",
"inputs": {
"focal_length_mm": [
"11",
0
],
"image": [
"9",
0
],
"model": [
"2",
0
],
"output_prefix": "sharp"
}
},
"8": {
"_meta": {
"title": "ArkGraphics Output Download Gaussian"
},
"class_type": "ArkGraphicsOutputDownloadGaussian",
"inputs": {
"gaussian_file": [
"7",
0
]
}
},
"9": {
"_meta": {
"title": "Input Image"
},
"class_type": "ArkGraphicsInputLoadImage",
"inputs": {
"image": "1c2bbbe956ebb5463ac2cadf799ac911c7b4b903e9b55bee49cdce4b9f1928ca.jpg",
"order": 23
}
}
},
{
"create_time": 1772122134463
},
[
"8",
"7"
]
]
],
"queue_pending": []
}
```
### Steps to Reproduce
Start a job, then send a get request to the `/api/queue` route:
```
curl --location 'http://127.0.0.1:8188/api/queue' \
--header 'Accept: application/json' \
--header 'X-API-Key: ••••••'
```
Contributor guide
Assessment
This issue has not been assessed yet.