Problem
Plan review menus rely on model responses that include structured function/tool calls or model-specific output formats. On strict OpenAI-compatible backends (that do not expose function_call metadata or use a stricter chat-completions format), the CLI shows an empty or unusable plan review menu.
Reproduction
- Configure CLI to use a strict OpenAI-compatible backend.
- Run
/plan and attempt to open the plan review/approval menu.
- Menu options are missing or malformed; recommended actions are not presented.
Proposed fix
- Add capability detection: when the LLM response lacks
function_call/tool metadata, fall back to a plaintext-parsing path.
- Fallback parsing should accept simple formats the model can produce on strict backends:
- JSON arrays/objects if present in text
- Numbered or bulleted lists ("1.", "- Option: ...")
- A simple marker like
---MENU--- block or YAML front-matter
- Prefer a deterministic parser (attempt JSON first, then list heuristics) to build the menu items.
- Add unit and integration tests that simulate strict-backend responses (no function_call, no tool metadata) to prevent regressions.
- Update the plan-mode e2e tests and changelog.
Why
This keeps the richer function-calling behavior when available while ensuring users on strict OpenAI-compatible backends still get usable plan review menus.
If maintainers are ok with this approach I can open a PR implementing the fallback parser and tests. Please advise if you'd prefer a stricter parsing format (e.g., requiring a special MENU: block).
Problem
Plan review menus rely on model responses that include structured function/tool calls or model-specific output formats. On strict OpenAI-compatible backends (that do not expose function_call metadata or use a stricter chat-completions format), the CLI shows an empty or unusable plan review menu.
Reproduction
/planand attempt to open the plan review/approval menu.Proposed fix
function_call/tool metadata, fall back to a plaintext-parsing path.---MENU---block or YAML front-matterWhy
This keeps the richer function-calling behavior when available while ensuring users on strict OpenAI-compatible backends still get usable plan review menus.
If maintainers are ok with this approach I can open a PR implementing the fallback parser and tests. Please advise if you'd prefer a stricter parsing format (e.g., requiring a special
MENU:block).