Skip to content

fix: use OpenCode-compatible list_runs sort schema [BUG-1906]#5

Merged
rbavery merged 1 commit intomainfrom
ryan/fix-opencode-sort-by-schema
Apr 6, 2026
Merged

fix: use OpenCode-compatible list_runs sort schema [BUG-1906]#5
rbavery merged 1 commit intomainfrom
ryan/fix-opencode-sort-by-schema

Conversation

@rbavery
Copy link
Copy Markdown
Member

@rbavery rbavery commented Apr 6, 2026

Summary

  • replace the public list_runs.sort_by tuple parameter with a fixed-length string array so the generated MCP schema uses items instead of tuple prefixItems
  • normalize the array back to Flyte's expected (field, direction) tuple internally, preserving existing runtime behavior and response payloads
  • add regression coverage for both the normalization path and the generated list_runs schema shape

Why

OpenCode rejects the current list_runs tool schema at startup with:

Invalid schema for function 'flyte-mcp_list_runs': In context=('properties', 'sort_by', 'anyOf', '0'), array schema missing items.

The current tuple annotation emits a JSON Schema array with prefixItems and no items, which Claude and Codex tolerate but OpenCode rejects.

Validation

list my flyte mcp tasks related to inference 
⚙ flyte-mcp-local-test_list_discovery_projects 
⚙ flyte-mcp-local-test_discover_tasks 
Here are the inference-related tasks in your wherobots-rasterflow project (development domain):
Mosaic/Raster Inference (version pr-240-e899ec)
- root_env.run_inference_workflow — Run inference on an index of zarr stores using a specified model
- root_env.run_mosaics_inference_workflow — Run inference on multiple mosaic zarr stores (supports per-row CRS)

@rbavery rbavery changed the title fix: use OpenCode-compatible list_runs sort schema fix: use OpenCode-compatible list_runs sort schema [BUG-1906] Apr 6, 2026
@notion-workspace
Copy link
Copy Markdown

compat with opencode

@rbavery rbavery requested a review from ljstrnadiii April 6, 2026 21:33
@rbavery rbavery marked this pull request as ready for review April 6, 2026 21:33
@rbavery rbavery merged commit ad8bf34 into main Apr 6, 2026
3 checks passed
@rbavery rbavery deleted the ryan/fix-opencode-sort-by-schema branch April 6, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants