Add a proxy-side tool emulation layer so Lingma requests can surface stable OpenAI tool_calls and Anthropic tool_use blocks even when upstream tool events are missing or inconsistent.
Constraint: Keep native Lingma tool event bridging as the first path and layer emulation as a fallback
Rejected: Depend exclusively on Lingma native tool/invoke events | tool visibility remains inconsistent across models and transports
Confidence: high
Scope-risk: moderate
Switch TOOL_FORWARD_ENABLED default to true in runtime config and .env.example,
and add regression tests covering default-on and explicit false behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ensure /v1/responses streams always terminate with response.completed and normalize Lingma tool_code fallbacks into structured tool calls, including single-argument forms.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Stabilize cross-protocol ask-mode/streaming behavior and reduce session-reuse branch collisions, then add focused docs/tests for multimodal normalization and pool/stats/config paths.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>