From cf5fdd3d625bd5d46ea1b8f8e1a2a22cbe837088 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 15 Jun 2026 14:48:38 -0400 Subject: [PATCH] docs(ai_client): add 2 follow-up notes for doeh_test_thinking_cleanup_20260615 --- docs/guide_ai_client.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/guide_ai_client.md b/docs/guide_ai_client.md index 6585e2a9..f113114a 100644 --- a/docs/guide_ai_client.md +++ b/docs/guide_ai_client.md @@ -524,9 +524,10 @@ print(r.data) - **[guide_context_aggregation.md](guide_context_aggregation.md)** — The `aggregate.py` pipeline that produces the markdown the AI client sends - **[conductor/product.md](../conductor/product.md#multi-provider-integration)** — Product-level overview of providers - **[docs/reports/qwen_llama_grok_followup_audit_20260611.md](qwen_llama_grok_followup_audit_20260611.md)** — Audit of the parent track's gaps; follow-up track `qwen_llama_grok_followup_20260611` covers them -- **Gemini / Gemini CLI thinking-format compatibility (deferred from `ai_loop_regressions_20260614`)** — the user's complaint included Gemini; the likely cause is a format mismatch between the Gemini SDK output and `parse_thinking_trace`. Empirically investigate by running a Gemini request that produces reasoning and inspecting the raw `resp.text`. See [spec §13.1](../conductor/tracks/ai_loop_regressions_20260614/spec.md#131-gemini--gemini-cli-thinking-format-compatibility-deferred). -- **`` (half-width) marker support in thinking_parser (deferred from `ai_loop_regressions_20260614`)** — user screenshot showed `...` format; current `parse_thinking_trace` requires ``. The change is small (~3 lines in `src/thinking_parser.py:9`). See [spec §13.2](../conductor/tracks/ai_loop_regressions_20260614/spec.md#132-think-half-width-marker-support-deferred). -- **Public API Result Migration (planned, separate track `public_api_migration_20260606`)** — the 5 production + 63 test call sites not migrated in this track; the follow-up removes the deprecated `ai_client.send()`. See [parent track spec](../conductor/tracks/data_oriented_error_handling_20260606/spec.md) §12.1. +- **Gemini / Gemini CLI thinking-format compatibility (deferred from `ai_loop_regressions_20260614`)** — the user's complaint included Gemini; the likely cause is a format mismatch between the Gemini SDK output and `parse_thinking_trace`. Empirically investigate by running a Gemini request that produces reasoning and inspecting the raw `resp.text`. **Resolved 2026-06-15 by `doeh_test_thinking_cleanup_20260615`**: the `google-genai` SDK filters `thought=True` parts out of `resp.text`. The new helper `_extract_gemini_thoughts` in `src/ai_client.py` scans `resp.candidates[0].content.parts` for `thought=True` and prepends the concatenated text as `...` so `parse_thinking_trace` extracts it. 5 regression tests in `tests/test_gemini_thinking_format.py` cover the helper and the wrap path. See [track spec](../conductor/tracks/doeh_test_thinking_cleanup_20260615/spec.md) §3.2 G15. +- **`` (half-width) marker support in thinking_parser (deferred from `ai_loop_regressions_20260614`)** — user screenshot showed `...` format; current `parse_thinking_trace` requires ``. The change is small (~3 lines in `src/thinking_parser.py:9`). **Resolved 2026-06-15 by `doeh_test_thinking_cleanup_20260615`**: the `tag_pattern` regex in `src/thinking_parser.py:20` now also matches `...` (the backreference `\1` matches the closing tag). New test `test_parse_half_width_think_tag` in `tests/test_thinking_trace.py`. All 8 thinking_trace tests pass. +- **Public API Result Migration (planned, separate track `public_api_migration_20260606`)** — the 5 production + 63 test call sites not migrated in this track; the follow-up removes the deprecated `ai_client.send()`. See [parent track spec](../conductor/tracks/data_oriented_error_handling_20260606/spec.md) §12.1. **Partial progress 2026-06-15 by `doeh_test_thinking_cleanup_20260615`**: 11 of the 63 test mock bugs were fixed (the 11 mechanical ones in `test_grok_provider.py`, `test_llama_provider.py`, `test_llama_ollama_native.py`, `test_ai_client_tool_loop_builder.py`, `test_headless_service.py`). The remaining 50+ test call sites + 5 production call sites remain for `public_api_migration`. +- **`doeh_test_thinking_cleanup_20260615` (shipped 2026-06-15)** — cleanup follow-up to `data_oriented_error_handling_20260606` and `ai_loop_regressions_20260614`. Fixed: 1 CRITICAL production regression (`_api_generate` `NameError` from commit `2b7b571a`), 11 test mock bugs, 2 deferred bugs (Gemini thinking format, `` half-width marker), and 2 housekeeping items (state.toml duplicate keys, tracks.md row 24). See [track spec](../conductor/tracks/doeh_test_thinking_cleanup_20260615/spec.md) + [plan](../conductor/tracks/doeh_test_thinking_cleanup_20260615/plan.md). ---