diff --git a/conductor/tracks/qwen_llama_grok_integration_20260606/spec.md b/conductor/tracks/qwen_llama_grok_integration_20260606/spec.md index 6ceb8039..e09f3dab 100644 --- a/conductor/tracks/qwen_llama_grok_integration_20260606/spec.md +++ b/conductor/tracks/qwen_llama_grok_integration_20260606/spec.md @@ -514,6 +514,16 @@ Each phase has its own checkpoint commit and git note. **Footnote (added 2026-06-11, in case context expires):** As of the end of Phase 4, only `_send_minimax` has a working tool-call loop. The Phase 3 (Grok, Llama) and Phase 2 (Qwen) entry points are single-shot — they call `send_openai_compatible` once and return, without executing tool_calls. If the user notices "tool execution doesn't work for Qwen/Grok/Llama" after Phase 5 ships, the fix is to either (a) inline the tool loop in each entry point (mirroring MiniMax's pattern) or (b) better, lift the loop into a shared `run_with_tool_loop(client, request, capabilities, *, pre_tool_callback, qa_callback, patch_callback, base_dir, vendor_name)` helper that wraps `send_openai_compatible` and is called from all 4 vendor entry points. Option (b) is the data-oriented-design win (algorithm = HTTP mechanics, policy = tool dispatch) and avoids the 4-way duplication that already exists in `_send_anthropic`/`_send_gemini`/`_send_gemini_cli`/`_send_deepseek`. Defer to a separate follow-up track; not in scope for this one. +**Footnote (added 2026-06-11, in case context expires):** As of the end of Phase 5, only **adaptation 1 of 9** from spec §6 is applied to `src/gui_2.py` (Screenshot button iff vision, at `render_files_and_media:3030`). The remaining 8 adaptations are deferred to a follow-up track: +- 2: Tools toggle iff tool_calling +- 3: Cache panel iff caching +- 4: Stream progress iff streaming +- 5: Fetch Models iff model_discovery +- 6: Token budget max = context_window +- 7-9: Cost panel (estimate / "Free (local)" for localhost / "—" for other cost_tracking=false) + +The pattern is established: `caps = app._get_active_capabilities(); imgui.begin_disabled(not caps.); ...UI...; imgui.end_disabled(); if not caps.: imgui.same_line(); imgui.text_disabled("(reason)")`. Each remaining adaptation is a mechanical application of this pattern at its specific render site. The follow-up track will need to locate each render site (tools toggle, cache panel, stream progress, fetch models button, token budget, cost panel) and apply the wrapping. The helper `_get_active_capabilities()` is already in place (added in t5.1). + ### 13.2 Project References - `docs/guide_ai_client.md` — current `ai_client.py` architecture; will be updated in Phase 6 to document the matrix and the shared helper. Specifically: the per-provider history globals (`_anthropic_history`, `_deepseek_history`, `_minimax_history`) documented at lines 123-132 are the **state-management shape** that the new 3 vendors should follow in Phase 2/3. (Per `guide_state_lifecycle.md §4`, the per-provider lock pattern is the established convention.)