From e1838c5b5a7fc3db5420f03da80ac1a8ea6ac9e0 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 9 Sep 2026 03:26:05 -0700 Subject: [PATCH] fix: trim opencode-go 422 salvage to the invariant set Drop the bare "tool.content" pattern (any 400 mentioning tool.content in a non-list context would be sent through the image-strip path) and the profile flag snapshot test; the behaviour tests (classifier verdict + proactive downgrade) already pin the contract. --- agent/error_classifier.py | 4 ++-- tests/plugins/model_providers/test_opencode_go_profile.py | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/agent/error_classifier.py b/agent/error_classifier.py index 9add7c84ae..505244c541 100644 --- a/agent/error_classifier.py +++ b/agent/error_classifier.py @@ -169,8 +169,8 @@ _IMAGE_CORRUPT_PATTERNS = ( _MULTIMODAL_TOOL_CONTENT_PATTERNS = ( "text is not set", "tool message content must be a string", "tool content must be a string", "tool message must be a string", "expected string, got list", "expected string, got array", - "tool_call.content must be string", "tool.content.str", "tool.content", - "input should be a valid string", + # Console Go / pydantic-v2 relays behind opencode-go (422, param ``messages.N.tool.content.str``, #104731). + "tool_call.content must be string", "tool.content.str", "input should be a valid string", ) # Local-inference memory/resource-ceiling rejections (oMLX/MLX memory guard, diff --git a/tests/plugins/model_providers/test_opencode_go_profile.py b/tests/plugins/model_providers/test_opencode_go_profile.py index 2accf6bf3d..406b340dcd 100644 --- a/tests/plugins/model_providers/test_opencode_go_profile.py +++ b/tests/plugins/model_providers/test_opencode_go_profile.py @@ -254,11 +254,3 @@ class TestOpenCodeGoFullKwargsIntegration: assert "extra_body" not in kwargs assert kwargs["reasoning_effort"] == "high" - -class TestOpenCodeGoVisionToolMessages: - """OpenCode Go provider profile declares supports_vision_tool_messages=False (#104731).""" - - def test_supports_vision_true_and_tool_messages_false(self, opencode_go_profile): - assert opencode_go_profile.supports_vision is True - assert opencode_go_profile.supports_vision_tool_messages is False -