fix(c-generative-ui): use gpt-5 + minimal reasoning for planner LLM#372
Merged
Conversation
gpt-5-mini ignored the "EXACTLY ONE tool" directive added in PR #363 and kept calling all four data tools on every filter follow-up. Verified live: my prompt rewrite was strict and explicit ("call EXACTLY ONE tool", "Do NOT call the other tools") but gpt-5-mini still fanned out — the model's default reasoning prefers thoroughness over literal directive-following. Split the LLMs: - `_llm` (gpt-5-mini) — unchanged for shell-gen + respond. Cheap and good enough for prose + JSON-spec emission. - `_planner_llm` (gpt-5, reasoning_effort='minimal') — bound to tools, used in plan_tools. gpt-5 follows directives more precisely; reasoning_effort='minimal' suppresses the "let me be thorough" deliberation that drives the fan-out. Standalone smoke (separate from chrome): prompt: "Filter to cancelled flights only" result: ['query_recent_disruptions'] ← exactly one Chrome MCP end-to-end: backend log confirms AI tool_calls: ['query_recent_disruptions'], data grid updates to 3 cancelled rows. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gpt-5-miniignored the "EXACTLY ONE tool" directive added in PR #363 and kept calling all four data tools on every filter follow-up. The prompt rewrite was strict and explicit ("call EXACTLY ONE tool", "Do NOT call the other tools") but the model's default reasoning prefers thoroughness over literal directive-following.Fix
Split the LLMs in
dashboard_graph.py/graph.py:_llm(gpt-5-mini) — unchanged forgenerate_shell+respond. Cheap, good enough for prose + JSON-spec emission._planner_llm(gpt-5,reasoning_effort="minimal") — bound to tools, used inplan_tools.gpt-5follows directives more precisely;reasoning_effort="minimal"suppresses the "let me be thorough" deliberation that drives the fan-out.Test plan
AI tool_calls: ['query_recent_disruptions'](one tool, not four), data grid updates to 3 cancelled rowsFiles
cockpit/langgraph/streaming/python/src/dashboard_graph.py— add_planner_llm; swap_llm_with_toolssourcecockpit/chat/generative-ui/python/src/graph.py— same in standalone🤖 Generated with Claude Code