-
Notifications
You must be signed in to change notification settings - Fork 135
Description
Bug description
When editing a workload via POST with a tools_override parameter, the override is successfully applied and functional, but the GET endpoint for the workload always returns null for the tools_override field instead of returning the configured override values.
Steps to reproduce
- Make a POST request to edit a workload with
tools_overridepopulated:
curl 'http://localhost:50088/api/v1beta/workloads/fetch-2/edit' \
--data-raw '{"image":"ghcr.io/stackloklabs/gofetch/server:1.0.1","transport":"streamable-http","group":"default","target_port":25900,"cmd_arguments":[],"env_vars":{"FASTMCP_PORT":"25900","MCP_PORT":"25900","MCP_TRANSPORT":"streamable-http"},"secrets":[],"network_isolation":false,"volumes":[],"tools_override":{"fetch":{"name":"fetch_custom"}}}'- Verify the request returns 200 OK
- Confirm the override is applied by using the playground and retrieving the tools list (the override should be visible there)
- Make a GET request to retrieve the workload configuration:
curl 'http://localhost:50088/api/v1beta/workloads/fetch-2'- Observe the
tools_overridefield in the response
Expected behavior
The GET endpoint should return the tools_override configuration that was set during the POST request:
{
"tools_override": {
"fetch": {
"name": "fetch_custom"
}
}
}Actual behavior
The GET endpoint returns "tools_override": null:
{
"image": "ghcr.io/stackloklabs/gofetch/server:1.0.1",
"host": "127.0.0.1",
...
"tools": null,
"tools_override": null,
"group": "default",
...
}Even though the override is actually applied and functioning (confirmed via playground tools list).
Environment (if relevant)
- Endpoint:
/api/v1beta/workloads/{workload_id} - OS/version: macOS Tahoe Version 26.0.1
- ToolHive version: v0.5.0
Additional context
The tools override is clearly being stored and applied correctly (evidenced by its appearance in the playground tools list), but the GET endpoint is not serializing/returning this field properly. This appears to be a serialization or response mapping issue in the GET endpoint rather than a storage problem.
