[FIX] viin_ai_base: provider-native outgoing message adapter (#59)
The agentic tool loop shipped turn-2 canonical history (assistant tool_calls,
tool role tool_results) to the wire verbatim - no outgoing adapter existed, only
an incoming normalizer. A real tool-using turn returned HTTP 400 on
anthropic_native/openai_compat and silently dropped the tool result on
google_native. The same payload builder dropped the system prompt on all 3
protocols, and the PII redactor skipped tool-turn free-text (tool_calls
arguments, tool_results result/error).
Add a data-driven, UI-editable viin.ai.message.adapter (protocol-keyed with an
optional vendor override, noupdate seed) that reshapes the canonical history into
each provider's native wire format via vetted code primitives - zero eval/template
on the BYOK egress path. A write-time coherence constraint rejects incoherent
(protocol, shape/strategy) admin edits. System-prompt placement is handled per
protocol (anthropic top-level system, google systemInstruction, openai
role=system) with the system kwarg as the single source of truth, which also
fixes viin_ai_search Path B on anthropic/google. PII redaction is extended to
tool-turn free-text and runs before the adapt step (redact-then-adapt).
Add honest tests that stub only the transport seam and assert the built outgoing
payload per protocol (the seam #59 slipped through), plus data-driven,
coherence-gate, and PII-redaction tests.
Claude-Session: https://claude.ai/code/session_0128GTfwboHEZqJZ5xgfkxoL
| Subbuilds | Name | State | Detail |
|---|---|---|---|
| Build 386496 | Check the quality with Pylint: from test_lint to test_pylint 18m | Succeed | Log |
| Build 386497 | At install tests: from account to website_twitter 213m | Succeed | Log |
| Build 386498 | Post install tests: step install all modules 123m | Succeed | Log |
| Build 386499 | Post install tests: from account to payment_bidv_viin 185m | Succeed | Log |
| Build 386500 | Post install tests: from payment_buckaroo to to_account_asset 214m | Succeed | Log |
| Build 386501 | Post install tests: from to_account_asset_purchase to viin_account 89m | Succeed | Log |
| Build 386502 | Post install tests: from viin_account_auto_transfer to viin_estimate_approval 99m | Succeed | Log |
| Build 386503 | Post install tests: from viin_estimate_budget to viin_project_access_timesheet 39m | Succeed | Log |
| Build 386504 | Post install tests: from viin_project_gantt to website_twitter 69m | Succeed | Log |
| Build 386505 | Test install all modules without demo data: from account to website_twitter 93m | Succeed | Log |
| Create Date | Level | Message |
|---|---|---|
| 06/20/2026 11:45:55 | INFO |
Updated repository Viindoo-odoo
|
| 06/20/2026 11:45:55 | INFO |
Updated repository Viindoo-tvtmaaddons
|
| 06/20/2026 11:45:55 | INFO |
Updated repository Viindoo-erponline-enterprise
|
| 06/20/2026 11:45:55 | INFO |
Updated repository Viindoo-branding
|
| 06/20/2026 11:45:55 | INFO |
Cloned repository Viindoo-ai
|