diff --git a/backend/internal/service/gemini_messages_compat_service_test.go b/backend/internal/service/gemini_messages_compat_service_test.go index c4bbd8957d..b2fc1c110b 100644 --- a/backend/internal/service/gemini_messages_compat_service_test.go +++ b/backend/internal/service/gemini_messages_compat_service_test.go @@ -323,9 +323,18 @@ func TestCleanToolSchema_NormalizesGeminiUnsupportedSchemaFields(t *testing.T) { properties, ok := cleaned["properties"].(map[string]any) require.True(t, ok) - require.Equal(t, "STRING", properties["path"].(map[string]any)["type"]) - require.Equal(t, "INTEGER", properties["count"].(map[string]any)["type"]) - require.NotContains(t, properties["empty"].(map[string]any), "type") + + pathSchema, ok := properties["path"].(map[string]any) + require.True(t, ok) + require.Equal(t, "STRING", pathSchema["type"]) + + countSchema, ok := properties["count"].(map[string]any) + require.True(t, ok) + require.Equal(t, "INTEGER", countSchema["type"]) + + emptySchema, ok := properties["empty"].(map[string]any) + require.True(t, ok) + require.NotContains(t, emptySchema, "type") } func TestConvertClaudeToolsToGeminiTools_PreservesWebSearchAlongsideFunctions(t *testing.T) {