send trace data#218
Conversation
…host, not "openai-compatible") The scratchpad LLM forced vision_format="anthropic" for ANY openai-compatible provider. That's only right for Minds/MindsHub/MDB.AI (which proxy Anthropic over the OpenAI envelope). Gemini is presented to the scratchpad as openai-compatible (it speaks OpenAI's protocol at Google's endpoint), so it was getting Anthropic-shaped image blocks — malformed for Google, which expects standard OpenAI image_url blocks. Image/vision input through the Gemini scratchpad was broken. Gate the anthropic override on the existing _anthropic_proxy host check (mdb.ai / mindshub.ai) only. OpenAIProvider already defaults to supports_vision=True / vision_format="openai", so Gemini and any generic OpenAI-compatible endpoint now correctly use OpenAI image_url, while Minds/MindsHub keep the Anthropic format. Text-only was already fine; this fixes vision. Surfaced in the ENG-466 review of cowork-server #111 (presenting gemini as openai-compatible exposed this pre-existing scratchpad_boot assumption). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gs too Same bug #216 fixed in scratchpad_boot, on the main-agent path: LLMClient.from_settings's "openai-compatible" factory hardcoded vision_format="anthropic" unconditionally. A standalone anton instance with openai-compatible pointed at a non-Anthropic endpoint (Gemini, a generic proxy) gets Anthropic-shaped image blocks → mangled images. (Does not affect the cowork product: cowork-server's build_llm_client constructs OpenAIProvider directly with the default vision_format="openai", bypassing from_settings. So this is the anton-standalone path only.) Gate on the base-URL host (mdb.ai / mindshub.ai) like the scratchpad_boot fix: Minds/MindsHub keep anthropic image blocks; Gemini + generic compatible endpoints use OpenAI image_url. Tests: from_settings vision_format is anthropic for mindshub/mdb hosts, openai for Gemini and generic hosts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Review — base = Clean. 🟡 🟡 No tests, and there were none for the trace headers before. A unit test on 🟡 Stacked on #216 (carries its vision-fix commits). Rebase on LGTM once the tag-sanitization nit is considered. Note the consumer side (#125) can't run until this lands and the cowork-server anton pin is bumped to include it. |
send trace data, take headers